]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 hours ago[3.13] gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804... 3.13
Miss Islington (bot) [Fri, 15 May 2026 12:08:50 +0000 (14:08 +0200)] 
[3.13] gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804) (GH-149872)

Like IBM00858, CP00858, IBM01140, CP01140.
(cherry picked from commit 20438866aefc2e63949d8bb85d8f8e55633fd977)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 hours ago[3.13] gh-149707: Fix compiler warning in _ctypes_test on strchr() (#149791) (#149867)
Victor Stinner [Fri, 15 May 2026 11:32:58 +0000 (13:32 +0200)] 
[3.13] gh-149707: Fix compiler warning in _ctypes_test on strchr() (#149791) (#149867)

gh-149707: Fix compiler warning in _ctypes_test on strchr() (#149791)

Change my_strchr() return type to "const char*" (add "const").

Fix the compiler warning:

Modules/_ctypes/_ctypes_test.c: In function 'my_strchr':
Modules/_ctypes/_ctypes_test.c:451:12: warning: return discards
'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  451 |     return strchr(s, c);
      |            ^~~~~~

When using C23, strchr(text, ch) return type is "const char*" if text
type is "const char*".

(cherry picked from commit 5465b69255890650df99debb8256e0a7bc68138b)

8 hours ago[3.13] gh-149763: Improve availablity docs in `select.rst` (GH-149764) (#149856)
sobolevn [Fri, 15 May 2026 07:33:33 +0000 (10:33 +0300)] 
[3.13] gh-149763: Improve availablity docs in `select.rst` (GH-149764) (#149856)

(cherry picked from commit 7e98debdf4bfcf1c3f592c9424bc654117c2723e)

22 hours ago[3.13] Link to existing rules in compound_stmts.rst (GH-149811) (GH-149838)
Miss Islington (bot) [Thu, 14 May 2026 17:34:29 +0000 (19:34 +0200)] 
[3.13] Link to existing rules in compound_stmts.rst (GH-149811) (GH-149838)

Link to existing rules in compound_stmts.rst (GH-149811)

In gh-138418, `!` was added to links to rules that don't exist in
the docs, in order to silence broken link warnings.
However, productionlist doesn't parse the `!`, which ends up in
the rendered documentation. (It's possible that gh-127835 broke
the `!` support.)

Replace the names with ones that appear in docs:

- `star_named_expression` in the grammar corresponds to
  `flexible_expression` in the docs
- `star_named_expressions` in the grammar corresponds to
  `flexible_expression_list` in the docs
- `named_expression` in the grammar corresponds to
  `assignment_expression` in the docs

Having two sets of names isn't great of course. Consolidating them
is tracked in (subissues of) gh-127833.
(cherry picked from commit c37529293d1e05081cb4e8668162c76583b88007)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
24 hours ago[3.13] gh-149698: Update bundled expat to 2.8.1 (GH-149699) (#149827)
Miss Islington (bot) [Thu, 14 May 2026 15:24:39 +0000 (17:24 +0200)] 
[3.13] gh-149698: Update bundled expat to 2.8.1 (GH-149699) (#149827)

(cherry picked from commit f1a47e79fb7081d3cde6364530bfa98240ebbe4c)

Co-authored-by: Stan Ulbrych <stan@python.org>
24 hours ago[3.13] gh-149017: Upgrade bundled Expat to 2.8.0 (GH-149020) (#149099)
Miss Islington (bot) [Thu, 14 May 2026 15:00:07 +0000 (17:00 +0200)] 
[3.13] gh-149017: Upgrade bundled Expat to 2.8.0 (GH-149020) (#149099)

(cherry picked from commit 005555a3f0ae20ee8154eb4ee172e1e355144c8c)

Co-authored-by: Stan Ulbrych <stan@python.org>
29 hours ago[3.13] gh-148821: Add more tests for invalid XML encodings (GH-149820) (GH-149823)
Miss Islington (bot) [Thu, 14 May 2026 10:34:45 +0000 (12:34 +0200)] 
[3.13] gh-148821: Add more tests for invalid XML encodings (GH-149820) (GH-149823)

(cherry picked from commit c6f7368157ecf9f2cdd537d8b6fad6e011bce344)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
43 hours ago[3.13] gh-128110: Fix rfc2047 whitespace handling in email parser address headers...
Miss Islington (bot) [Wed, 13 May 2026 20:29:07 +0000 (22:29 +0200)] 
[3.13] gh-128110: Fix rfc2047 whitespace handling in email parser address headers (GH-130749) (#149789)

RFC 2047 Section 6.2 requires that "any 'linear-white-space' that
separates a pair of adjacent 'encoded-word's is ignored." The modern
header value parser correctly implements that for unstructured headers,
but had missed a case in structured headers. This could cause a parsed
address header to include extraneous spaces in a display-name.

Switch to @bitdancer's fix from review feedback. Recharacterize space
between ews as fws after parsing in get_phrase.

RDM: This fix is dependent on the fact that "subsequent" atoms will never have
leading whitespace because that's been consumed already. I don't think
it's worth adding extra code for the possibility of leading whitespace
because the parser won't produce it. It's a bit of parser fragility in the
face of code changes, but I think that's a minor concern given the
parser design (which is that it consumes whitespace greedily)
(cherry picked from commit 7a4c6dfb8839eb05fb87baf70364680e45001dd4)

Co-authored-by: Mike Edmunds <medmunds@gmail.com>
Co-authored-by: R David Murray <rdmurray@bitdance.com>
45 hours ago[3.13] gh-87451: Apply CVE-2021-4189 PASV fix to ftplib.ftpcp() (GH-149648) (#149794)
Miss Islington (bot) [Wed, 13 May 2026 17:58:26 +0000 (19:58 +0200)] 
[3.13] gh-87451: Apply CVE-2021-4189 PASV fix to ftplib.ftpcp() (GH-149648) (#149794)

gh-87451: Apply CVE-2021-4189 PASV fix to ftplib.ftpcp() (GH-149648)

ftpcp() called parse227() directly and passed the source server's
self-reported PASV IPv4 address to the target server's PORT command,
bypassing the CVE-2021-4189 fix that was applied only to FTP.makepasv().
A malicious source FTP server could use this to redirect the target
server's data connection to an arbitrary host:port (SSRF).

ftpcp() now uses the source server's actual peer address, honoring the
existing trust_server_pasv_ipv4_address opt-out, the same as makepasv().

Thanks to Qi Ding at Aurascape AI for the report. (GHSA-w8c5-q2xf-gf7c)
(cherry picked from commit eac4fe3b2c77693790a5ef7dfab127c1fee81bf9)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2 days ago[3.13] gh-149776: Skip UDP Lite tests if it's not supported (GH-149777) (#149782)
Miss Islington (bot) [Wed, 13 May 2026 15:27:56 +0000 (17:27 +0200)] 
[3.13] gh-149776: Skip UDP Lite tests if it's not supported (GH-149777) (#149782)

gh-149776: Skip UDP Lite tests if it's not supported (GH-149777)

Fix test_socket on Linux kernel 7.1 and newer: skip UDP Lite tests if
it's not supported.
(cherry picked from commit 3cfc249e11a132dc69624150843779aa96c72b2b)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 days ago[3.13] Run mypy with four worker processes and uv (GH-149726) (GH-149774) (#149775)
Miss Islington (bot) [Wed, 13 May 2026 12:03:58 +0000 (14:03 +0200)] 
[3.13] Run mypy with four worker processes and uv (GH-149726) (GH-149774) (#149775)

[3.14] Run mypy with four worker processes and uv (GH-149726) (GH-149774)
(cherry picked from commit bb5a81a1ac62ee2b1f5c0ac1893c4c9c660a27a2)

(cherry picked from commit 6304eb1f5b93f682bff558befe4a7b9585f4601e)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 days ago[3.13] gh-148821: Add more strict tests for XML encodings (GH-149765) (GH-149772)
Miss Islington (bot) [Wed, 13 May 2026 11:05:06 +0000 (13:05 +0200)] 
[3.13] gh-148821: Add more strict tests for XML encodings (GH-149765) (GH-149772)

Exclude encodings like 'utf-8-sig', 'iso2022-jp' and 'hz' from the list of
supported encodings.
(cherry picked from commit fa2afa64d9467fb7362672ed603d29d8e246d240)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 days ago[3.13] gh-149701: Fully silence potential `hash -r` error (GH-149702) (GH-149759)
Miss Islington (bot) [Wed, 13 May 2026 08:22:02 +0000 (10:22 +0200)] 
[3.13] gh-149701: Fully silence potential `hash -r` error (GH-149702) (GH-149759)

(cherry picked from commit cd6096887e22cdb6d6365ad0eb5b0ffac50d4791)

2 days ago[3.13] gh-149574: Document that is_typeddict, is_protocol, is_dataclass, isclass...
Miss Islington (bot) [Wed, 13 May 2026 03:07:24 +0000 (05:07 +0200)] 
[3.13] gh-149574: Document that is_typeddict, is_protocol, is_dataclass, isclass return False for generic aliases (GH-149604) (#149752)

gh-149574: Document that is_typeddict, is_protocol, is_dataclass, isclass return False for generic aliases (GH-149604)
(cherry picked from commit a4e51c8dac9fdd49ae26ff8c6cd3c808fd8ba15e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 days ago[3.13] gh-145376: Fix various reference leaks (GH-145377) (#148661)
Stan Ulbrych [Tue, 12 May 2026 18:35:27 +0000 (19:35 +0100)] 
[3.13] gh-145376: Fix various reference leaks (GH-145377) (#148661)

(cherry picked from commit bd13cc09faaef01635aea85130f33aa8cbb8b177)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 days ago[3.13] Remove myself from CODEOWNERS (GH-149727) (#149734)
Hugo van Kemenade [Tue, 12 May 2026 16:20:25 +0000 (19:20 +0300)] 
[3.13] Remove myself from CODEOWNERS (GH-149727) (#149734)

(cherry picked from commit 058c12528d98954c44d6f92f2eea48b881c1967f)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
3 days ago[3.13] Update mypy to 2.1.0 (GH-149709) (#149713)
Miss Islington (bot) [Tue, 12 May 2026 09:06:58 +0000 (11:06 +0200)] 
[3.13] Update mypy to 2.1.0 (GH-149709) (#149713)

Update mypy to 2.1.0 (GH-149709)
(cherry picked from commit b546cc10f5c659344ce3cf49db6d9c92307ed1fc)

Co-authored-by: sobolevn <mail@sobolevn.me>
3 days ago[3.13] gh-148669: Clarify `__reduce__()` module lookup behavior (GH-148670) (#149705)
Miss Islington (bot) [Tue, 12 May 2026 02:52:36 +0000 (04:52 +0200)] 
[3.13] gh-148669: Clarify `__reduce__()` module lookup behavior (GH-148670) (#149705)

gh-148669: Clarify `__reduce__()` module lookup behavior (GH-148670)
(cherry picked from commit 54a5fd4126df74f7b84d1f8a6a36ef79803f66f9)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
3 days ago[3.13] gh-112821: Fix rlcompleter failures on objects with descriptors (GH-149577...
Miss Islington (bot) [Mon, 11 May 2026 16:08:20 +0000 (18:08 +0200)] 
[3.13] gh-112821: Fix rlcompleter failures on objects with descriptors (GH-149577) (#149658)

* gh-112821: Fix rlcompleter failures on objects with descriptors (GH-149577)

* gh-112821: Fix rlcompleter failures on objects with descriptors

* Confirm no accesses
(cherry picked from commit f23a1837d7156c4c478528321a423eae2b31e4bf)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
* Add missing import

---------

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Co-authored-by: Michael Droettboom <mdroettboom@nvidia.com>
4 days ago[3.13] gh-146061: Clarify indent=None in json docs (GH-146095) (GH-149669)
Miss Islington (bot) [Mon, 11 May 2026 11:38:56 +0000 (13:38 +0200)] 
[3.13] gh-146061: Clarify indent=None in json docs (GH-146095) (GH-149669)

(cherry picked from commit 833dae7c1fdc556200cbfc3e76bad4d54628042c)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
4 days ago[3.13] gh-149486: tarfile.data_filter: validate written link target (GH-149487) ...
Miss Islington (bot) [Mon, 11 May 2026 09:58:26 +0000 (11:58 +0200)] 
[3.13] gh-149486: tarfile.data_filter: validate written link target (GH-149487) (GH-149555)

* gh-149486: tarfile.data_filter: validate written link target (GH-149487)

The data filter rewrote linknames with normpath() but ran the
containment check against the un-normalised value, and computed a
symlink's directory before stripping trailing slashes.  Both let a
crafted archive create links pointing outside the destination.  Also
reject link members that resolve to the destination directory itself,
which could otherwise replace it with a symlink and redirect all
subsequent members.

(Patch by Greg; Petr's just reviewing & merging.)
(cherry picked from commit 578411982c16f753f4893532510099ef665117da)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
6 days ago[3.13] gh-149388: Make asyncio `PipeHandle.close` idempotent (GH-149518) (#149607)
Miss Islington (bot) [Sat, 9 May 2026 15:08:09 +0000 (17:08 +0200)] 
[3.13] gh-149388: Make asyncio `PipeHandle.close` idempotent (GH-149518) (#149607)

gh-149388: Make asyncio `PipeHandle.close` idempotent (GH-149518)
(cherry picked from commit 7241f2739c4bbdf4519238689e5e4ea9268b411e)

Co-authored-by: Max Schmitt <max@schmitt.mx>
6 days ago[3.13] gh-79638: Test other HTTP error codes besides 403 in test_robotparser (GH...
Miss Islington (bot) [Fri, 8 May 2026 20:46:14 +0000 (22:46 +0200)] 
[3.13] gh-79638: Test other HTTP error codes besides 403 in test_robotparser (GH-149569) (GH-149582)

Also, use urllib.request.urlcleanup() in NetworkTestCase.
(cherry picked from commit 57ef2199503387617b8af3d719c74089fb70dbd4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 days ago[3.13] gh-148390: fix undefined behavior of `memoryview(...).cast("?")` (GH-148454...
Miss Islington (bot) [Fri, 8 May 2026 15:50:00 +0000 (17:50 +0200)] 
[3.13] gh-148390: fix undefined behavior of `memoryview(...).cast("?")` (GH-148454) (GH-149299)

(cherry picked from commit 69e0a78e6edc3166c7a5b166955c0cefd1bacd5d)
(cherry picked from commit 454401c8e995dc15d5a096f35ff005746efcc915)

Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
7 days ago[3.13] docs: Clarify docs for error case of `PyDict_GetItemRef` (GH-149506) (#149548)
Miss Islington (bot) [Fri, 8 May 2026 11:06:11 +0000 (13:06 +0200)] 
[3.13] docs: Clarify docs for error case of `PyDict_GetItemRef` (GH-149506) (#149548)

docs: Clarify docs for error case of `PyDict_GetItemRef` (GH-149506)
(cherry picked from commit 3565d31690d30a189933bce7b27d0bd2c6973f47)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
9 days ago[3.13] gh-149096: Remove 'im_*' attribute reference from inspect module docstring...
Miss Islington (bot) [Wed, 6 May 2026 02:52:33 +0000 (04:52 +0200)] 
[3.13] gh-149096: Remove  'im_*' attribute reference from inspect module docstring (GH-149108) (#149440)

gh-149096: Remove  'im_*' attribute reference from inspect module docstring (GH-149108)

The im_class/func/self names were removed in 3.0.  The prefix appears nowhere else in inspect.py
and nowhere in inspect.rst.
(cherry picked from commit e4444538dcd60a1b655c620b4d3bba59a7830f25)

Co-authored-by: Vineet Kumar <108144301+whyvineet@users.noreply.github.com>
10 days ago[3.13] gh-149410: Test that `typing.NoDefault` is final (GH-149411) (#149420)
Miss Islington (bot) [Tue, 5 May 2026 15:22:48 +0000 (17:22 +0200)] 
[3.13] gh-149410: Test that `typing.NoDefault` is final (GH-149411) (#149420)

gh-149410: Test that `typing.NoDefault` is final (GH-149411)
(cherry picked from commit bad9296fb0424bc480fa0ecfd2d60f73c33358f5)

Co-authored-by: sobolevn <mail@sobolevn.me>
10 days ago[3.13] gh-149403: Fix `NameError` in `Lib/test/test_capi/test_getargs.py` (GH-149404...
Miss Islington (bot) [Tue, 5 May 2026 11:47:46 +0000 (13:47 +0200)] 
[3.13] gh-149403: Fix `NameError` in `Lib/test/test_capi/test_getargs.py` (GH-149404) (#149407)

gh-149403: Fix `NameError` in `Lib/test/test_capi/test_getargs.py` (GH-149404)
(cherry picked from commit 114781040c8ab033a164dbdefca71b69ba7fe2ed)

Co-authored-by: sobolevn <mail@sobolevn.me>
10 days ago[3.13] GH-130750: Restore quoting of choices in argparse error messag… (#149386)
Savannah Ostrowski [Mon, 4 May 2026 23:18:05 +0000 (16:18 -0700)] 
[3.13] GH-130750: Restore quoting of choices in argparse error messag… (#149386)

[3.13] GH-130750: Restore quoting of choices in argparse error messages to match documentation and improve clarity (GH-144983)
(cherry picked from commit 53a7f76501923059188922be231db855265fe9a4)

10 days ago[3.13] gh-149377: update bundled pip to 26.1.1 (GH-149378) (#149380)
Miss Islington (bot) [Mon, 4 May 2026 20:43:33 +0000 (22:43 +0200)] 
[3.13] gh-149377: update bundled pip to 26.1.1 (GH-149378) (#149380)

gh-149377: update bundled pip to 26.1.1 (GH-149378)
(cherry picked from commit de66149f66a365625a7a5fc194935b0f6d6862b9)

Co-authored-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
10 days ago[3.13] gh-138907: Support RFC 9309 in robotparser (GH-138908) (GH-149376)
Serhiy Storchaka [Mon, 4 May 2026 18:43:03 +0000 (21:43 +0300)] 
[3.13] gh-138907: Support RFC 9309 in robotparser (GH-138908) (GH-149376)

* empty lines are always ignored instead of separating groups
* the "user-agent" line after a rule starts a new group
* groups matching the same user agent are now merged
* the rule with the longest match wins instead of the first matching rule
* in case of equal matches, the “Allow” rule wins over “Disallow”
* special characters “$” and “*” are now supported in rules
* prefer full match for user agent

(cherry picked from commit bc285e583286c739e553e49c19fd946cb63432c7)

11 days ago[3.13] gh-137337: Clarify import statement namespace binding (GH-144607) (GH-149370)
Miss Islington (bot) [Mon, 4 May 2026 14:52:02 +0000 (16:52 +0200)] 
[3.13] gh-137337: Clarify import statement namespace binding (GH-144607) (GH-149370)

It is not always in the local namespace.
(cherry picked from commit b8ebd078f90007d48fcab85effadb33769cd080c)

Co-authored-by: Kit Dallege <xaum.io@gmail.com>
11 days ago[3.13] gh-148418: Fix a possible reference leak in a corrupted TYPE_CODE marshal...
Miss Islington (bot) [Mon, 4 May 2026 14:06:00 +0000 (16:06 +0200)] 
[3.13] gh-148418: Fix a possible reference leak in a corrupted TYPE_CODE marshal stream (GH-148419) (GH-149364)

(cherry picked from commit c3972f2795bf9270008d09dc6919b9735e20c606)

Co-authored-by: Wulian233 <1055917385@qq.com>
11 days ago[3.13] gh-87245: Improve IPv6Address.ipv4_mapped documentation (GH-92572) (#149361)
Miss Islington (bot) [Mon, 4 May 2026 13:10:17 +0000 (15:10 +0200)] 
[3.13] gh-87245: Improve IPv6Address.ipv4_mapped documentation (GH-92572) (#149361)

gh-87245: Improve IPv6Address.ipv4_mapped documentation (GH-92572)

Avoid the phrasing ‘starting with ::FFFF/96’, which is confusing since
it seems to mix a prefix and a range. Instead, make it clear what the
actual range is, and refer to the relevant RFC.

Closes GH-87245.
(cherry picked from commit 7aedd0a6c6ae3b5cdd601e84411e41c56f8d00b9)

Co-authored-by: wouter bolsterlee <wouter@bolsterl.ee>
11 days ago[3.13] gh-149351: Avoid possible broken macOS framework install names when DESTDIR...
Miss Islington (bot) [Mon, 4 May 2026 12:10:57 +0000 (14:10 +0200)] 
[3.13] gh-149351:  Avoid possible broken macOS framework install names when DESTDIR is specified during builds (GH-149352) (#149355)

(cherry picked from commit 1504bd671eebce0a99c15c113d219e0f344c03d9)

Co-authored-by: Ned Deily <nad@python.org>
11 days ago[3.13] gh-148093: Raise binascii.Error from binascii.a2b_uu() on empty input (GH...
Miss Islington (bot) [Mon, 4 May 2026 10:06:25 +0000 (12:06 +0200)] 
[3.13] gh-148093: Raise binascii.Error from binascii.a2b_uu() on empty input (GH-149077) (GH-149349)

Instead of reading past the end of the empty buffer.
(cherry picked from commit 0c6d2f64c0c83e7652760f770ff0c5cdc5040426)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
11 days ago[3.13] GH-146475: Block Apple Clang for building JIT stencils (#149188) (#149340)
Savannah Ostrowski [Mon, 4 May 2026 00:29:26 +0000 (17:29 -0700)] 
[3.13] GH-146475: Block Apple Clang for building JIT stencils (#149188) (#149340)

GH-146475: Block Apple Clang for building JIT stencils (#149188)

(cherry picked from commit c0e064003954142b4ba820dfe149f893227c4f11)

11 days ago[3.13] gh-149254: Update CI to use latest OpenSSL versions (GH-149336)
Zachary Ware [Sun, 3 May 2026 21:20:33 +0000 (16:20 -0500)] 
[3.13] gh-149254: Update CI to use latest OpenSSL versions (GH-149336)

(adapted from commit 68fe899feb8515113d09a4161f34ae45809b807a)

11 days ago[3.13] gh-149254: Update Windows builds to OpenSSL 3.0.20 (GH-149331)
Miss Islington (bot) [Sun, 3 May 2026 20:26:07 +0000 (22:26 +0200)] 
[3.13] gh-149254: Update Windows builds to OpenSSL 3.0.20 (GH-149331)

(cherry picked from commit 487ebb478adb88b3312c340b43e135887096c682)

11 days ago[3.13] gh-148663: Document that `calendar.IllegalMonthError` inherits from both ...
Miss Islington (bot) [Sun, 3 May 2026 16:42:39 +0000 (18:42 +0200)] 
[3.13] gh-148663: Document that `calendar.IllegalMonthError` inherits from both `ValueError` and `IndexError` (GH-148664) (#148918)

(cherry picked from commit 435be06dd25a5e4e19014340c4ba873d71051c4c)

Co-authored-by: Eoin Shaughnessy <45000144+EoinTrial@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
12 days ago[3.13] Ignore `/jit_unwind_info*.h` from git (GH-149311) (#149315)
Miss Islington (bot) [Sun, 3 May 2026 09:55:48 +0000 (11:55 +0200)] 
[3.13] Ignore `/jit_unwind_info*.h` from git (GH-149311) (#149315)

Ignore `/jit_unwind_info*.h` from git (GH-149311)
(cherry picked from commit db0335887e6acd1e2ef4382a52544b02971f52f0)

Co-authored-by: sobolevn <mail@sobolevn.me>
12 days ago[3.13] gh-149267: Document ast.Constant.kind attribute (GH-149268) (#149294)
Miss Islington (bot) [Sat, 2 May 2026 17:05:24 +0000 (19:05 +0200)] 
[3.13] gh-149267: Document ast.Constant.kind attribute (GH-149268) (#149294)

gh-149267: Document ast.Constant.kind attribute (GH-149268)

The kind attribute of ast.Constant was not mentioned in the
documentation. It is set to 'u' for u-prefixed string literals
and None for all other constants.

---------
(cherry picked from commit 3a1df787e1e630d3d57e99226604ddceb8c47229)

Co-authored-by: Anuj Nitin Bharambe <119653366+anujbharambe@users.noreply.github.com>
Co-authored-by: Anuj Bharambe <anujnitinb@gmail.com>
13 days ago[3.13] gh-111264: Add a note about untrusted input to tomllib docs (#149226)
Miss Islington (bot) [Sat, 2 May 2026 11:13:57 +0000 (13:13 +0200)] 
[3.13] gh-111264: Add a note about untrusted input to tomllib docs (#149226)

(cherry picked from commit 9d41e2a534aab460dd656ef251adaed5d2d64b93)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
13 days ago[3.13] gh-148914: Fix memoization of in-band PickleBuffer in the Python implementatio...
Miss Islington (bot) [Sat, 2 May 2026 11:11:15 +0000 (13:11 +0200)] 
[3.13] gh-148914: Fix memoization of in-band PickleBuffer in the Python implementation (GH-149052) (GH-149275)

Previously, identical PickleBuffers did not preserve identity.
Also, empty writable PickleBuffer memoized an empty bytearray object
in place of b'' which is a singleton in CPython, so the following
references to b'' were unpickled as an empty bytearray object.
(cherry picked from commit b89735625dff07005c31bdc86cbe7113ef1b59d0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
13 days ago[3.13] gh-149254: Bump OpenSSL version for Android. (#149273)
Russell Keith-Magee [Sat, 2 May 2026 08:51:21 +0000 (16:51 +0800)] 
[3.13] gh-149254: Bump OpenSSL version for Android. (#149273)

Bump OpenSSL version to 3.0.20 for Android.

13 days ago[3.13] gh-149254: Update macOS installer to use OpenSSL 3.0.20. (GH-149263) (#149265)
Miss Islington (bot) [Sat, 2 May 2026 04:10:49 +0000 (06:10 +0200)] 
[3.13] gh-149254: Update macOS installer to use OpenSSL 3.0.20. (GH-149263) (#149265)

(cherry picked from commit c2f494c806b0ad57415727a1fe87422a5754213a)

Co-authored-by: Ned Deily <nad@python.org>
13 days ago[3.13] gh-149117: Set `ImportError.name` on errors from `runpy.run_module`/`run_path...
Miss Islington (bot) [Sat, 2 May 2026 02:51:06 +0000 (04:51 +0200)] 
[3.13] gh-149117: Set `ImportError.name` on errors from `runpy.run_module`/`run_path` (gh-149159) (#149258)

gh-149117: Set `ImportError.name` on errors from `runpy.run_module`/`run_path` (gh-149159)

Set ImportError.name on errors from runpy.run_module/run_path

`runpy.run_module()` and `runpy.run_path()` now set the `name` attribute
of the `ImportError` they raise to the requested module name, matching
the behaviour of a regular import statement (previously `name` was
always `None`, which broke introspection).

The `name=` kwarg is gated on `issubclass(error, ImportError)` because
`_get_module_details()` is also used by `_run_module_as_main()` with
a private `_Error` sentinel class. `_Error` does not subclass
ImportError, and `BaseException.__init__` rejects unknown kwargs at
the C level, so passing `name=` unconditionally would break the
`python -m foo` codepath.
(cherry picked from commit ff35fe4633cc6d3a30f6af8281dfa641783c1d07)

Co-authored-by: W. H. Wang <mattwang44@gmail.com>
13 days ago[3.13] Fix source link in `Doc/howto/descriptor.rst` (GH-149215) (#149251)
Miss Islington (bot) [Fri, 1 May 2026 19:47:58 +0000 (21:47 +0200)] 
[3.13] Fix source link in `Doc/howto/descriptor.rst` (GH-149215) (#149251)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.13] gh-148518 fix index error in local part attribute (GH-148522) (#149199)
Miss Islington (bot) [Thu, 30 Apr 2026 22:13:27 +0000 (00:13 +0200)] 
[3.13] gh-148518 fix index error in local part attribute (GH-148522) (#149199)

As part of fixing bpo-27931 code was introduced to get_bare_quoted_string
that added an empty Terminal if the quoted string was empty.  This isn't
the best answer in terms of the parse tree; we really want the token
list to be empty in that case.  But having it be empty resulted in
local_part raising the index error.  We find that same problem if we
try to parse an address consisting of a single dquote.  By fixing
local_part to not raise on an empty token list, we can have the
bare_quoted_string code correctly return an empty token list for
the empty string cases (two dquotes or a single dquote as the
entire addrespec, at the end of a line).
(cherry picked from commit bdbb55c403d2ab6b4b0a3e994d21b623fee4a544)

Co-authored-by: R. David Murray <rdmurray@bitdance.com>
2 weeks ago[3.13] bpo-39100: _header_value_parser: do not treat a Group as invalid-mailbox ...
Miss Islington (bot) [Thu, 30 Apr 2026 18:15:43 +0000 (20:15 +0200)] 
[3.13] bpo-39100: _header_value_parser: do not treat a Group as invalid-mailbox (GH-24872) (#149192)

When an address in an address-list has garbage at the end, the code will
currently:

1. change the mailbox in the last parsed address into invalid-mailbox by
   overriding its token_type;
2. wrap the trailing garbage into another invalid-mailbox and append it
   to the last parsed address.

However, that does not take into account that an address may
also contain a Group instead of a single mailbox. In that case,
overwriting token_type leads to undesirable results, e.g. parsing an
email with the following 'To' header:

unlisted-recipients:; (no To-header on input)

raises an AttributeError from trying to treat the Group as a Mailbox.

Moreover it is questionable whether the previously parsed mailbox should
be treated as invalid in addition to the trailing garbage.

Address both of the above by wrapping the trailing garbage in a new
Address with a single invalid-mailbox, and append it to the AddressList
directly.

Changes the results of the
test_get_address_list_mailboxes_invalid_addresses test, where the
address list is now parsed into 4 mailboxes instead of 3 (all but the
first one are invalid).
(cherry picked from commit b413bc7a1f0946f734d9660239b4e2e8ddc48522)

Co-authored-by: elenril <anton@khirnov.net>
2 weeks ago[3.13] gh-135944: Add a "Runtime Components" Section to the Execution Model Docs...
Miss Islington (bot) [Thu, 30 Apr 2026 10:42:34 +0000 (12:42 +0200)] 
[3.13] gh-135944: Add a "Runtime Components" Section to the Execution Model Docs (gh-135945) (#139510)

* gh-135944: Add a "Runtime Components" Section to the Execution Model Docs (gh-135945)

The section provides a brief overview of the Python runtime's execution environment.  It is meant to be implementation agnostic,
(cherry picked from commit 46a1f0a9ff6e7cbea111dcb35e7aced1a7a3f3dc)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* concurrent.interpreters was added to Python 3.14

---------

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.13] gh-149148: Upgrade bundled pip to 26.1 (GH-149150) (#149155)
Miss Islington (bot) [Wed, 29 Apr 2026 14:53:55 +0000 (16:53 +0200)] 
[3.13] gh-149148: Upgrade bundled pip to 26.1 (GH-149150) (#149155)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.13] gh-97032: avoid test_squeezer crash on macOS buildbots (gh-115508) (GH-148141...
Miss Islington (bot) [Wed, 29 Apr 2026 10:01:04 +0000 (12:01 +0200)] 
[3.13] gh-97032: avoid test_squeezer crash on macOS buildbots (gh-115508) (GH-148141) (#148415)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Co-authored-by: Ned Deily <nad@python.org>
2 weeks ago[3.13] gh-148169: Fix webbrowser `%action` substitution bypass of dash-prefix check...
Miss Islington (bot) [Wed, 29 Apr 2026 10:00:10 +0000 (12:00 +0200)] 
[3.13] gh-148169: Fix webbrowser `%action` substitution bypass of dash-prefix check (GH-148170) (#148517)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.13] gh-140287: Handle `PYTHONSTARTUP` script exceptions in the asyncio REPL (GH...
Miss Islington (bot) [Wed, 29 Apr 2026 09:57:19 +0000 (11:57 +0200)] 
[3.13] gh-140287: Handle `PYTHONSTARTUP` script exceptions in the asyncio REPL (GH-140288) (#148988)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks ago[3.13] gh-149035: Modernize legacy Python patterns in `Doc/tutorial/stdlib2.rst`...
Miss Islington (bot) [Tue, 28 Apr 2026 05:16:36 +0000 (07:16 +0200)] 
[3.13] gh-149035: Modernize legacy Python patterns in `Doc/tutorial/stdlib2.rst` (GH-149036) (#149090)

Co-authored-by: ByteFlow <fakeshadow1337@gmail.com>
Co-authored-by: Copilot <copilot@github.com>
2 weeks ago[3.13] gh-148529: Minor improvements of the struct module documentation (GH-148565...
Serhiy Storchaka [Mon, 27 Apr 2026 20:22:47 +0000 (23:22 +0300)] 
[3.13] gh-148529: Minor improvements of the struct module documentation (GH-148565) (GH-149072)

* Document that 's' and 'p' accept bytes and bytearray.
* Fix some footnotes.
* Clarify that "string" is a byte string.
* Fix the module docstring.
(cherry picked from commit 3e5a3cb2bd222f97f793b01bc1c0f7bb62aefc31)

2 weeks ago[3.13] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windo...
Miss Islington (bot) [Mon, 27 Apr 2026 19:54:45 +0000 (21:54 +0200)] 
[3.13] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows (GH-146591) (GH-149065)

Use ZipFile.extractall() to sanitize file names and extract files.

Files with invalid names (e.g. absolute paths) are now skipped.

Files containing ".." in the name are no longer skipped.
(cherry picked from commit fc829e88753858c8ac669594bf0093f44948c0f4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.13] gh-82665 Mention that HTMLParser.handle_starttag value can be None (GH-134312...
Miss Islington (bot) [Mon, 27 Apr 2026 14:31:35 +0000 (16:31 +0200)] 
[3.13] gh-82665 Mention that HTMLParser.handle_starttag value can be None (GH-134312) (#149038)

gh-82665 Mention that HTMLParser.handle_starttag value can be None (GH-134312)

* Specify boolean attribute behavior in parser

* Tweak wording and example

* Fix backticks

---------
(cherry picked from commit 804c213c89366dd5ffa7feeb1bd4feccfee75b38)

Co-authored-by: Micah Najacht <micah.najacht@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.13] Document that multiprocessing treats local same-user processes as trusted...
Miss Islington (bot) [Mon, 27 Apr 2026 01:48:39 +0000 (03:48 +0200)] 
[3.13] Document that multiprocessing treats local same-user processes as trusted (GH-149001) (#149034)

Document that multiprocessing treats local same-user processes as trusted (GH-149001)

Clarify in the Authentication keys section that the authkey handshake
covers Listener/Client (addressable endpoints) only, not the anonymous
pipes behind Pipe() and Queue, and that isolation between same-user
processes must be arranged at the OS level.
(cherry picked from commit f27e91e37212f148b8fe72a3656a69b242625622)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2 weeks ago[3.13] gh-105936: Properly update closure cells for __setattr__ and __delattr__ in...
Gregory P. Smith [Sun, 26 Apr 2026 05:55:20 +0000 (22:55 -0700)] 
[3.13] gh-105936: Properly update closure cells for __setattr__ and __delattr__ in frozen dataclasses with slots (GH-144021) (GH-148476)

gh-105936: Properly update closure cells for `__setattr__` and `__delattr__` in frozen dataclasses with slots (GH-144021)
(cherry picked from commit 8a398bfbbc6769f6cabb3177702e7a506e203d61)

The cherry-pick required additional changes beyond the original commit
because 3.13 lacks the `__class__` closure cell fixup machinery that
was added in 3.14 by GH-124455 (gh-90562). Specifically:

- Backported `_update_func_cell_for__class__()` helper function and the
  closure fixup loop in `_add_slots()` from GH-124455. Without these,
  renaming the closure variable from `cls` to `__class__` has no effect
  because nothing updates the cell when the class is recreated with slots.
- Changed `_add_slots()` to use `newcls` instead of reusing `cls` for the
  recreated class, so both old and new class references are available for
  the fixup loop.
- Replaced `assertNotHasAttr` with `assertFalse(hasattr(...))` in tests
  (assertNotHasAttr was added in 3.14).
- Dropped `test_original_class_is_gced` additions (that test does not
  exist on 3.13; it was added by GH-137047 for gh-135228 which was not
  backported to 3.13).

gh-148947: dataclasses: fix error on empty __class__ cell  (GH-148948)

Also add a test demonstrating the need for the existing "is oldcls" check.
(cherry picked from commit 6d7bbee1d5714a345dca5a7e4089de3c2fc0fb59)

---------

Co-authored-by: Prometheus3375 <prometheus3375@gmail.com>
Co-authored-by: Sviataslau <35541026+Prometheus3375@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks ago[3.13] gh-141473: Speed up subprocess test_communicate_timeout_large_input long tail...
Miss Islington (bot) [Sun, 26 Apr 2026 04:27:03 +0000 (06:27 +0200)] 
[3.13] gh-141473: Speed up subprocess test_communicate_timeout_large_input long tail (GH-149003) (#149005)

gh-141473: Speed up subprocess test_communicate_timeout_large_input long tail (GH-149003)

gh-141473: Speed up test_communicate_timeout_large_input

Replace the slow reader's 30s sleep with a parent-driven wake over a
loopback socket so post-timeout communicate() doesn't block waiting
for the child to wake on its own. Worst-case runtime: ~30s -> <1s.
(cherry picked from commit e1384cfd25b4fba5e0f8f3e6b536930e2e6cf5cf)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2 weeks ago[3.13] gh-148973: fix segfault on mismatch between consts size and oparg in compiler...
Irit Katriel [Sat, 25 Apr 2026 21:59:40 +0000 (22:59 +0100)] 
[3.13] gh-148973: fix segfault on mismatch between consts size and oparg in compiler (GH-148974) (#148997)

2 weeks ago[3.13] gh-148735: Fix a UAF in `Element.findtext()` (GH-148738) (#148923)
Stan Ulbrych [Sat, 25 Apr 2026 09:38:14 +0000 (10:38 +0100)] 
[3.13] gh-148735: Fix a UAF in `Element.findtext()` (GH-148738) (#148923)

(cherry picked from commit 0469e6d38dcb3ff904690028cb3a25155bdcedae)

3 weeks ago[3.13] gh-132631: Fix "I/O operation on closed file" when parsing JSON Lines file...
Miss Islington (bot) [Thu, 23 Apr 2026 19:30:13 +0000 (21:30 +0200)] 
[3.13] gh-132631: Fix "I/O operation on closed file" when parsing JSON Lines file (GH-132632) (#148922)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
3 weeks ago[3.13] gh-148484: Fix memory leak of iterator in array.array constructor (GH-148523...
Miss Islington (bot) [Thu, 23 Apr 2026 14:00:47 +0000 (16:00 +0200)] 
[3.13] gh-148484: Fix memory leak of iterator in array.array constructor (GH-148523) (GH-148679)

(cherry picked from commit afde75664eb3ff3e147806f027c9da54c7eb77d4)

Co-authored-by: Gleb Popov <gvpopov.dev@gmail.com>
3 weeks ago[3.13] gh-90309: Base64-encode cookie values embedded in JS (GH-148888)
Miss Islington (bot) [Thu, 23 Apr 2026 13:05:17 +0000 (15:05 +0200)] 
[3.13] gh-90309: Base64-encode cookie values embedded in JS (GH-148888)

(cherry picked from commit 76b3923d688c0efc580658476c5f525ec8735104)

Co-authored-by: Seth Larson <seth@python.org>
3 weeks ago[3.13] gh-142965: Fix Concatenate documentation to reflect valid use cases (GH-143316...
Miss Islington (bot) [Thu, 23 Apr 2026 02:57:40 +0000 (04:57 +0200)] 
[3.13] gh-142965: Fix Concatenate documentation to reflect valid use cases (GH-143316) (#148900)

The documentation previously stated that Concatenate is only valid
when used as the first argument to Callable, but according to PEP 612,
it can also be used when instantiating user-defined generic classes
with ParamSpec parameters.
(cherry picked from commit 75ff1afcb6a1bb2b3d54899e9b222a61798fa491)

Co-authored-by: John Seong <39040639+sandole@users.noreply.github.com>
3 weeks ago[3.13] gh-146553: Fix infinite loop in typing.get_type_hints() on circular __wrapped_...
Miss Islington (bot) [Thu, 23 Apr 2026 02:55:40 +0000 (04:55 +0200)] 
[3.13] gh-146553: Fix infinite loop in typing.get_type_hints() on circular __wrapped__ (GH-148595) (#148896)

(cherry picked from commit be833e658aaf6703b0dd0c0dadb893d72cbe4c77)

Co-authored-by: Shamil <ashm.tech@proton.me>
3 weeks ago[3.13] gh-145194: Fix typing in re tokenizer example (GH-145198) (#148898)
Miss Islington (bot) [Thu, 23 Apr 2026 02:46:31 +0000 (04:46 +0200)] 
[3.13] gh-145194: Fix typing in re tokenizer example (GH-145198) (#148898)

(cherry picked from commit bd7352d8071dc00531f2c527977602729f2d3ec6)

Co-authored-by: Vikash Kumar <163628932+Vikash-Kumar-23@users.noreply.github.com>
3 weeks ago[3.13] gh-148820: Fix _PyRawMutex use-after-free on spurious semaphore wakeup (gh...
Sam Gross [Wed, 22 Apr 2026 18:56:24 +0000 (14:56 -0400)] 
[3.13] gh-148820: Fix _PyRawMutex use-after-free on spurious semaphore wakeup (gh-148852) (#148885)

_PyRawMutex_UnlockSlow CAS-removes the waiter from the list and then
calls _PySemaphore_Wakeup, with no handshake. If _PySemaphore_Wait
returns Py_PARK_INTR, the waiter can destroy its stack-allocated
semaphore before the unlocker's Wakeup runs, causing a fatal error from
ReleaseSemaphore / sem_post.

Loop in _PyRawMutex_LockSlow until _PySemaphore_Wait returns Py_PARK_OK,
which is only signalled when a matching Wakeup has been observed.

Also include GetLastError() and the handle in the Windows fatal messages
in _PySemaphore_Init, _PySemaphore_Wait, and _PySemaphore_Wakeup to make
similar races easier to diagnose in the future.

(cherry picked from commit ad3c5b7958b890382f431a53349320cb7c84d405)

3 weeks ago[3.13] gh-148808: Add boundary check to asyncio.AbstractEventLoop.sock_recvf… (GH...
Miss Islington (bot) [Tue, 21 Apr 2026 16:26:37 +0000 (18:26 +0200)] 
[3.13] gh-148808: Add boundary check to asyncio.AbstractEventLoop.sock_recvf… (GH-148809) (#148836)

gh-148808: Add boundary check to asyncio.AbstractEventLoop.sock_recvf… (GH-148809)
(cherry picked from commit 1274766d3c29007ab77245a72abbf8dce2a9db4d)

Co-authored-by: Seth Larson <seth@python.org>
3 weeks ago[3.13] Docs: Fix some typos in `calendar.rst` (GH-148756) (GH-148796)
Miss Islington (bot) [Mon, 20 Apr 2026 14:43:55 +0000 (16:43 +0200)] 
[3.13] Docs: Fix some typos in `calendar.rst` (GH-148756) (GH-148796)

Docs: Fix some typos in `calendar.rst` (GH-148756)
(cherry picked from commit 983c7462d65abc82d80345aa4769c1907522f310)

Co-authored-by: Manoj K M <manojkmdev24@gmail.com>
3 weeks ago[3.13] gh-148763: Fix paramter name in `multiprocessing.connection.send_bytes/recv_by...
Miss Islington (bot) [Mon, 20 Apr 2026 00:12:30 +0000 (02:12 +0200)] 
[3.13] gh-148763: Fix paramter name in `multiprocessing.connection.send_bytes/recv_bytes_into` docs (GH-126603) (#148787)

gh-148763: Fix paramter name in `multiprocessing.connection.send_bytes/recv_bytes_into` docs (GH-126603)
(cherry picked from commit e50acef0b2c2057874a9eec98c37ca6cf8ee98e1)

Doc: Fix buf argument name in multiprocessing connection send_bytes

Co-authored-by: Matthew Davis <7035647+mdavis-xyz@users.noreply.github.com>
3 weeks ago[3.13] gh-148779: Update Briefcase link in android.rst documentation (GH-148777)...
Miss Islington (bot) [Sun, 19 Apr 2026 21:50:45 +0000 (23:50 +0200)] 
[3.13] gh-148779: Update Briefcase link in android.rst documentation (GH-148777) (#148781)

Use canonical beeware.org URL for link to Briefcase.
(cherry picked from commit 82767780f8de2fc492567ceb6a590101ae3b19ad)

Co-authored-by: partev <petrosyan@gmail.com>
3 weeks ago[3.13] gh-121946: Use clang-20 for TSan build (GH-148570) (#148754)
Miss Islington (bot) [Sun, 19 Apr 2026 15:39:04 +0000 (17:39 +0200)] 
[3.13] gh-121946: Use clang-20 for TSan build (GH-148570) (#148754)

Co-authored-by: Sam Gross <colesbury@gmail.com>
3 weeks ago[3.13] Prevent GitHub's web conflict editor from converting LF to CRLF (GH-148739...
Miss Islington (bot) [Sun, 19 Apr 2026 09:44:16 +0000 (11:44 +0200)] 
[3.13] Prevent GitHub's web conflict editor from converting LF to CRLF (GH-148739) (#148749)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
3 weeks ago[3.13] gh-148222: Fix NULL dereference bugs in genericaliasobject.c (GH-148226) ...
Prakash Sellathurai [Sat, 18 Apr 2026 14:54:21 +0000 (20:24 +0530)] 
[3.13] gh-148222: Fix NULL dereference bugs in genericaliasobject.c (GH-148226) (#148717)

(cherry picked from commit 634568d030f18183212c01bd4544aa7f97e05442)

3 weeks ago[3.13] gh-148653: Fix reference leaks in test_marshal introduced in gh-148698 (GH...
Miss Islington (bot) [Sat, 18 Apr 2026 12:34:25 +0000 (14:34 +0200)] 
[3.13] gh-148653: Fix reference leaks in test_marshal introduced in gh-148698 (GH-148725) (GH-148728)

(cherry picked from commit 7ce737ea11919aebf7eef174f910759e74d0ea50)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.13] gh-148653: Fix some marshal errors related to recursive code objects (GH-14869...
Serhiy Storchaka [Sat, 18 Apr 2026 09:29:38 +0000 (12:29 +0300)] 
[3.13] gh-148653: Fix some marshal errors related to recursive code objects (GH-148698) (GH-148711) (GH-148713)

(cherry picked from commit d496c637a3dac2cc5d51aa4a7ebd9a740143a719)

Forbid marshalling recursive code objects which
cannot be correctly unmarshalled.
Add multiple tests for recursive data structures.
(cherry picked from commit 2e37d836411e99cff7bb341ba14be5ea95fac08c)

4 weeks ago[3.13] gh-148535: Don't use gcc -fprofile-update=atomic flag on i686 (#148554) (...
Victor Stinner [Thu, 16 Apr 2026 17:50:27 +0000 (19:50 +0200)] 
[3.13] gh-148535: Don't use gcc -fprofile-update=atomic flag on i686 (#148554) (#148656)

gh-148535: Don't use gcc -fprofile-update=atomic flag on i686 (#148554)

The -fprofile-update=atomic flag was added to fix a random GCC
internal error on PGO build (gh-145801) caused by corruption of
profile data (.gcda files). The problem is that it makes the PGO
build way slower (up to 47x slower) on i686. Since the GCC internal
error was not seen on i686 so far, don't use -fprofile-update=atomic
on i686.

(cherry picked from commit 2faceeec5c0fb06498a9654d429180ac4610c65a)

4 weeks ago[3.13] gh-100305: Deemphasize that `ast.literal_eval` is safe in `eval` documentation...
Miss Islington (bot) [Wed, 15 Apr 2026 16:15:31 +0000 (18:15 +0200)] 
[3.13] gh-100305: Deemphasize that `ast.literal_eval` is safe in `eval` documentation (GH-100326) (#148421)

(cherry picked from commit b3b0cef0c2aacdc616fa48674552ab1e34553835)

Co-authored-by: Ram Vikram Singh <ramvikrams243@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
4 weeks ago[3.13] Docs: Use bash lexer for http.server CLI commands, not Python (GH-148612)...
Hugo van Kemenade [Wed, 15 Apr 2026 16:01:04 +0000 (19:01 +0300)] 
[3.13] Docs: Use bash lexer for http.server CLI commands, not Python (GH-148612) (#148621)

4 weeks ago[3.13] gh-146333: Fix quadratic regex backtracking in configparser option parsing...
Petr Viktorin [Wed, 15 Apr 2026 10:11:10 +0000 (12:11 +0200)] 
[3.13] gh-146333: Fix quadratic regex backtracking in configparser option parsing (GH-146399) (GH-148559)

Use negative lookahead in option regex to prevent backtracking, and to avoid changing logic outside the regexes (since people could use the regex directly).
(cherry picked from commit 7e0a0be4097f9d29d66fe23f5af86f18a34ed7dd)

Co-authored-by: Joshua Swanson <22283299+joshuaswanson@users.noreply.github.com>
4 weeks ago[3.13] tiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580...
Miss Islington (bot) [Wed, 15 Apr 2026 00:06:49 +0000 (02:06 +0200)] 
[3.13] tiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580) (#148582)

tiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580)

pair of minor doc typo fixes
(cherry picked from commit 236aa0a4e2106f98757e12a9f656f98d91f03c13)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
4 weeks ago[3.13] gh-137335: remove a mktemp use in multiprocessing.connection to avoid security...
Miss Islington (bot) [Wed, 15 Apr 2026 00:06:33 +0000 (02:06 +0200)] 
[3.13] gh-137335: remove a mktemp use in multiprocessing.connection to avoid security scanner noise (GH-148578) (#148584)

gh-137335: remove a mktemp use in multiprocessing.connection to avoid security scanner noise (GH-148578)

remove a mktemp use to avoid security scanner noise
(cherry picked from commit fd81246bd55e4fab1976a7cca3e5d42582dbdac0)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
4 weeks ago[3.13] gh-148186: Improve `assertCountEqual` description in docs. (GH-148463) (#148586)
Miss Islington (bot) [Tue, 14 Apr 2026 23:45:32 +0000 (01:45 +0200)] 
[3.13] gh-148186: Improve `assertCountEqual` description in docs. (GH-148463) (#148586)

gh-148186: Improve `assertCountEqual` description in docs. (GH-148463)
(cherry picked from commit 94d42bf5c2b95417d6187a57fef94570ba017e33)

Co-authored-by: Kliment Lamonov <klimentlamonov@yandex.ru>
4 weeks ago[3.13] gh-72406: Document argument ordering in argparse help output (GH-148534) ...
Savannah Ostrowski [Tue, 14 Apr 2026 17:53:11 +0000 (10:53 -0700)] 
[3.13] gh-72406: Document argument ordering in argparse help output (GH-148534) (#148567)

gh-72406: Document argument ordering in argparse help output (#148534)

(cherry picked from commit 4286227308ee8dafc867062df4cad73af2a84696)

Co-authored-by: Santi Hernandez <santi@santihdzs.com>
4 weeks ago[3.13] gh-148192: Fix Generator._make_boundary behavior with CRLF line endings. ...
Miss Islington (bot) [Tue, 14 Apr 2026 16:21:55 +0000 (18:21 +0200)] 
[3.13] gh-148192: Fix Generator._make_boundary behavior with CRLF line endings. (GH-148193) (#148549)

The Generator._make_boundary regex did not match on boundary phrases correctly when using CRLF line endings due to re.MULTILINE not considering \r\n as a line ending.
(cherry picked from commit 4af46b4ab5af49d8df034320a9a70fcbb062f7cf)

Co-authored-by: Henry Jones <44321887+henryivesjones@users.noreply.github.com>
4 weeks ago[3.13] gh-148487: Fix issues in `test_add_python_opts` (#148507) (#148546)
Victor Stinner [Tue, 14 Apr 2026 10:08:32 +0000 (12:08 +0200)] 
[3.13] gh-148487: Fix issues in `test_add_python_opts` (#148507) (#148546)

gh-148487: Fix issues in `test_add_python_opts` (#148507)

(cherry picked from commit 44f1b987ed1908185d8021fd31703b2dd4d97e82)

Co-authored-by: Stan Ulbrych <stan@python.org>
4 weeks ago[3.13] gh-148508: Add resilience to SSL preauth tests on iOS (GH-148536) (#148540)
Miss Islington (bot) [Tue, 14 Apr 2026 03:54:43 +0000 (05:54 +0200)] 
[3.13] gh-148508: Add resilience to SSL preauth tests on iOS (GH-148536) (#148540)

Adds handling for a test case seen in the iOS SSL tests where an SSL connection fails to
handshake correctly.
(cherry picked from commit c40e8b016a90820e4d799922903b90a505ffaf55)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
4 weeks ago[3.13] gh-148370: prevent quadratic behavior in `configparser.ParsingError.combine...
Miss Islington (bot) [Mon, 13 Apr 2026 23:05:38 +0000 (01:05 +0200)] 
[3.13] gh-148370: prevent quadratic behavior in `configparser.ParsingError.combine` (GH-148452) (#148533)

gh-148370: prevent quadratic behavior in `configparser.ParsingError.combine` (GH-148452)
(cherry picked from commit 2662db0c45aa16232136628457a53681b6683c25)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 weeks ago[3.13] gh-146139: Disable `socketpair` authentication on WASI (GH-146140) (#148527)
Miss Islington (bot) [Mon, 13 Apr 2026 21:30:52 +0000 (23:30 +0200)] 
[3.13] gh-146139: Disable `socketpair` authentication on WASI (GH-146140) (#148527)

gh-146139: Disable `socketpair` authentication on WASI (GH-146140)

Calling `connect(2)` on a non-blocking socket on WASI may leave the socket in a
"connecting" but not yet "connected" state.  In the former case, calling
`getpeername(2)` on it will fail, leading to an unhandled exception in Python.
(cherry picked from commit a5b76d53bb29afd864243f44ef22968f6385dfa0)

Co-authored-by: Joel Dice <joel.dice@akamai.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Brett Cannon <brett@python.org>
4 weeks ago[3.13] InternalDocs: Correct struct path for latin1 singletons in `string_interning...
Miss Islington (bot) [Mon, 13 Apr 2026 18:52:47 +0000 (20:52 +0200)] 
[3.13] InternalDocs: Correct struct path for latin1 singletons in `string_interning.md` (GH-148358) (#148491)

(cherry picked from commit 0274d8304e5eec23de100d827eb4da06ab7fd8aa)

Co-authored-by: Stan Ulbrych <stan@python.org>
4 weeks ago[3.13] Fix "encodings" typo in argparse.FileType documentation (GH-148502) (#148514)
Miss Islington (bot) [Mon, 13 Apr 2026 18:34:05 +0000 (20:34 +0200)] 
[3.13] Fix "encodings" typo in argparse.FileType documentation (GH-148502) (#148514)

Fix "encodings" typo in argparse.FileType documentation (GH-148502)
(cherry picked from commit 8ecb6b8b0cff4105c4cca408409fb7a2fadc8b77)

Co-authored-by: Gleb Popov <gvpopov.dev@gmail.com>
4 weeks ago[3.13] gh-148395: Fix a possible UAF in `{LZMA,BZ2,_Zlib}Decompressor` (GH-148396...
Miss Islington (bot) [Mon, 13 Apr 2026 01:35:24 +0000 (03:35 +0200)] 
[3.13] gh-148395: Fix a possible UAF in `{LZMA,BZ2,_Zlib}Decompressor` (GH-148396) (#148479)

gh-148395: Fix a possible UAF in `{LZMA,BZ2,_Zlib}Decompressor` (GH-148396)

Fix dangling input pointer after `MemoryError` in _lzma/_bz2/_ZlibDecompressor.decompress
(cherry picked from commit 8fc66aef6d7b3ae58f43f5c66f9366cc8cbbfcd2)

Co-authored-by: Stan Ulbrych <stan@python.org>
4 weeks ago[3.13] tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345...
Miss Islington (bot) [Mon, 13 Apr 2026 01:13:53 +0000 (03:13 +0200)] 
[3.13] tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345) (#148411)

tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345)

test_interpreters: use errno.EBADF instead of hardcoded number in _close_file()

Replace the hardcoded `9` check in `Lib/test/test_interpreters/utils.py` with `errno.EBADF`.

Using `errno.EBADF` makes the helper portable across platforms with different errno numbering while preserving the intended behavior.
(cherry picked from commit cef334fd4c4c24a542ce81ad940b1426b5a7cdbd)

Co-authored-by: Artem Yarulin <artem.yarulin@kapteko.com>
4 weeks ago[3.13] gh-146450: Ensure Android gradle build uses custom cross-build dir (GH-148319...
Miss Islington (bot) [Mon, 13 Apr 2026 01:13:37 +0000 (03:13 +0200)] 
[3.13] gh-146450: Ensure Android gradle build uses custom cross-build dir (GH-148319) (#148471)

Ensures that the testbed's Gradle configuration uses the cross-build environment
variable, and that variable is passed to Gradle by the cross-build script.
(cherry picked from commit b29afe62f7236f7161c2670dccc24368217a7fb1)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Malcolm Smith <smith@chaquo.com>
4 weeks ago[3.13] gh-146313: Fix multiprocessing ResourceTracker deadlock after os.fork() (GH...
Miss Islington (bot) [Sun, 12 Apr 2026 17:08:36 +0000 (19:08 +0200)] 
[3.13] gh-146313: Fix multiprocessing ResourceTracker deadlock after os.fork() (GH-146316) (#148426)

gh-146313: Fix multiprocessing ResourceTracker deadlock after os.fork() (GH-146316)

`ResourceTracker.__del__` (added in gh-88887 circa Python 3.12) calls
os.waitpid(pid, 0) which blocks indefinitely if a process created via os.fork()
still holds the tracker pipe's write end. The tracker never sees EOF, never
exits, and the parent hangs at interpreter shutdown.

Fix with two layers:

- **At-fork handler.** An os.register_at_fork(after_in_child=...)
  handler closes the inherited pipe fd in the child unless a preserve
  flag is set. popen_fork.Popen._launch() sets the flag before its
  fork so mp.Process(fork) children keep the fd and reuse the parent's
  tracker (preserving gh-80849). Raw os.fork() children close the fd,
  letting the parent reap promptly.

- **Timeout safety-net.** _stop_locked() gains a wait_timeout
  parameter. When called from `__del__`, it polls with WNOHANG using
  exponential backoff for up to 1 second instead of blocking
  indefinitely. The at-fork handler makes this unreachable in
  well-behaved paths; it remains for abnormal shutdowns.
(cherry picked from commit 3a7df632c96eb6c5de12fac08d1da42df9e25334)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Itamar Oren <itamarost@gmail.com>
4 weeks ago[3.13] gh-147965: Add shutdown() to multiprocessing.Queue excluded methods (GH-147970...
Miss Islington (bot) [Sun, 12 Apr 2026 00:52:32 +0000 (02:52 +0200)] 
[3.13] gh-147965: Add shutdown() to multiprocessing.Queue excluded methods (GH-147970) (#148417)

gh-147965: Add shutdown() to multiprocessing.Queue excluded methods (GH-147970)

The multiprocessing.Queue documentation states it implements all
methods of queue.Queue except task_done() and join(). Since
queue.Queue.shutdown() was added in Python 3.13,
multiprocessing.Queue also does not implement it. Update the docs
to include shutdown() in the list of excluded methods.
(cherry picked from commit 22290ed011a8ac4060390e57f53053ab932fb3f3)

Co-authored-by: WYSIATI <chester.lee.cold@gmail.com>