Commit graph

124387 commits

Author SHA1 Message Date
Miss Islington (bot)
e4c4ecccec
[3.13] gh-134381: Fix RuntimeError when starting not-yet started Thread after fork (gh-134514) (gh-134597)
(cherry picked from commit 9a2346df86)

Co-authored-by: Jiucheng(Oliver) <git.jiucheng@gmail.com>
2025-05-23 19:45:51 +00:00
Serhiy Storchaka
0308612508
[3.13] gh-134578: Mark more slow tests (GH-134579) (GH-134592)
(cherry picked from commit 77eade39f9)
2025-05-23 17:31:05 +00:00
Miss Islington (bot)
1dbb644a5b
[3.13] gh-106318: Add example for str.count() (GH-134519) (#134573)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
2025-05-23 09:53:19 +00:00
Miss Islington (bot)
5b203f511b
[3.13] gh-106318: Add example for str.center() (GH-134518) (#134572)
Co-authored-by: Blaise Pabon <blaise@gmail.com>
2025-05-23 09:50:17 +00:00
Miss Islington (bot)
c6497d632d
[3.13] Add notes on nogil & reinitialization to the Opt-Out section in Module Isolation HOWTO (GH-134141) (GH-134491)
Add notes on nogil & reinitialization to the Opt-Out section in Module Isolation HOWTO (GH-134141)
(cherry picked from commit 1f0a294e8c)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Sam Gross <colesbury@gmail.com>
2025-05-23 10:46:58 +02:00
Miss Islington (bot)
5987ebc774
[3.13] gh-114177: avoid calling connection lost callbacks when loop is already closed in asyncio subprocess (GH-134508) (#134562)
gh-114177: avoid calling connection lost callbacks when loop is already closed in asyncio subprocess (GH-134508)
(cherry picked from commit 5804ee7b46)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-05-23 04:56:14 +00:00
Miss Islington (bot)
1a61d81544
[3.13] Docs: fix link in free-threading-python.rst (GH-134548) (#134556) 2025-05-23 00:43:26 +00:00
Miss Islington (bot)
b212653049
[3.13] Avoid __file__ in hashlib example (GH-134540) (#134550)
Avoid `__file__` in `hashlib` example (GH-134540)
(cherry picked from commit 9b292ff022)

Co-authored-by: Josh Cannon <joshdcannon@gmail.com>
2025-05-22 21:38:04 +00:00
Kattni
79f20f1191
[3.13] Docs: Add note to tutorial clarifying scope (GH-134534) (#134545)
(cherry picked from commit 742d5b5c5d)
2025-05-23 00:04:10 +03:00
Miss Islington (bot)
0671eb6c09
[3.13] Consistent sentence case in docs template files (GH-134412) (#134496)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-05-22 12:58:05 +03:00
Miss Islington (bot)
ba9f533f93
[3.13] gh-71339: Use new assertion methods in the http tests (GH-129058) (GH-132500)
(cherry picked from commit 7076d076c2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-22 09:40:26 +00:00
Miss Islington (bot)
6126b7cf88
[3.13] gh-71339: Use new assertion methods in the urllib tests (GH-129056) (GH-132499)
(cherry picked from commit f98b9b4cbb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-22 09:40:19 +00:00
Miss Islington (bot)
34d3495f32
[3.13] gh-71339: Use new assertion methods in the email tests (GH-129055) (GH-132501)
(cherry picked from commit 522766aa23)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-22 09:40:04 +00:00
Miss Islington (bot)
044fe0b2e1
[3.13] gh-131357: Add some extra tests for empty bytes and bytearray (GH-134458) (#134490)
gh-131357: Add some extra tests for empty bytes and bytearray (GH-134458)
(cherry picked from commit 7309eb60c0)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
2025-05-22 07:28:44 +00:00
Miss Islington (bot)
55aba16059
[3.13] gh-134309: Add `github.actor` to the GitHub Actions concurrency key (GH-134310) (#134485)
gh-134309: Add ``github.actor`` to the GitHub Actions concurrency key (GH-134310)

When inexperienced users create a PR from their default branch, all of the concurrency keys
collide as there is no namespacing. This becomes an issue at events with many new contributors,
where workflow runs are cancelled on other pull requests.
Disambiguate by adding the username of the relevant 'actor' to the concurrency key.
(cherry picked from commit 979d81a179)





Authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>

Co-authored-by: Kira <coldcaption@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Sviatoslav Sydorenko <sviat@redhat.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2025-05-22 04:12:08 +00:00
Miss Islington (bot)
e0822d8d1c
[3.13] gh-134062: Fix hash collisions in IPv4Network and IPv6Network (GH-134063) (#134477)
gh-134062: Fix hash collisions in IPv4Network and IPv6Network (GH-134063)
(cherry picked from commit f3fc0c16e0)


gh-134062: Fix hash collisions in IPv4Network and IPv6Network
gh-134062: Add hash collision regression test

Co-authored-by: Mike Salvatore <mike.s.salvatore@gmail.com>
2025-05-22 03:12:28 +00:00
Gregory P. Smith
5ecc39e9f4
[3.13] gh-80050: Update BufferedReader.read docs around non-blocking (GH-130653) (#134445)
(cherry picked from commit e1f891414b)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-21 17:07:03 +00:00
Miss Islington (bot)
2d11f3e154
[3.13] gh-62184: Remove _pyio import of _io.FileIO (gh-134192) (gh-134436)
This was added in the add of `_io`, isn't used since bpo-21859 when a
`_pyio` implementation was added which defines `FileIO` lower down in
the file.
(cherry picked from commit 0a68068bd2)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-21 17:55:55 +02:00
Miss Islington (bot)
e1e8533a5d
[3.13] gh-133982: Run unclosed file test on all io implementations (gh-134165) (gh-134434)
Update `test_io` `_check_warn_on_dealloc` to use `self.` to dispatch to
different I/O implementations.

Update the `_pyio` implementation to match expected behavior, using the
same `_dealloc_warn` design as the C implementation uses to report the
topmost `__del__` object.

The FileIO one now matches all the others, so can use IOBase. There was
a missing check on closing (self._fd must be valid), add that check
(cherry picked from commit 5b0e827521)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-21 17:28:29 +02:00
Miss Islington (bot)
046125e5b6
[3.13] gh-71253: Match _io exception in _pyio (gh-133985) (gh-134431)
Test was only testing _io, expanded to cover _pyio.

(cherry picked from commit 06eaf4055c)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-05-21 17:14:00 +02:00
Miss Islington (bot)
de6d199c1d
[3.13] gh-133982: Update test_bufio to use self.open (gh-133983) (gh-134429)
(cherry picked from commit 84d5f8d799)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-21 17:13:24 +02:00
Miss Islington (bot)
bc60b33745
[3.13] gh-132246: Add special buffer methods to C API Type Object docs (gh-132247) (gh-134427)
Two special methods, __buffer__ and __release_buffer__ were added to
Python 3.12 by PEP 688. The C API Type Object documentation for slots
includes `tp_as_buffer`, and sub-slots `bf_getbuffer`, `bf_releasebuffer`
but does not refer to the Python Data Model version of those. Add the
missing references.
(cherry picked from commit b529b60fc2)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2025-05-21 16:34:13 +02:00
Miss Islington (bot)
fcebf5aebf
[3.13] gh-110631: Fix some incorrect indents in the documentation (GH-129312) (#134420)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-05-21 14:00:13 +00:00
Miss Islington (bot)
f5de0632d0
[3.13] gh-132542: Only run test_native_id_after_fork if native_id is supported (GH-134408) (GH-134414)
(cherry picked from commit e6dde10a69)

Co-authored-by: Noam Cohen <noam@noam.me>
2025-05-21 11:34:49 +00:00
Miss Islington (bot)
7ada439712
[3.13] gh-134360 Add processName attribute to logging.Formatter docstring (GH-134371) (GH-134404)
Co-authored-by: Sofia Toro <sofie.torch@outlook.com>
2025-05-21 06:16:36 +01:00
Miss Islington (bot)
35eb3b82a6
GH-130727: Avoid race condition in _wmimodule by copying shared data (GH-134313)
(cherry picked from commit e4fbfb1288)

Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2025-05-20 21:44:17 +00:00
Łukasz Langa
b41e7b1e02
[3.13] gh-128066: Properly handle history file writes for RO fs on PyREPL (gh-134380) (gh-134386)
(cherry picked from commit c91ad5da9d)

Co-authored-by: Chris Patti <feoh@feoh.org>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-20 22:15:43 +02:00
Miss Islington (bot)
7df6749219
[3.13] gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372) (#134375)
gh-85045: clarified that the underlying buffer of a TextIOBase can be a RawIOBase (GH-134372)

Added a clarification that the underlying binary buffer of a TextIOBase can be a BufferedIOBase OR a RawIOBase
(cherry picked from commit 36eb711d2f)

Co-authored-by: Alex Kautz <alex@takemobi.com>
2025-05-20 12:28:09 -07:00
Miss Islington (bot)
4c22fa6570
[3.13] gh-131357: Add tests for zero-sized bytes objects in test_bytes.py (GH-134234) (#134379)
gh-131357: Add tests for zero-sized bytes objects in test_bytes.py (GH-134234)
(cherry picked from commit 306f9e04e5)

Co-authored-by: abstractedfox <coldcaption@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-05-20 18:56:32 +00:00
Noam Cohen
aebbbaffe8
[3.13] gh-132542: Set native thread ID after fork (GH-132701) (GH-134361)
(cherry picked from commit 6b73502313)
2025-05-20 17:03:19 +00:00
Miss Islington (bot)
bad9f63f6c
[3.13] gh-129748: Update mimalloc to use atomic store for mi_block_set_nextx (GH-134238) (gh-134353)
gh-129748: Update mimalloc to use atomic store for mi_block_set_nextx (GH-134238)
(cherry picked from commit 317c496223)

Co-authored-by: Donghee Na <donghee.na@python.org>
2025-05-20 16:26:23 +00:00
Hugo van Kemenade
61af847d41
[3.13] gh-101100: Fix Sphinx warnings in library/decimal.rst (GH-134303) (#134339)
Co-authored-by: Yuki Kobayashi <drsuaimqjgar@gmail.com>
2025-05-20 17:55:23 +03:00
Guido van Rossum
eca8ff1ae2
[3.13] gh-128307: Update what's new in 3.13 with create_task changes of asyncio (#134304) (#134335)
(It's complicated.)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-20 07:30:18 -07:00
Serhiy Storchaka
6279eb8c07
[3.13] gh-133767: Fix use-after-free in the unicode-escape decoder with an error handler (GH-129648) (GH-133944)
If the error handler is used, a new bytes object is created to set as
the object attribute of UnicodeDecodeError, and that bytes object then
replaces the original data. A pointer to the decoded data will became invalid
after destroying that temporary bytes object. So we need other way to return
the first invalid escape from _PyUnicode_DecodeUnicodeEscapeInternal().

_PyBytes_DecodeEscape() does not have such issue, because it does not
use the error handlers registry, but it should be changed for compatibility
with _PyUnicode_DecodeUnicodeEscapeInternal().
(cherry picked from commit 9f69a58623)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-20 14:46:57 +02:00
Miss Islington (bot)
0c0fedf289
[3.13] gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069) (GH-134329)
gh-53189: Document peculiarities of InteractiveConsole in relation to pickle (GH-123069)

(cherry picked from commit a31bbc951a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2025-05-20 12:17:10 +00:00
Miss Islington (bot)
edf2de0178
[3.13] Clean up test_posixpath (GH-134315) (GH-134317)
* Ensure that created files and dirs are always removed after test.
  Now addCleanup() does not conflict with tearDown().
* Use os_helper.unlink() and os_helper.rmdir().
* Import TESTFN from os_helper.
(cherry picked from commit e29171bf8a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-20 08:15:29 +00:00
Miss Islington (bot)
783675e73f
[3.13] gh-133940: test_strftime incorrectly calculates expected week (GH-134281) (#134302)
gh-133940: test_strftime incorrectly calculates expected week (GH-134281)

Let the system determine the correct tm_wday and tm_isdst.
(cherry picked from commit e3dda8f818)

Co-authored-by: Gustaf <79180496+GGyll@users.noreply.github.com>
2025-05-20 01:17:22 +00:00
Miss Islington (bot)
edbde92a12
[3.13] gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288) (#134297)
gh-134201: Expand explanation of Base85 encodings in base64 docs (GH-134288)

Explain history of de-facto standard and how to pick between the two Base-85 encoding functions in the base-64 module.

---------
(cherry picked from commit 66aaad6103)

Co-authored-by: Alek Binion <aleksander.binion@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2025-05-20 00:05:26 +00:00
Miss Islington (bot)
da506b2560
[3.13] gh-117596: Add more tests for os.path with invalid paths (GH-134189) (GH-134266)
(cherry picked from commit 871d269875)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-19 18:41:37 +00:00
Miss Islington (bot)
c1e47702a2
[3.13] gh-125225: Fix column misalignment in help('topics') output (gh-125226) (#134226)
The 'help("topics")' output was misaligned due to "ASSIGNMENTEXPRESSIONS"
exceeding the implicit maximum default column width of 19 characters.

Reduced the number of columns from 4 to 3 in the listtopics()
function to allow more space for longer topic names.
(cherry picked from commit b22460c44d)

Co-authored-by: Étienne Pelletier <EtiennePelletier@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-19 17:34:31 +02:00
Miss Islington (bot)
08c9ba5b72
[3.13] gh-134097: Print number of refs & blocks after each statement in new REPL (gh-134136) (gh-134221)
(cherry picked from commit c31547a591)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2025-05-19 16:13:25 +02:00
Miss Islington (bot)
55a7cb1206
[3.13] gh-122055: Clarify documentation for empty matches in RE (GH-133169) (GH-134218)
(cherry picked from commit 44b73d3cd4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-19 16:49:29 +03:00
Peter Bierma
8d92823eca
[3.13] Docs: C API: Fix the incorrect PyThreadState_Swap documentation (#133900) 2025-05-19 18:24:00 +05:30
Serhiy Storchaka
06a8c0613e
[3.13] gh-133890: Handle UnicodeEncodeError in tarfile (GH-134147) (GH-134196)
UnicodeEncodeError is now handled the same way as OSError during
TarFile member extraction.
(cherry picked from commit 9983c7d441)
2025-05-19 10:37:36 +00:00
Miss Islington (bot)
ea9c9623f0
[3.13] gh-76023: Make os.path.realpath to ignore WinError 1005 in non-strict mode (GH-128328) (GH-134204)
(cherry picked from commit d55e11b804)

Co-authored-by: BecoKo <koev_v@yahoo.com>
2025-05-19 09:57:19 +00:00
Miss Islington (bot)
821a87e7a6
[3.13] gh-133889: Only show the path of the URL in the SimpleHTTPRequestHandler page (GH-134135) (GH-134191)
The query and fragment are ambiguous and not used.
(cherry picked from commit 5cbc8c632e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-05-18 22:16:56 +03:00
Miss Islington (bot)
018ec634f6
[3.13] document Py_VISIT as a macro in the docs (GH-133688) (#134187)
document `Py_VISIT` as a macro in the docs (GH-133688)
(cherry picked from commit bb32f3c698)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2025-05-18 16:36:04 +00:00
Miss Islington (bot)
9c297690d5
[3.13] fix indent in controlflow.rst docs (GH-134008) (#134185)
fix indent in `controlflow.rst` docs (GH-134008)
(cherry picked from commit 4ce91871a9)

Co-authored-by: Yongzi Li <1538321957@qq.com>
2025-05-18 16:27:09 +00:00
Miss Islington (bot)
523024499e
[3.13] gh-134100: Fix use-after-free in PyImport_ImportModuleLevelObject (GH-134117) (#134172)
gh-134100: Fix use-after-free in `PyImport_ImportModuleLevelObject` (GH-134117)
(cherry picked from commit 4e9005d32f)

Co-authored-by: Nico-Posada <102486290+Nico-Posada@users.noreply.github.com>
2025-05-18 20:38:28 +05:30
Thomas Grainger
fd6a602d04
[3.13] gh-133745: Fix asyncio task factory name/context kwarg breaks (#133948)
In 3.13.3 we accidentally broke the interface for custom task factory. Factory authors added workarounds.
This PR (for 3.13.4) unbreaks task factories that haven't made a workaround yet while also supporting those that have.

NOTE: The custom task factory API will change to what we accidentally released in 3.13.3.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2025-05-18 06:50:07 -07:00