]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Sun, 31 May 2026 07:27:33 +0000 (09:27 +0200)]
[3.13] gh-117291: Explain usage of null bytes in Array(c_char).value (GH-117292) (GH-150651)
(cherry picked from commit
73d8e9a47cc13ce1b9b1bdfdeaa958639b144f55 )
Co-authored-by: Patrick Rauscher <prauscher@prauscher.de>
Miss Islington (bot) [Sun, 31 May 2026 04:22:18 +0000 (06:22 +0200)]
[3.13] gh-149857: Clarify multiprocessing Process argument wording (GH-149919) (#149935)
gh-149857: Clarify multiprocessing Process argument wording (GH-149919)
Use consistent 'picklable' wording
(cherry picked from commit
1bab6c919212cbac9be9e37bbd4d85865051f17f )
Co-authored-by: Mani Salahmand <78011313+ManiSalahmand@users.noreply.github.com>
Miss Islington (bot) [Sat, 30 May 2026 17:44:52 +0000 (19:44 +0200)]
[3.13] gh-129851: Fix the documentation for -m command (GH-129862) (GH-150619) (GH-150620)
[3.14] gh-129851: Fix the documentation for -m command (GH-129862) (GH-150619)
(cherry picked from commit
9baa7c63bee1ad2b243f16109a3fd206a1f13a6a )
(cherry picked from commit
088c8ea18829c219d36441a8cb86da6da75fe755 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Dhruv Singla <68206552+d-s-dc@users.noreply.github.com>
Miss Islington (bot) [Sat, 30 May 2026 16:56:46 +0000 (18:56 +0200)]
[3.13] gh-150406: Check result of PyThread_allocate_lock() for netdb_lock (GH-150407) (GH-150618)
(cherry picked from commit
1e18c45495185cb547d43c3dd4c1cbdd8482867b )
Co-authored-by: Thomas Kowalski <thom.kowa@gmail.com>
Miss Islington (bot) [Sat, 30 May 2026 11:16:32 +0000 (13:16 +0200)]
[3.13] gh-149489: Fix ElementTree serialization to HTML (GH-149490) (GH-150596) (GH-150609)
* The content of elements "xmp", "iframe", "noembed", "noframes",
and "plaintext" is no longer escaped.
* The "plaintext" element no longer have the closing tag.
(cherry picked from commit
c42e6d3f1a066186f74d3971df4c512bc11c7997 )
(cherry picked from commit
bcd29e466f55d8b4e3849ed6ada8ce86a46f5072 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sat, 30 May 2026 09:26:59 +0000 (11:26 +0200)]
[3.13] gh-150501: Correct `inspect.getattr_static` docs signature (GH-150504) (#150603)
gh-150501: Correct `inspect.getattr_static` docs signature (GH-150504)
(cherry picked from commit
678fd8452cc2d7f9a50cb5d4e5ae44a60b724248 )
Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
Miss Islington (bot) [Fri, 29 May 2026 19:08:16 +0000 (21:08 +0200)]
[3.13] Add a security warning about `pydoc`'s HTTP server (GH-150409)
(cherry picked from commit
5535c1f9c08e929f96fa5d798277e3a2c91ed12a )
Co-authored-by: Stan Ulbrych <stan@python.org>
Miss Islington (bot) [Fri, 29 May 2026 13:10:40 +0000 (15:10 +0200)]
[3.13] gh-150107: Fix asyncio sendfile fallback ignoring non-zero offset (GH-150270) (#150571)
gh-150107: Fix asyncio sendfile fallback ignoring non-zero offset (GH-150270)
(cherry picked from commit
c72d5ea638731ec29723ded2d26ec7f997f06f17 )
Co-authored-by: Grant Herman <grantlouisherman041@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Thu, 28 May 2026 17:10:24 +0000 (19:10 +0200)]
[3.13] gh-139808: Add branch protections for aarch64 in asm_trampoline.S (GH-130864) (GH-150189) (#150194)
[3.14] gh-139808: Add branch protections for aarch64 in asm_trampoline.S (GH-130864) (GH-150189)
gh-139808: Add branch protections for aarch64 in asm_trampoline.S (GH-130864)
Apply protection against ROP/JOP attacks for aarch64 on asm_trampoline.S.
The BTI flag must be applied in assembler sources for this class
of attacks to be mitigated on newer aarch64 processors.
See also:
https://sourceware.org/annobin/annobin.html/Test-branch-protection.html
and
https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/enabling-pac-and-bti-on-aarch64
The 3.14 backport makes Python/jit_unwind.c changes in
Python/perf_jit_trampoline.c.
(cherry picked from commit
da8477b25c6124c961306d4d7cd5ec7dafda6be4 )
(cherry picked from commit
c863e96455ea8b7f1e958eb0c9e188b05f7770a4 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: stratakis <cstratak@redhat.com>
Miss Islington (bot) [Thu, 28 May 2026 17:08:53 +0000 (19:08 +0200)]
[3.13] gh-150046: Fix `test_add_python_opts` to ignore `PYTHON*` env vars (GH-150089) (#150563)
gh-150046: Fix `test_add_python_opts` to ignore `PYTHON*` env vars (GH-150089)
Avoid the runtime environment from affecting the tests' behaviours,
which notably checks the warning filters which can be controlled by
various PYTHON environment variables.
(cherry picked from commit
ef2246f788832a64ba7c5215c8e72f8e539e59b4 )
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
Stan Ulbrych [Thu, 28 May 2026 15:01:15 +0000 (16:01 +0100)]
[3.13] Add a prominent crash warning to the `ctypes` docs (GH-150410)
(cherry picked from commit
b53f6ca850b500621474e82931c3e7216d9a1cb1 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Serhiy Storchaka [Wed, 27 May 2026 18:22:45 +0000 (21:22 +0300)]
[3.13] gh-150285: Fix too long docstrings in _wmi.exec_query (GH-150373) (GH-150520) (GH-150531)
(cherry picked from commit
40c80434a68613403ecf278ae0744ffd0867490c )
(cherry picked from commit
fbeafc062e55a52ba7369c36be0b3eb34eabb560 )
Serhiy Storchaka [Wed, 27 May 2026 18:22:35 +0000 (21:22 +0300)]
[3.13] gh-150285: Fix too long docstrings in some Python modules (GH-150366) (GH-150375) (GH-150519) (GH-150530)
(cherry picked from commit
01c6d3d76bf222d8b847c97e0a3d3fad0c1b1fe3 )
(cherry picked from commit
03244b9f043a31eaa9243d90d01139294155e1f3 )
(cherry picked from commit
2a5e7d5bd05c36a7e0f4b7ed053b0451f3cf2ba0 )
Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Miss Islington (bot) [Wed, 27 May 2026 18:21:14 +0000 (20:21 +0200)]
[3.13] gh-84353: Preserve non-UTF-8 filenames when appending to ZipFile (GH-150091) (GH-150529)
Preserve non-UTF-8 filenames when appending to a ZipFile.
---------
(cherry picked from commit
24c6bbc92b6dd0ce9b7ff799049498299f70f97d )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Serhiy Storchaka [Wed, 27 May 2026 18:06:50 +0000 (21:06 +0300)]
[3.13] gh-150285: Fix too long docstrings in Argument Clinic code (GH-150338) (GH-150350) (GH-150473) (GH-150526)
(cherry picked from commit
49975a511fdfed2f6dd396c110fb915aedbda686 )
(cherry picked from commit
cf73b17adfd102a34a01efbad89a83dffdec2806 )
(cherry picked from commit
287c98f4cb40c15d638651de4b29ae98b92589aa )
Miss Islington (bot) [Wed, 27 May 2026 15:25:43 +0000 (17:25 +0200)]
[3.13] gh-149861: Fix rule in match statement `case_block` PEG grammar (#150512)
(cherry picked from commit
99c254e2f79a4197524bef61bf0d12251ee273e6 )
Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
Miss Islington (bot) [Wed, 27 May 2026 10:53:08 +0000 (12:53 +0200)]
[3.13] gh-88726: Stop using non-standard charset names eucgb2312_cn and big5_tw in email (GH-149959) (GH-150493)
(cherry picked from commit
5e467f4331d4cb7a8e2986c27af7eb68ccaccb37 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 27 May 2026 10:49:54 +0000 (12:49 +0200)]
[3.13] gh-149571: Fix the C implementation of Element.itertext() (GH-149929) (GH-150511)
It no longer emits text for comments and processing instructions.
(cherry picked from commit
7de4fcd44585f572acbcee23f5c7018b2b3f0983 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 26 May 2026 19:47:20 +0000 (21:47 +0200)]
[3.13] gh-150175: Fix ThreadingMock call_count race condition (GH-150176) (#150180)
gh-150175: Fix ThreadingMock call_count race condition (GH-150176)
ThreadingMock._increment_mock_call() was not thread-safe.
Multiple threads calling the mock simultaneously could lose
increments due to race conditions on call_count and other
attributes.
Fix by overriding _increment_mock_call in ThreadingMixin
and wrapping it with the existing _mock_calls_events_lock.
(cherry picked from commit
388e023fe1197c1ffed374520ed45df4ac72b8f5 )
Co-authored-by: saisneha196 <156835592+saisneha196@users.noreply.github.com>
Serhiy Storchaka [Tue, 26 May 2026 10:34:50 +0000 (13:34 +0300)]
[3.13] gh-150285: Fix too long docstrings in builtins (GH-150293) (GH-150466) (GH-150472)
(cherry picked from commit
730fc6a8586218f7b00489b2f8385dcff819411e )
(cherry picked from commit
e1e06be11908ddb6935e8df35f972879dd1bc3d8 )
Serhiy Storchaka [Tue, 26 May 2026 10:29:28 +0000 (13:29 +0300)]
[3.13] gh-150285: Fix too long docstrings in the io module (GH-150287) (GH-150458) (GH-150470)
(cherry picked from commit
36137e46a8c2bce489b118e2755f9d70d8565dd1 )
(cherry picked from commit
160dc74122ed4e31540b2ef2c77bda122b02c94a )
Serhiy Storchaka [Tue, 26 May 2026 10:11:11 +0000 (13:11 +0300)]
[3.13] gh-150285: Fix too long docstrings in the sqlite3 module (GH-150290) (GH-150461) (GH-150471)
(cherry picked from commit
7168b02795e5af4f59f9416a2e6a61a13fc45180 )
(cherry picked from commit
0466560b310fa74c38270328d66d6a16df95ec34 )
Serhiy Storchaka [Tue, 26 May 2026 10:01:15 +0000 (13:01 +0300)]
[3.13] gh-150285: Fix too long docstrings in the pyexpat module (GH-150294) (GH-150463) (GH-150468)
(cherry picked from commit
ad1bb6c14cb6d70bcf6411b84f9aaac07b28b416 )
(cherry picked from commit
9da7923835a4c72e738551bbd78b8179a81286ad )
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 )
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>
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 )
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>
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)
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>
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>
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>
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.
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)
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)
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>
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>
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>
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>
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>
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>
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 )
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>
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>
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>
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>
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>
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>
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>
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 )
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>
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>
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>
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>
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 )
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>
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>
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>
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 )
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 )
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>
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>
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>
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>
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>
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>
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>
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>
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>
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 )
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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 )
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>
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 )
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>
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>
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>
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>
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>
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 )
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 )
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 )
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>
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>
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>
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>
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>