]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
5 weeks ago[3.13] gh-150285: Fix too long docstrings in the curses module (GH-150286) (GH-150457...
Serhiy Storchaka [Tue, 26 May 2026 09:58:11 +0000 (12:58 +0300)] 
[3.13] gh-150285: Fix too long docstrings in the curses module (GH-150286) (GH-150457) (GH-150469)

(cherry picked from commit e7f1216204b3cd80d840c3e7726290a914c9a6f9)
(cherry picked from commit 4c0fe2d134f6ddaa4c705ffba073d9d5874b7fe4)

5 weeks ago[3.13] gh-150285: Fix too long docstrings in the decimal module (GH-150288) (GH-15046...
Miss Islington (bot) [Tue, 26 May 2026 09:49:41 +0000 (11:49 +0200)] 
[3.13] gh-150285: Fix too long docstrings in the decimal module (GH-150288) (GH-150460) (GH-150465)

(cherry picked from commit 9d79e71fb68d6a35d26d28d335b466465afaa165)
(cherry picked from commit 6bed57a3b659a34c4a7d75e76f4fe840f762bf7f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.13] gh-150443: Exclude explicit dup3 and pipe2 checks on iOS builds. (GH-150444...
Russell Keith-Magee [Tue, 26 May 2026 05:07:20 +0000 (13:07 +0800)] 
[3.13] gh-150443: Exclude explicit dup3 and pipe2 checks on iOS builds. (GH-150444) (#150448)

Exclude explicit dup3 and pipe2 checks on iOS builds.
(cherry picked from commit 629da5c914b4407e01c1dc06cbcbd8dce825fef3)

5 weeks ago[3.13] gh-80198: Improve test_pwd and test_grp (GH-150380) (GH-150398) (GH-150423)
Miss Islington (bot) [Mon, 25 May 2026 19:10:25 +0000 (21:10 +0200)] 
[3.13] gh-80198: Improve test_pwd and test_grp (GH-150380) (GH-150398) (GH-150423)

Fix tests for non-existing names and ids when getpwall()/getgrall()
don't return all users/groups.

Add tests for out-of-range uids, integer float ids, bytes names,
null-terminated names, names with surrogates, empty names, excessive
arguments.
(cherry picked from commit 4bdff2cc89dad8f3fa63b98dd12ba22a8b3eb6e0)
(cherry picked from commit 46e8f7a9e794bfb0fdc5ee82348623eb2b91a0b5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.13] gh-149156: Fix perf trampoline crash after fork (GH-150347) (#150393)
Miss Islington (bot) [Mon, 25 May 2026 18:19:07 +0000 (20:19 +0200)] 
[3.13] gh-149156: Fix perf trampoline crash after fork (GH-150347) (#150393)

5 weeks ago[3.13] gh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (GH-150323) (#150354)
Miss Islington (bot) [Mon, 25 May 2026 10:40:48 +0000 (12:40 +0200)] 
[3.13] gh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (GH-150323) (#150354)

gh-149449: Fix use-after-free in `_PyUnicode_GetNameCAPI` (GH-150323)
(cherry picked from commit 43c60ec2fddd316a4a6b7b6c68eae7cb66df0850)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
5 weeks ago[3.13] gh-145896: Fix typos and stale docstrings in the traceback module (GH-145897...
Miss Islington (bot) [Mon, 25 May 2026 10:07:38 +0000 (12:07 +0200)] 
[3.13] gh-145896: Fix typos and stale docstrings in the traceback module (GH-145897) (GH-150384)

(cherry picked from commit 832afeddcea78e40d39c47cd1893f8137e588e72)

Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
5 weeks ago[3.13] gh-110704: Recommend `distclean` target over `clean` when source tree is not...
Miss Islington (bot) [Sun, 24 May 2026 15:47:49 +0000 (17:47 +0200)] 
[3.13] gh-110704: Recommend `distclean` target over `clean` when source tree is not clean (GH-112610) (#150344)

gh-110704: Recommend `distclean` target over `clean` when source tree is not clean (GH-112610)

Recommend `distclean` target over `clean` when source tree is not clean
(cherry picked from commit 34631058f2aec6752ebfc50d40958b247532f536)

Co-authored-by: James <6125322+SnoopJ@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 weeks ago[3.13] gh-142516: fix reference leaks in `ssl.SSLContext` objects (GH-143685) (GH...
Bénédikt Tran [Sun, 24 May 2026 09:43:03 +0000 (11:43 +0200)] 
[3.13] gh-142516: fix reference leaks in `ssl.SSLContext` objects (GH-143685) (GH-145075) (#148371)

Cherry picked from commits 3a2a686cc45de2fb685ff332b7b914f27f660680
and 1decc7ee20cf6dce61e07cd8463ed87c1eb5fcd7 with minor amendments.

5 weeks ago[3.13] Document that `import sys.monitoring` raises `ModuleNotFoundError` (GH-148320...
Jonathan Dung [Sun, 24 May 2026 07:24:29 +0000 (15:24 +0800)] 
[3.13] Document that `import sys.monitoring` raises `ModuleNotFoundError` (GH-148320) (#148422)

5 weeks ago[3.13] gh-148450: abc.register needs to update type_version when tp_flags is changed...
Hai Zhu [Sat, 23 May 2026 11:50:16 +0000 (19:50 +0800)] 
[3.13] gh-148450: abc.register needs to update type_version when tp_flags is changed (GH-148623) (#150307)

5 weeks ago[3.13] gh-150178: Fix refcount leaks in hamt allocation failure paths (GH-150179...
Miss Islington (bot) [Sat, 23 May 2026 09:24:11 +0000 (11:24 +0200)] 
[3.13] gh-150178: Fix refcount leaks in hamt allocation failure paths (GH-150179) (#150301)

gh-150178: Fix refcount leaks in hamt allocation failure paths (GH-150179)
(cherry picked from commit 32823af153b76b7042fbce28ea8a6e0c3c4f1ca8)

Co-authored-by: pengyu lee <lipengyu@kylinos.cn>
5 weeks ago[3.13] gh-150232: update Thread group parameter doc (GH-150283) (#150299)
Miss Islington (bot) [Sat, 23 May 2026 08:34:15 +0000 (10:34 +0200)] 
[3.13] gh-150232: update Thread group parameter doc (GH-150283) (#150299)

gh-150232: update Thread group parameter doc (GH-150283)
(cherry picked from commit 82191c6d2cdacad6751262a40a44d2cd6d390977)

Co-authored-by: My-ABC <569817555@qq.com>
5 weeks ago[3.13] Remove 'expat' dependency for Linux in `Misc/Brewfile` (GH-150118) (#150254)
Miss Islington (bot) [Fri, 22 May 2026 14:28:10 +0000 (16:28 +0200)] 
[3.13] Remove 'expat' dependency for Linux in `Misc/Brewfile` (GH-150118) (#150254)

Co-authored-by: Brett Cannon <brett@python.org>
5 weeks ago[3.13] gh-149902: Remove dead packaging docs link and add a new section for external...
Miss Islington (bot) [Fri, 22 May 2026 11:45:31 +0000 (13:45 +0200)] 
[3.13] gh-149902: Remove dead packaging docs link and add a new section for external resources (GH-150030) (#150239)

Co-authored-by: Mia Albert <micha@2231puppy.tech>
Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
5 weeks ago[3.13] Replace deprecated action with RtD app (GH-149111) (#150234)
Miss Islington (bot) [Fri, 22 May 2026 11:08:42 +0000 (13:08 +0200)] 
[3.13] Replace deprecated action with RtD app (GH-149111) (#150234)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
5 weeks ago[3.13] gh-137571: Protect against possible UnboundLocalError in gzip._GzipReader...
Miss Islington (bot) [Fri, 22 May 2026 09:37:57 +0000 (11:37 +0200)] 
[3.13] gh-137571: Protect against possible UnboundLocalError in gzip._GzipReader.read() (GH-150222) (GH-150231)

This has not been observed in practice, but we cannot be 100% sure that
it will not happen with some weird gzip data.
(cherry picked from commit 28eac9a7263ad8dcfa9b536aa238549131857e0f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.13] gh-149995: Update typing.py docstrings and documentation (#150217)
Jelle Zijlstra [Fri, 22 May 2026 05:09:41 +0000 (22:09 -0700)] 
[3.13] gh-149995: Update typing.py docstrings and documentation (#150217)

Some of these docstrings read as if they were written when typing.py was
first written, and things have evolved since then.

A few motivations:
- Call protocols protocols instead of ABCs. They are also ABCs, but the fact
  they are protocols is more relevant to typing.
- Avoid recommending direct use of .__annotations__ and steer users to
  annotationlib instead.
- For TypedDict, mention NotRequired before total=False since it is more
  general and probably more frequently useful.
- For overloads, mention runtime use first instead of stub use. I think early on
  there was talk of allowing overload only in stubs, but it is now heavily used at
  runtime too and that's more likely to be relevant to users.
(cherry picked from commit f159419ae2ef1aebbd90ce9427b55e27738c960c)

5 weeks ago[3.13] gh-107398: Fix tarfile stream mode exception when process the file with the...
Miss Islington (bot) [Thu, 21 May 2026 19:38:54 +0000 (21:38 +0200)] 
[3.13] gh-107398: Fix tarfile stream mode exception when process the file with the gzip extra field (GH-126304) (GH-150201)

(cherry picked from commit 65f99329edf5d0df3ee14d9a242e1a4c8b842211)

Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.13] Fix minor typos in unicode.rst (GH-149587) (#150163)
Stan Ulbrych [Wed, 20 May 2026 15:37:06 +0000 (16:37 +0100)] 
[3.13] Fix minor typos in unicode.rst (GH-149587) (#150163)

(cherry picked from commit 4e97ff3351f381a61b238bd8e805e4e8dd3ea5cf)

Co-authored-by: Manoj K M <manojkmdev24@gmail.com>
5 weeks ago[3.13] gh-150146: Fix NULL dereference in `_Py_subs_parameters` (GH-150147) (#150155)
sobolevn [Wed, 20 May 2026 14:04:17 +0000 (17:04 +0300)] 
[3.13] gh-150146: Fix NULL dereference in `_Py_subs_parameters` (GH-150147) (#150155)

* [3.13] gh-150146: Fix NULL dereference in `_Py_subs_parameters` (GH-150147)
(cherry picked from commit f621ba16b72510e1abc9646a844a632df4ac275c)

Co-authored-by: sobolevn <mail@sobolevn.me>
5 weeks ago[3.13] gh-142831: Fix use-after-free in json encoder during re-entrant mutation ...
Shamil [Wed, 20 May 2026 03:33:22 +0000 (06:33 +0300)] 
[3.13] gh-142831: Fix use-after-free in json encoder during re-entrant mutation (gh-142851) (#150079)

gh-142831: Fix use-after-free in json encoder during re-entrant mutation (gh-142851)

User callbacks invoked during JSON encoding (e.g. the `default` callback or
a custom string encoder) can mutate or clear the dict or sequence being
encoded, invalidating borrowed references to items, keys, and values. Hold
strong references unconditionally while iterating.

(cherry picked from commit 235fa7244a0474c492ae98ee444529c7ba2a9047)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 weeks ago[3.13] gh-134887: Add references to `locale` module for locale-aware number formattin...
Miss Islington (bot) [Wed, 20 May 2026 00:55:24 +0000 (02:55 +0200)] 
[3.13] gh-134887: Add references to `locale` module for locale-aware number formatting references in `string` module docs (GH-134888) (GH-150122)

(cherry picked from commit 47723af4e74ae1a65108837fe15795e2f70f9d02)

Co-authored-by: Stefanie Molin <24376333+stefmolin@users.noreply.github.com>
6 weeks ago[3.13] gh-149983: Fix PyErr_NoMemory call without GIL in winconsoleio.c (GH-149984...
Miss Islington (bot) [Tue, 19 May 2026 21:11:28 +0000 (23:11 +0200)] 
[3.13] gh-149983: Fix PyErr_NoMemory call without GIL in winconsoleio.c (GH-149984) (GH-150112)

(cherry picked from commit 3d2aa899bad1c0e274640dc0c4323f1744e73435)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
6 weeks ago[3.13] gh-69619: Clarify whitespace definition in str.strip docs (GH-150021) (GH...
Miss Islington (bot) [Tue, 19 May 2026 21:07:20 +0000 (23:07 +0200)] 
[3.13] gh-69619: Clarify whitespace definition in str.strip docs (GH-150021) (GH-150047)

(cherry picked from commit 17eb17d43f66a0f7985fca05c7c9684bc01fabcd)

Co-authored-by: Daniil <d.mayorov@innopolis.university>
6 weeks ago[3.13] gh-149590: Remove faulthandler_traverse (GH-150023) (#150087)
Armaan Vakharia [Tue, 19 May 2026 15:04:13 +0000 (08:04 -0700)] 
[3.13] gh-149590: Remove faulthandler_traverse (GH-150023) (#150087)

`faulthandler_traverse` visits Python objects owned by `_PyRuntime`, not
by the module instance. With multi-phase init allowing multiple module
instances, each instance's GC traversal decrements `gc_refs` on the same
runtime-owned objects, driving it negative when two instances are
collected simultaneously.
(cherry picked from commit 56737483c2ffdaadfec648fd38d409c6b10941c0)

6 weeks ago[3.13] gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994) (GH...
Miss Islington (bot) [Tue, 19 May 2026 08:44:21 +0000 (10:44 +0200)] 
[3.13] gh-146581: Update docs for dangerous filenames in ZIP files (GH-149994) (GH-150066)

(cherry picked from commit ba0aca3bffce431fe2fbd53ca4cd6a717a2e2c19)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Sebastian Gassner <sebastian.gassner@gmail.com>
6 weeks ago[3.13] gh-95816: Fix TLS version range example in docs (GH-148574) (#150010)
Miss Islington (bot) [Mon, 18 May 2026 21:47:35 +0000 (23:47 +0200)] 
[3.13] gh-95816: Fix TLS version range example in docs (GH-148574) (#150010)

gh-95816: Fix TLS version range example in docs (GH-148574)

docs(ssl): Fix TLS version range example
(cherry picked from commit dbd8985e8262055ed091de9a72660b7c112a4ce7)

Co-authored-by: Jan Brasna <1784648+janbrasna@users.noreply.github.com>
6 weeks ago[3.13] gh-146211: Reject CR/LF in HTTP tunnel request headers (GH-146212) (#148343)
Miss Islington (bot) [Mon, 18 May 2026 17:44:36 +0000 (19:44 +0200)] 
[3.13] gh-146211: Reject CR/LF in HTTP tunnel request headers (GH-146212) (#148343)

gh-146211: Reject CR/LF in HTTP tunnel request headers (GH-146212)
(cherry picked from commit 05ed7ce7ae9e17c23a04085b2539fe6d6d3cef69)

Co-authored-by: Seth Larson <seth@python.org>
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
6 weeks ago[3.13] CI: Move Homebrew dependencies into Brewfile (GH-148335) (#149884)
Hugo van Kemenade [Mon, 18 May 2026 13:33:04 +0000 (16:33 +0300)] 
[3.13] CI: Move Homebrew dependencies into Brewfile (GH-148335) (#149884)

Co-authored-by: Brett Cannon <brett@python.org>
6 weeks ago[3.13] gh-149921: Fix reference leaks in _interpchannels and _interpqueues modules...
AN Long [Sun, 17 May 2026 13:36:32 +0000 (22:36 +0900)] 
[3.13] gh-149921: Fix reference leaks in _interpchannels and _interpqueues modules (GH-149922) (#149954)

(cherry picked from commit acefff95eab3db6b7cf837f3ce2707bbf9199376)

6 weeks ago[3.13] gh-149916: Restore the commented out part of test_body_encode in test_email...
Miss Islington (bot) [Sun, 17 May 2026 08:29:33 +0000 (10:29 +0200)] 
[3.13] gh-149916: Restore the commented out part of test_body_encode in test_email (GH-149917) (GH-149939)

(cherry picked from commit 1cbe035723698f15aa1b1af5deef615b28aae2e5)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 weeks ago[3.13] gh-134837: Correct and improve base85 documentation for base64 module (GH...
Miss Islington (bot) [Fri, 15 May 2026 18:36:47 +0000 (20:36 +0200)] 
[3.13] gh-134837: Correct and improve base85 documentation for base64 module (GH-145843) (GH-149743) (GH-149893)

(cherry picked from commit e667d62f114b54dcba17bdfad3835b9c91fda348)
(cherry picked from commit 9ad8a1b955033ebbf05456de2cfad85d1de2503d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: David Huggins-Daines <dhd@ecolingui.ca>
6 weeks ago[3.13] gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804...
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>
6 weeks 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)

6 weeks 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)

6 weeks 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>
6 weeks 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>
6 weeks 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>
6 weeks 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>
6 weeks 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>
6 weeks 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>
6 weeks 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>
6 weeks 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>
6 weeks 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>
6 weeks 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)

6 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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>
7 weeks 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 weeks 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>
7 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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)

8 weeks 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>
8 weeks 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)

8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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)

8 weeks 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)

8 weeks 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)

8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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>
8 weeks 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.

8 weeks 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>
8 weeks 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>
8 weeks 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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 months 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)

2 months 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>
2 months 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>
2 months 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>