]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 weeks ago[3.14] gh-134043: use stackrefs for dict lookup in `_PyObject_GetMethodStackRef`...
Sam Gross [Tue, 17 Mar 2026 20:59:26 +0000 (16:59 -0400)] 
[3.14] gh-134043: use stackrefs for dict lookup in `_PyObject_GetMethodStackRef` (GH-136412) (#146077)

(cherry picked from commit cbe6ebe15b3b8db00d3ca82a408cfd62b6d93b7d)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
4 weeks ago[3.14] gh-144545: Improve handling of default values in Argument Clinic (GH-146016...
Serhiy Storchaka [Tue, 17 Mar 2026 10:55:15 +0000 (12:55 +0200)] 
[3.14] gh-144545: Improve handling of default values in Argument Clinic (GH-146016) (GH-146052)

* Add the c_init_default attribute which is used to initialize the C variable
  if the default is not explicitly provided.
* Add the c_default_init() method which is used to derive c_default from
  default if c_default is not explicitly provided.
* Explicit c_default and py_default are now almost always have precedence
  over the generated value.
* Add support for bytes literals as default values.
* Improve support for str literals as default values (support non-ASCII
  and non-printable characters and special characters like backslash or quotes).
* Fix support for str and bytes literals containing trigraphs, "/*" and "*/".
* Improve support for default values in converters "char" and "int(accept={str})".
* Converter "int(accept={str})" now requires 1-character string instead of
  integer as default value.
* Add support for non-None default values in converter "Py_buffer": NULL,
  str and bytes literals.
* Improve error handling for invalid default values.
* Rename Null to NullType for consistency.
(cherry picked from commit 99e2c5eccd2b83ac955125522a952a4ff5c7eb43)

4 weeks ago[3.14] gh-141707: Skip TarInfo DIRTYPE normalization during GNU long name handling...
Miss Islington (bot) [Tue, 17 Mar 2026 09:51:19 +0000 (10:51 +0100)] 
[3.14] gh-141707: Skip TarInfo DIRTYPE normalization during GNU long name handling (GH-145819)

(cherry picked from commit 42d754e34c06e57ad6b8e7f92f32af679912d8ab)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Eashwar Ranganathan <eashwar@eashwar.com>
4 weeks ago[3.14] Docs: a brief note in the sets tutorial about order (GH-145984) (#146049)
Miss Islington (bot) [Tue, 17 Mar 2026 09:18:11 +0000 (10:18 +0100)] 
[3.14] Docs: a brief note in the sets tutorial about order (GH-145984) (#146049)

Docs: a brief note in the sets tutorial about order (GH-145984)
(cherry picked from commit 4f5e79805ebcaa0d3ba1677694d4120a9e8f4513)

Docs: a brief note in the sets tut about order

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
4 weeks ago[3.14] gh-145176 Move Emscripten files into Platforms/emscripten (GH-145806) (#146043)
Miss Islington (bot) [Tue, 17 Mar 2026 02:17:47 +0000 (03:17 +0100)] 
[3.14] gh-145176 Move Emscripten files into Platforms/emscripten (GH-145806) (#146043)

Moves Emscripten build files into Platforms/emscripten.
(cherry picked from commit 1b118353bb0a9d816de6ef673f3b11775de5bec5)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
4 weeks ago[3.14] gh-144984: Fix crash in Expat's `ExternalEntityParserCreate` error paths ...
Miss Islington (bot) [Tue, 17 Mar 2026 00:49:39 +0000 (01:49 +0100)] 
[3.14] gh-144984: Fix crash in Expat's `ExternalEntityParserCreate` error paths (GH-144992) (#146019)

gh-144984: Fix crash in Expat's `ExternalEntityParserCreate` error paths (GH-144992)
(cherry picked from commit e6b9a1406980fbb1d4032eca9cc0b4f8f252b716)

Co-authored-by: Ramin Farajpour Cami <ramin.blackhat@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 weeks ago[3.14] Docs: remove unmatched parenthesis for `asyncio.TaskGroup` note (GH-146035...
Miss Islington (bot) [Mon, 16 Mar 2026 20:59:31 +0000 (21:59 +0100)] 
[3.14] Docs: remove unmatched parenthesis for `asyncio.TaskGroup` note (GH-146035) (#146037)

Docs: remove unmatched parenthesis for `asyncio.TaskGroup` note (GH-146035)
(cherry picked from commit 4e96282ee42ab51cf325b52a0173ddddbe66c05c)

Co-authored-by: trag1c <dev@jakubr.me>
4 weeks ago[3.14] gh-135329: Remove flaky test_repl_eio test (gh-145932) (#146028)
Miss Islington (bot) [Mon, 16 Mar 2026 15:42:47 +0000 (16:42 +0100)] 
[3.14] gh-135329: Remove flaky test_repl_eio test (gh-145932) (#146028)

The test doesn't actually test any pyrepl code (it runs Python with -S)
and has a race condition that causes intermittent timeouts on CI.
(cherry picked from commit e18abc6a1f1b60434b529d4c1ff4855acde0fd13)

Co-authored-by: Sam Gross <colesbury@gmail.com>
4 weeks ago[3.14] gh-145599, CVE 2026-3644: Reject control characters in `http.cookies.Morsel...
Miss Islington (bot) [Mon, 16 Mar 2026 14:13:19 +0000 (15:13 +0100)] 
[3.14] gh-145599, CVE 2026-3644: Reject control characters in `http.cookies.Morsel.update()` (GH-145600) (#146023)

gh-145599, CVE 2026-3644: Reject control characters in `http.cookies.Morsel.update()` (GH-145600)

Reject control characters in `http.cookies.Morsel.update()` and `http.cookies.BaseCookie.js_output`.
(cherry picked from commit 57e88c1cf95e1481b94ae57abe1010469d47a6b4)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Victor Stinner <victor.stinner@gmail.com>
4 weeks ago[3.14] gh-145649: Fix man page text wrapping for -X option (GH-145656) (#146015)
Miss Islington (bot) [Mon, 16 Mar 2026 11:01:28 +0000 (12:01 +0100)] 
[3.14] gh-145649: Fix man page text wrapping for -X option (GH-145656) (#146015)

gh-145649: Fix man page text wrapping for -X option (GH-145656)

Replace hardcoded space indentation with proper troff macros
(.TP, .RS/.RE, .IP) for -X sub-options so text wraps correctly
at any terminal width.
(cherry picked from commit 36b5284f04b0a946a7d915bcd656534c9b4dbd85)

Co-authored-by: Matt Van Horn <mvanhorn@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
4 weeks ago[3.14] gh-145376: Fix GC tracking in `structseq.__replace__` (GH-145820) (#145922)
Miss Islington (bot) [Mon, 16 Mar 2026 09:08:15 +0000 (10:08 +0100)] 
[3.14] gh-145376: Fix GC tracking in `structseq.__replace__` (GH-145820) (#145922)

gh-145376: Fix GC tracking in `structseq.__replace__` (GH-145820)
(cherry picked from commit 00a25859a94b6bf34e58a5176e2befab7e273d20)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
4 weeks ago[3.14] Docs: fix a form error and a grammatical error in float.rst (GH-140989) (...
Miss Islington (bot) [Mon, 16 Mar 2026 09:08:00 +0000 (10:08 +0100)] 
[3.14] Docs: fix a form error and a grammatical error in float.rst (GH-140989) (#146012)

Docs: fix a form error and a grammatical error in float.rst (GH-140989)
(cherry picked from commit 70397fd1030c310d4d80beeb9c0d88f40c9abed8)

Co-authored-by: RayXu <xu_ruihong2009@163.com>
4 weeks ago[3.14] gh-144986: Fix memory leak in atexit.register() (GH-144987) (#145020)
Miss Islington (bot) [Mon, 16 Mar 2026 08:26:05 +0000 (09:26 +0100)] 
[3.14] gh-144986: Fix memory leak in atexit.register() (GH-144987) (#145020)

gh-144986: Fix memory leak in atexit.register() (GH-144987)
(cherry picked from commit 50c14719fbd47f500dd1a468998201d22475126d)

Co-authored-by: Shamil <ashm.tech@proton.me>
4 weeks ago[3.14] gh-140814: Fix freeze_support() setting start method as side effect (GH-144608...
Miss Islington (bot) [Mon, 16 Mar 2026 06:17:34 +0000 (07:17 +0100)] 
[3.14] gh-140814: Fix freeze_support() setting start method as side effect (GH-144608) (#146008)

gh-140814: Fix freeze_support() setting start method as side effect (GH-144608)

freeze_support() called get_start_method() without allow_none=True,
which locked in the default start method context. This caused a
subsequent set_start_method() call to raise "context has already been
set". Use allow_none=True and accept None as a matching value, since
spawn.freeze_support() independently detects spawned child processes.

Test that freeze_support() does not lock in the default start method,
which would prevent a subsequent set_start_method() call.
(cherry picked from commit ee5318025b0f9f4d30d9358627df68181e0d223f)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 weeks ago[3.14] gh-145990: sort `--help-env` sections by environment variable name (GH-146001)
Gregory P. Smith [Sun, 15 Mar 2026 22:55:08 +0000 (15:55 -0700)] 
[3.14] gh-145990: sort `--help-env` sections by environment variable name (GH-146001)

* sort --help-env alphabetically by name.
* add a sorting regression test in test_help_env.

manual backport of GH-145997

4 weeks ago[3.14] gh-145990: Sort `python --help-xoptions` by option name (GH-145993)
Gregory P. Smith [Sun, 15 Mar 2026 22:17:07 +0000 (15:17 -0700)] 
[3.14] gh-145990: Sort `python --help-xoptions` by option name (GH-145993)

* Sort --help-xoptions alphabetically by name.
* add a sorting regression test in test_help_xoptions

manual backport of GH-145991

4 weeks ago[3.14] gh-145986: Avoid unbound C recursion in `conv_content_model` in `pyexpat.c...
Miss Islington (bot) [Sun, 15 Mar 2026 22:13:58 +0000 (23:13 +0100)] 
[3.14] gh-145986: Avoid unbound C recursion in `conv_content_model` in `pyexpat.c` (CVE 2026-4224) (GH-145987) (#145995)

gh-145986: Avoid unbound C recursion in `conv_content_model` in `pyexpat.c` (CVE 2026-4224) (GH-145987)

Fix C stack overflow (CVE-2026-4224) when an Expat parser
with a registered `ElementDeclHandler` parses inline DTD
containing deeply nested content model.

---------
(cherry picked from commit eb0e8be3a7e11b87d198a2c3af1ed0eccf532768)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 weeks ago[3.14] gh-142518: Document thread-safety guarantees of bytearray objects (GH-145226...
Miss Islington (bot) [Sun, 15 Mar 2026 15:03:32 +0000 (16:03 +0100)] 
[3.14] gh-142518: Document thread-safety guarantees of bytearray objects (GH-145226) (#145982)

(cherry picked from commit 2f4e4ec2e7292901cab0c1466b78f5ddff48208d)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
4 weeks ago[3.14] gh-69223: Document that add_argument() returns an Action object (GH-145538...
Miss Islington (bot) [Sun, 15 Mar 2026 14:08:21 +0000 (15:08 +0100)] 
[3.14] gh-69223: Document that add_argument() returns an Action object (GH-145538) (#145595)

Co-authored-by: Andrew Barnes <bortstheboat@gmail.com>
4 weeks ago[3.14] Bump mypy to 1.19.1 (GH-145956) (#145971)
Miss Islington (bot) [Sun, 15 Mar 2026 10:16:05 +0000 (11:16 +0100)] 
[3.14] Bump mypy to 1.19.1 (GH-145956) (#145971)

Bump mypy to 1.19.1 (GH-145956)
(cherry picked from commit e167e06f8c6b24f7b54e8d6b87c1cac1667dd2cf)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
4 weeks ago[3.14] gh-141004: Document `PyDTrace*` (GH-141856) (GH-145959)
Miss Islington (bot) [Sun, 15 Mar 2026 03:04:49 +0000 (04:04 +0100)] 
[3.14] gh-141004: Document `PyDTrace*` (GH-141856) (GH-145959)

gh-141004: Document `PyDTrace*` (GH-141856)
(cherry picked from commit 1dfe99ae3bed6cac01732b47bf7fa637abadf51b)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
4 weeks ago[3.14] gh-143636: fix a crash when calling ``__replace__`` on invalid `SimpleNamespac...
Miss Islington (bot) [Sat, 14 Mar 2026 10:35:41 +0000 (11:35 +0100)] 
[3.14] gh-143636: fix a crash when calling ``__replace__`` on invalid `SimpleNamespace` instances (GH-143655) (#145938)

gh-143636: fix a crash when calling ``__replace__`` on invalid `SimpleNamespace` instances (GH-143655)
(cherry picked from commit 97968564b61965f2a65a9be8af731cee6913eb7a)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 weeks ago[3.14] Docs: fix missing period in `Doc/library/stdtypes.rst` (GH-145935) (#145936)
Miss Islington (bot) [Sat, 14 Mar 2026 09:26:32 +0000 (10:26 +0100)] 
[3.14] Docs: fix missing period in `Doc/library/stdtypes.rst` (GH-145935) (#145936)

Docs: fix missing period in `Doc/library/stdtypes.rst` (GH-145935)
(cherry picked from commit 51e8acf8de1aa1f1751dd5bb84d44b8d42143b9c)

Co-authored-by: Connor Gibson <connor@nextdoortech.net>
4 weeks ago[3.14] gh-145783: Propagate errors raised in `NEW_TYPE_COMMENT` (GH-145784) (#145926)
Stan Ulbrych [Fri, 13 Mar 2026 18:08:04 +0000 (18:08 +0000)] 
[3.14] gh-145783: Propagate errors raised in `NEW_TYPE_COMMENT`  (GH-145784) (#145926)

4 weeks ago[3.14] gh-145713: make bytearray.resize thread-safe on free-threading (#145714) ...
Thomas Kowalski [Fri, 13 Mar 2026 15:04:24 +0000 (16:04 +0100)] 
[3.14] gh-145713: make bytearray.resize thread-safe on free-threading (#145714) (#145799)

gh-145713: make bytearray.resize thread-safe on free-threading (#145714)

(cherry picked from commit c3955e049fd5dbd3d92bc95fed4442964156293d)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
4 weeks ago[3.14] gh-142518: Document thread-safety guarantees of set objects (GH-145225) (...
Miss Islington (bot) [Fri, 13 Mar 2026 13:59:17 +0000 (14:59 +0100)] 
[3.14] gh-142518: Document thread-safety guarantees of set objects (GH-145225) (#145915)

(cherry picked from commit 79b91e7c50d30dce6599a15cc4459667e25d525e)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
4 weeks ago[3.14] gh-145792: Fix incorrect alloca allocation size in traceback.c (GH-145814...
Miss Islington (bot) [Fri, 13 Mar 2026 12:45:18 +0000 (13:45 +0100)] 
[3.14] gh-145792: Fix incorrect alloca allocation size in traceback.c (GH-145814) (#145909)

gh-145792: Fix incorrect alloca allocation size in traceback.c (GH-145814)
(cherry picked from commit 59d97683c19923b06e2b2110efadb90fe37f53f3)

Co-authored-by: VanshAgarwal24036 <148854295+VanshAgarwal24036@users.noreply.github.com>
4 weeks ago[3.14] gh-145446: Add critical section in functools module for `PyDict_Next` (GH...
bkap123 [Fri, 13 Mar 2026 12:21:04 +0000 (08:21 -0400)] 
[3.14] gh-145446: Add critical section in functools module for `PyDict_Next` (GH-145487) (GH-145879)

(cherry picked from commit 17eb0354ff3110b27f811343c2d4b3c85f2685d5)

4 weeks ago[3.14] Docs: except with multiple exceptions parentheses not required (GH-145848...
Miss Islington (bot) [Fri, 13 Mar 2026 10:12:02 +0000 (11:12 +0100)] 
[3.14] Docs: except with multiple exceptions parentheses not required (GH-145848) (#145904)

Docs: except with multiple exceptions parentheses not required (GH-145848)

As of PEP 758 the except statement doesn't require parentheses anymore for exception tuples.
(cherry picked from commit 6d1e9ceed3e70ebc39953f5ad4f20702ffa32119)

See: https://peps.python.org/pep-0758/

Co-authored-by: Maurizio Sambati <duilio@users.noreply.github.com>
4 weeks ago[3.14] gh-145036: Fix data race for list capacity in free-threading (GH-145365) ...
bkap123 [Fri, 13 Mar 2026 02:06:12 +0000 (22:06 -0400)] 
[3.14] gh-145036: Fix data race for list capacity in free-threading (GH-145365) (#145881)

(cherry picked from commit 9e0802330caca51fed7fc0c8c1dcce2daf03d8bd)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
4 weeks ago[3.14] gh-145801: Use gcc -fprofile-update=atomic for PGO builds (GH-145802) (#145892)
Miss Islington (bot) [Thu, 12 Mar 2026 23:13:13 +0000 (00:13 +0100)] 
[3.14] gh-145801: Use gcc -fprofile-update=atomic for PGO builds (GH-145802) (#145892)

gh-145801: Use gcc -fprofile-update=atomic for PGO builds (GH-145802)

When Python build is optimized with GCC using PGO, use
-fprofile-update=atomic option to use atomic operations when updating
profile information. This option reduces the risk of gcov Data Files
(.gcda) corruption which can cause random GCC crashes.
(cherry picked from commit 08a018ebe0d673e9c352f790d2e4604d69604188)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 weeks ago[3.14] gh-145685: Improve scaling of type attribute lookups (gh-145774) (#145874)
Miss Islington (bot) [Thu, 12 Mar 2026 18:33:05 +0000 (19:33 +0100)] 
[3.14] gh-145685: Improve scaling of type attribute lookups (gh-145774) (#145874)

Avoid locking in the PyType_Lookup cache-miss path if the type's
tp_version_tag is already valid.

(cherry picked from commit cd5217283112d41c0244e2d96302cbe33f0b4cb1)

Co-authored-by: Sam Gross <colesbury@gmail.com>
4 weeks ago[3.14] gh-140131: Fix REPL cursor position on Windows when module completion suggesti...
Miss Islington (bot) [Thu, 12 Mar 2026 17:15:05 +0000 (18:15 +0100)] 
[3.14] gh-140131: Fix REPL cursor position on Windows when module completion suggestion line hits console width (GH-140333) (GH-145871)

(cherry picked from commit e13f6dccd7a2f8df543a18c4a3ad92610dc087cb)

Co-authored-by: Tan Long <tanloong@foxmail.com>
4 weeks ago[3.14] gh-145254: Add thread safety annotation in docs (GH-145255) (#145862)
Miss Islington (bot) [Thu, 12 Mar 2026 13:36:58 +0000 (14:36 +0100)] 
[3.14] gh-145254: Add thread safety annotation in docs (GH-145255) (#145862)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
4 weeks ago[3.14] GH-91636: Clear weakrefs created by finalizers. (GH-136401) (#144444)
Sergey Miryanov [Thu, 12 Mar 2026 12:10:29 +0000 (17:10 +0500)] 
[3.14] GH-91636: Clear weakrefs created by finalizers. (GH-136401) (#144444)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
4 weeks ago[3.14] gh-140594: Fix an out of bounds read when feeding NUL byte to PyOS_StdioReadli...
Miss Islington (bot) [Thu, 12 Mar 2026 11:24:20 +0000 (12:24 +0100)] 
[3.14] gh-140594: Fix an out of bounds read when feeding NUL byte to PyOS_StdioReadline() (GH-140910) (#145852)

gh-140594: Fix an out of bounds read when feeding NUL byte to PyOS_StdioReadline() (GH-140910)
(cherry picked from commit 86a0756234df7ce42fa4731c91067cb7f2e244d5)

Co-authored-by: Shamil <ashm.tech@proton.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 weeks ago[3.14] gh-145492: Fix defaultdict __repr__ infinite recursion (GH-145659) (GH-145747)
Miss Islington (bot) [Thu, 12 Mar 2026 09:45:31 +0000 (10:45 +0100)] 
[3.14] gh-145492: Fix defaultdict __repr__ infinite recursion (GH-145659) (GH-145747)

(cherry picked from commit 2d35f9bc1cf61b27639ed992dfbf363ab436fd8b)

Includes test fix-up from GH-145788
(cherry picked from commit aa4240ebea1aacc907b1efa58e7f547d90cff3b1)

Co-authored-by: Thomas Kowalski <thom.kowa@gmail.com>
Co-authored-by: Matt Van Horn <mvanhorn@users.noreply.github.com>
4 weeks ago[3.14] gh-145736: Fix Tkinter tests for Tk 8.7, 9.0 and 9.1 (GH-145738) (GH-145841)
Serhiy Storchaka [Thu, 12 Mar 2026 00:41:14 +0000 (02:41 +0200)] 
[3.14] gh-145736: Fix Tkinter tests for Tk 8.7, 9.0 and 9.1 (GH-145738) (GH-145841)

(cherry picked from commit 77d6d5d8fcc8565034dac378b2184131af735512)

5 weeks ago[3.14] gh-139933: correctly suggest attributes for classes with a custom `__dir__...
Łukasz Langa [Wed, 11 Mar 2026 15:11:38 +0000 (16:11 +0100)] 
[3.14] gh-139933: correctly suggest attributes for classes with a custom `__dir__` (GH-139950) (GH-145827)

(cherry picked from commit 4722202a1a81974089801e6173d269836b6a074f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 weeks ago[3.14] gh-142518: Improve mimalloc allocator docs (GH-145224) (#145823)
Miss Islington (bot) [Wed, 11 Mar 2026 14:28:11 +0000 (15:28 +0100)] 
[3.14] gh-142518: Improve mimalloc allocator docs (GH-145224) (#145823)

(cherry picked from commit 7a1da4575b1d8fa87efb62334a8e99cd513d86e9)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
5 weeks ago[3.14] gh-99875: Document rounding mode for old-style formatting (GH-126382) (#145811)
Miss Islington (bot) [Wed, 11 Mar 2026 13:31:44 +0000 (14:31 +0100)] 
[3.14] gh-99875: Document rounding mode for old-style formatting (GH-126382) (#145811)

gh-99875: Document rounding mode for old-style formatting (GH-126382)
(cherry picked from commit ce1abaf9b83f8535749c6d3d0a0fabf15d87079f)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
5 weeks ago[3.14] gh-145591: Move slicing note to __getitem__ (GH-145606) (GH-145760)
Miss Islington (bot) [Wed, 11 Mar 2026 12:58:03 +0000 (13:58 +0100)] 
[3.14] gh-145591: Move slicing note to __getitem__ (GH-145606) (GH-145760)

(cherry picked from commit 2114da976c3d85a85283d1a9437bdf8604626be8)

Co-authored-by: Ali Towaiji <145403626+Towaiji@users.noreply.github.com>
5 weeks ago[3.14] Warn that overriding `__builtins__` for `eval` is not a security mechanism...
Miss Islington (bot) [Wed, 11 Mar 2026 12:43:19 +0000 (13:43 +0100)] 
[3.14] Warn that overriding `__builtins__` for `eval` is not a security mechanism (GH-145773) (GH-145808)

(cherry picked from commit eb9ae65e5b1cdfcf4f60d36c0353c857bc27b92f)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
5 weeks ago[3.14] gh-145685: Avoid contention on TYPE_LOCK in super() lookups (gh-145775) (...
Sam Gross [Wed, 11 Mar 2026 11:50:13 +0000 (07:50 -0400)] 
[3.14] gh-145685: Avoid contention on TYPE_LOCK in super() lookups (gh-145775) (#145804)

(cherry picked from commit bdf6de8c3f0c2ec0d737f38014a32c1eed02c7f1)

5 weeks ago[3.14] gh-101100: Fix sphinx reference warnings around I/O (GH-139592) (#145794)
Miss Islington (bot) [Wed, 11 Mar 2026 08:08:09 +0000 (09:08 +0100)] 
[3.14] gh-101100: Fix sphinx reference warnings around I/O (GH-139592) (#145794)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
5 weeks ago[3.14] gh-145607: Ensure BIG_DATA has two compressed blocks in test_bz2 (GH-145730...
Miss Islington (bot) [Wed, 11 Mar 2026 04:07:38 +0000 (05:07 +0100)] 
[3.14] gh-145607: Ensure BIG_DATA has two compressed blocks in test_bz2 (GH-145730) (#145733)

gh-145607: Ensure BIG_DATA has two compressed blocks in test_bz2 (GH-145730)
(cherry picked from commit 19676e5fc28bdee8325a062a31ddeee60960cf75)

Co-authored-by: Emma Smith <emma@emmatyping.dev>
5 weeks ago[3.14] gh-145219: Cache Emscripten build dependencies, add install-emscripten (GH...
Miss Islington (bot) [Wed, 11 Mar 2026 00:50:36 +0000 (01:50 +0100)] 
[3.14] gh-145219: Cache Emscripten build dependencies, add install-emscripten (GH-145664) (#145790)

Modifies the Emscripten build script to allow for caching of dependencies, and
for automated installation of new EMSDK versions.
(cherry picked from commit ebb150e76ab4988fdcd5e8caa36b9014497573a5)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
5 weeks ago[3.14] gh-142763: Fix race in ZoneInfo cache eviction (gh-144978) (#145781)
Miss Islington (bot) [Tue, 10 Mar 2026 19:39:40 +0000 (20:39 +0100)] 
[3.14] gh-142763: Fix race in ZoneInfo cache eviction (gh-144978) (#145781)

The cache may be cleared between the evaluation of the if statement and the
call to popitem.

(cherry picked from commit 665c1db94f46f8e1a18a8c2f89adb3bc72cb83dc)

Co-authored-by: Sam Gross <colesbury@gmail.com>
5 weeks ago[3.14] gh-145685: Update find_name_in_mro() to return a _PyStackRef (gh-145693) ...
Miss Islington (bot) [Tue, 10 Mar 2026 19:25:46 +0000 (20:25 +0100)] 
[3.14] gh-145685: Update find_name_in_mro() to return a _PyStackRef (gh-145693) (#145769)

(cherry picked from commit f26eca7732ca9d0e6893e3fdfdfd4c25339c7155)

Co-authored-by: Sam Gross <colesbury@gmail.com>
5 weeks ago[3.14] gh-145010: Fix Python.h compilation with -masm=intel (GH-145011) (#145776)
Miss Islington (bot) [Tue, 10 Mar 2026 18:07:17 +0000 (19:07 +0100)] 
[3.14] gh-145010: Fix Python.h compilation with -masm=intel (GH-145011) (#145776)

(cherry picked from commit 9c1c71066e34b11649735e8acb4765a85c76336f)

Co-authored-by: Sam Gross <colesbury@gmail.com>
5 weeks ago[3.14] Fix integer overflow for formats "s" and "p" in the struct module (GH-145750...
Miss Islington (bot) [Tue, 10 Mar 2026 17:26:01 +0000 (18:26 +0100)] 
[3.14] Fix integer overflow for formats "s" and "p" in the struct module (GH-145750) (GH-145772)

(cherry picked from commit 4d0dce0c8ddc4d0321bd590a1a33990edc2e1b08)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
5 weeks ago[3.14] gh-144173: fix flaky test_complex.test_truediv() (GH-144355) (#145766)
Miss Islington (bot) [Tue, 10 Mar 2026 17:08:00 +0000 (18:08 +0100)] 
[3.14] gh-144173: fix flaky test_complex.test_truediv() (GH-144355) (#145766)

gh-144173: fix flaky test_complex.test_truediv() (GH-144355)

Previously, component-wise relative error bound was tested.  However,
such bound can't exist already for complex multiplication as one can be
used to perform subtraction of floating-point numbers, e.g. x and y for
z0=1+1j and z1=x+yj.

```pycon
>>> x, y = 1e-9+1j, 1+1j
>>> a = x*y*y.conjugate()/2;a
(1.0000000272292198e-09+1j)
>>> b = x*(y*y.conjugate()/2);b
(1e-09+1j)
>>> b == x
True
>>> (a.real-b.real)/math.ulp(b.real)
131672427.0
```
(cherry picked from commit c4333a12708a917d1cfb6418c04be45793ecc392)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
5 weeks ago[3.14] gh-145743: Fix inconsistency after calling Struct.__init__() with invalid...
Miss Islington (bot) [Tue, 10 Mar 2026 16:55:58 +0000 (17:55 +0100)] 
[3.14] gh-145743: Fix inconsistency after calling Struct.__init__() with invalid format (GH-145744) (GH-145763)

Only set the format attribute after successful (re-)initialization.
(cherry picked from commit 3f33bf83e8496737b86333bc9ec55dc3ccb3faca)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
5 weeks ago[3.14] gh-145376: Fix various reference leaks (GH-145377) (GH-145712)
Stan Ulbrych [Tue, 10 Mar 2026 15:31:02 +0000 (15:31 +0000)] 
[3.14] gh-145376: Fix various reference leaks (GH-145377) (GH-145712)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
5 weeks ago[3.14] Docs: Improve the C API documentation involving threads (GH-145520) (GH-145757)
Miss Islington (bot) [Tue, 10 Mar 2026 15:03:28 +0000 (16:03 +0100)] 
[3.14] Docs: Improve the C API documentation involving threads (GH-145520) (GH-145757)

Docs: Improve the C API documentation involving threads (GH-145520)
(cherry picked from commit 7990313afa3234d5145b32ead3ef3f6278735f4f)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
5 weeks ago[3.14] gh-106318: Add examples for str.isspace() docs (GH-145399) (#145752)
Miss Islington (bot) [Tue, 10 Mar 2026 14:25:46 +0000 (15:25 +0100)] 
[3.14] gh-106318: Add examples for str.isspace() docs (GH-145399) (#145752)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
5 weeks ago[3.14] Docs: Update programming FAQ (GH-144573) (#145695)
Miss Islington (bot) [Tue, 10 Mar 2026 14:17:11 +0000 (15:17 +0100)] 
[3.14] Docs: Update programming FAQ (GH-144573) (#145695)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@ulbrych.org>
5 weeks ago[3.14] gh-145685: Stop the world when updating MRO of existing types (gh-145707)...
Sam Gross [Tue, 10 Mar 2026 13:31:52 +0000 (09:31 -0400)] 
[3.14] gh-145685: Stop the world when updating MRO of existing types (gh-145707) (#145715)

We already have a stop-the-world pause elsewhere in this code path
(type_set_bases) and this makes will make it easier to avoid contention
on the TYPE_LOCK when looking up names in the MRO hierarchy.

Also use deferred reference counting for non-immortal MROs.
(cherry picked from commit 0b65c88c2af6e09530a9aa21800771aa687371db)

5 weeks ago[3.14] gh-142651: use `NonCallableMock._lock` for thread safety of `call_count` ...
Miss Islington (bot) [Tue, 10 Mar 2026 12:39:45 +0000 (13:39 +0100)] 
[3.14] gh-142651: use `NonCallableMock._lock` for thread safety of `call_count` (GH-142922) (#145739)

gh-142651: use `NonCallableMock._lock` for thread safety of `call_count` (GH-142922)
(cherry picked from commit 728e4a075e3dae7e04edf90ad137a35073deb141)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
5 weeks ago[3.14] gh-140715: Improve class reference links on datetime.rst (GH-123980) (#145388)
Hugo van Kemenade [Tue, 10 Mar 2026 11:38:20 +0000 (13:38 +0200)] 
[3.14] gh-140715: Improve class reference links on datetime.rst (GH-123980) (#145388)

Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
5 weeks ago[3.14] gh-140681: Freeze pre-commit hooks and update zizmor links (GH-140682) (#145536)
Hugo van Kemenade [Tue, 10 Mar 2026 11:37:46 +0000 (13:37 +0200)] 
[3.14] gh-140681: Freeze pre-commit hooks and update zizmor links (GH-140682) (#145536)

Co-authored-by: Xianpeng Shen <xianpeng.shen@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
5 weeks ago[3.14] Document that PyType_GetModule returns a borrowed ref (GH-145612) (GH-145682)
Petr Viktorin [Tue, 10 Mar 2026 09:06:08 +0000 (10:06 +0100)] 
[3.14] Document that PyType_GetModule returns a borrowed ref (GH-145612) (GH-145682)

(cherry picked from commit 44855458a423569eaea3df53fd5a0c0032da932d)

5 weeks ago[3.14] gh-145541: Fix `InvalidStateError` in `BaseSubprocessTransport._call_connectio...
Miss Islington (bot) [Tue, 10 Mar 2026 04:41:31 +0000 (05:41 +0100)] 
[3.14] gh-145541: Fix `InvalidStateError` in `BaseSubprocessTransport._call_connection_lost()` (GH-145554) (#145676)

gh-145541: Fix `InvalidStateError` in `BaseSubprocessTransport._call_connection_lost()` (GH-145554)
(cherry picked from commit 1564e231aae7afad5b9b19a277d1efff2b840ad2)

Co-authored-by: Daan De Meyer <daan.j.demeyer@gmail.com>
5 weeks ago[3.14] Remove the `distutils-sig@python.org` email in 'Installing Python Modules...
Miss Islington (bot) [Mon, 9 Mar 2026 22:16:23 +0000 (23:16 +0100)] 
[3.14] Remove the `distutils-sig@python.org` email in 'Installing Python Modules' (GH-145613) (#145708)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
5 weeks ago[3.14] gh-145701: Fix `__classdict__` & `__conditional_annotations__` in class-scope...
Miss Islington (bot) [Mon, 9 Mar 2026 20:26:52 +0000 (21:26 +0100)] 
[3.14] gh-145701: Fix `__classdict__` & `__conditional_annotations__` in class-scope inlined comprehensions (GH-145702) (#145710)

(cherry picked from commit 63eaaf95999c530cbd75b3addc3e660499d3adbe)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
* Add `:oss-fuzz:` supports

Backports part of https://github.com/python/cpython/commit/255e79fa955ac5ffef9eb27087e8b1373e98e3bd.

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
5 weeks ago[3.14] gh-145615: Fix mimalloc page leak in the free-threaded build (gh-145626) ...
Miss Islington (bot) [Mon, 9 Mar 2026 18:17:57 +0000 (19:17 +0100)] 
[3.14] gh-145615: Fix mimalloc page leak in the free-threaded build (gh-145626) (#145691)

Fix three issues that caused mimalloc pages to be leaked until the
owning thread exited:

1. In _PyMem_mi_page_maybe_free(), move pages out of the full queue
   when relying on QSBR to defer freeing the page. Pages in the full
   queue are never searched by mi_page_queue_find_free_ex(), so a page
   left there is unusable for allocations.

2. Move _PyMem_mi_page_clear_qsbr() from _mi_page_free_collect() to
   _mi_page_thread_free_collect() where it only fires when all blocks
   on the page are free (used == 0). The previous placement was too
   broad: it cleared QSBR state whenever local_free was non-NULL, but
   _mi_page_free_collect() is called from non-allocation paths (e.g.,
   page visiting in mi_heap_visit_blocks) where the page is not being
   reused.

3. In _PyMem_mi_page_maybe_free(), use the page's heap tld to find the
   correct thread state for QSBR list insertion instead of
   PyThreadState_GET(). During stop-the-world pauses, the function may
   process pages belonging to other threads, so the current thread
   state is not necessarily the owner of the page.

(cherry picked from commit d76df75f51e662fd15ebe00e107058841de94860)

Co-authored-by: Sam Gross <colesbury@gmail.com>
5 weeks ago[3.14] gh-145623: Fix crashes on uninitialized struct.Struct objects (gh-145624)...
Ramin Farajpour Cami [Mon, 9 Mar 2026 16:41:39 +0000 (20:11 +0330)] 
[3.14] gh-145623: Fix crashes on uninitialized struct.Struct objects (gh-145624) (GH-145630)

5 weeks ago[3.14] gh-141617: clarify `concurrent.futures.ThreadPoolExecutor` deadlock example...
Miss Islington (bot) [Mon, 9 Mar 2026 16:36:00 +0000 (17:36 +0100)] 
[3.14] gh-141617: clarify `concurrent.futures.ThreadPoolExecutor` deadlock example (GH-141620) (#145686)

gh-141617: clarify `concurrent.futures.ThreadPoolExecutor` deadlock example (GH-141620)

---------
(cherry picked from commit 171133aa84cd2fa8738bdbb0c76435645810e8d3)

Co-authored-by: Yashraj <yashrajpala8@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 weeks ago[3.14] gh-78773: Improve ctypes dynamic library loading docs (GH-145313) (GH-145674)
Miss Islington (bot) [Mon, 9 Mar 2026 14:52:16 +0000 (15:52 +0100)] 
[3.14] gh-78773: Improve ctypes dynamic library loading docs  (GH-145313) (GH-145674)

(cherry picked from commit d64f83d07bf587dfd6e4ff9ad9d44541064d5f1c)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
5 weeks ago[3.14] gh-145219: Add Emscripten cross-build and clean configurability (GH-145581...
Miss Islington (bot) [Mon, 9 Mar 2026 02:52:56 +0000 (03:52 +0100)] 
[3.14] gh-145219: Add Emscripten cross-build and clean configurability (GH-145581) (#145654)

Modifies the Emscripten build script to allow for custom cross-build directory
names, and to only clean Emscripten-specific paths (optionally including the
build python).
(cherry picked from commit 015613384fea7a00bb2077760e325e5baab6814b)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
5 weeks ago[3.14] gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (GH...
Miss Islington (bot) [Sun, 8 Mar 2026 23:05:09 +0000 (00:05 +0100)] 
[3.14] gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (GH-145643) (#145647)

gh-145642: Docs: Avoid warning for invalid escape sequence in tutorial (GH-145643)

---------
(cherry picked from commit 5a15a52dd1dee37af4f2b3a6b15a9f5735f75c6e)

Co-authored-by: James <snoopjedi@gmail.com>
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
5 weeks ago[3.14] gh-145177: Support multiple Emscripten versions for Emscripten buildbot (GH...
Miss Islington (bot) [Sun, 8 Mar 2026 22:14:15 +0000 (23:14 +0100)] 
[3.14] gh-145177: Support multiple Emscripten versions for Emscripten buildbot (GH-145180) (#145582)

Adds an `--emsdk-cache` argument to the Emscripten build script and an
emscripten_version.txt file. If the `--emsdk-cache` argument is passed, the build script
will look in `emscripten_version.txt` to get the expected emsdk version is installed in
a folder called e.g., 4.0.12 in the directory indicated by the `--emsdk-cache` argument,
and run the build with that Emscripten tooling activated.
(cherry picked from commit c3fb0d9d96902774c08b199dda0479a8d31398a5)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
5 weeks ago[3.14] gh-145376: Fix refleak in `queuemodule.c` out-of-memory path (GH-145543) ...
Miss Islington (bot) [Sun, 8 Mar 2026 08:02:51 +0000 (09:02 +0100)] 
[3.14] gh-145376: Fix refleak in `queuemodule.c` out-of-memory path (GH-145543) (#145622)

gh-145376: Fix refleak in `queuemodule.c` out-of-memory path (GH-145543)
(cherry picked from commit 0aeaaafac476119f242fe717ce60d2070172127b)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
5 weeks ago[3.14] Remove typo in ``functools.lru_cache`` docs (GH-140278) (#145628)
Miss Islington (bot) [Sat, 7 Mar 2026 17:14:45 +0000 (18:14 +0100)] 
[3.14] Remove typo in ``functools.lru_cache`` docs (GH-140278) (#145628)

Co-authored-by: Brandon Hubacher <brandon.hubacher@gmail.com>
5 weeks ago[3.14] gh-145376: Fix crashes in `md5module.c` and `hmacmodule.c` (GH-145422) (#145610)
Miss Islington (bot) [Fri, 6 Mar 2026 21:06:32 +0000 (22:06 +0100)] 
[3.14] gh-145376: Fix crashes in `md5module.c` and `hmacmodule.c` (GH-145422) (#145610)

gh-145376: Fix crashes in `md5module.c` and `hmacmodule.c` (GH-145422)

Fix a possible NULL pointer dereference in `md5module.c` and a double-free in `hmacmodule.c`.
Those crashes only occur in error paths taken when the interpreter fails to allocate memory.
(cherry picked from commit c1d77683213c400fca144692654845e6f5418981)

Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
5 weeks ago[3.14] gh-145548: Use VMADDR_CID_LOCAL in VSOCK socket tests (GH-145589) (#145593)
Miss Islington (bot) [Fri, 6 Mar 2026 20:34:09 +0000 (21:34 +0100)] 
[3.14] gh-145548: Use VMADDR_CID_LOCAL in VSOCK socket tests (GH-145589) (#145593)

gh-145548: Use VMADDR_CID_LOCAL in VSOCK socket tests (GH-145589)

Prefer VMADDR_CID_LOCAL instead of VMADDR_CID_ANY for bind() in the
server. Skip the test if bind() fails with EADDRNOTAVAIL.

Log vsock CID in test.pythoninfo.
(cherry picked from commit 6c8c72f7feb4207c62ac857443943e61977d6a94)

Co-authored-by: Victor Stinner <vstinner@python.org>
5 weeks ago[3.14] gh-145566: Skip stop-the-world when reassigning `__class__` on newly created...
Sam Gross [Fri, 6 Mar 2026 19:35:00 +0000 (14:35 -0500)] 
[3.14] gh-145566: Skip stop-the-world when reassigning `__class__` on newly created objects (gh-145567) (#145605)

Co-authored-by: Sam Gross <colesbury@gmail.com>
5 weeks ago[3.14] gh-144513: Skip critical section locking during stop-the-world (gh-144524...
Sam Gross [Fri, 6 Mar 2026 17:00:17 +0000 (12:00 -0500)] 
[3.14] gh-144513: Skip critical section locking during stop-the-world (gh-144524) (#145570)

5 weeks ago[3.14] gh-144370: Disallow usage of control characters in status in wsgiref.handlers...
Miss Islington (bot) [Fri, 6 Mar 2026 12:48:44 +0000 (13:48 +0100)] 
[3.14] gh-144370: Disallow usage of control characters in status in wsgiref.handlers for security (GH-144371) (#145586)

gh-144370: Disallow usage of control characters in status in wsgiref.handlers for security (GH-144371)

Disallow usage of control characters in status in wsgiref.handlers
to prevent HTTP header injections.
(cherry picked from commit d931725bc850cd096f6703bc285e885f1e015f05)

Co-authored-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
5 weeks ago[3.14] Docs: `import datetime as dt` in examples (GH-145315) (#145583)
Miss Islington (bot) [Fri, 6 Mar 2026 11:49:40 +0000 (12:49 +0100)] 
[3.14] Docs: `import datetime as dt` in examples (GH-145315) (#145583)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
5 weeks ago[3.14] gh-122941: Fix test_launcher sporadic failures via py.ini isolation (GH-145090)
Miss Islington (bot) [Fri, 6 Mar 2026 10:22:29 +0000 (11:22 +0100)] 
[3.14] gh-122941: Fix test_launcher sporadic failures via py.ini isolation (GH-145090)

Adds _PYLAUNCHER_INIDIR as a private variable since the launcher is deprecated and not getting new features.
(cherry picked from commit 6cdbd7bc5d4ee63459d03a944477ea8671a05198)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
5 weeks ago[3.14] Docs: use a Sphinx extension to eliminate excessive links (GH-145130) (#145575)
Miss Islington (bot) [Fri, 6 Mar 2026 06:49:30 +0000 (07:49 +0100)] 
[3.14] Docs: use a Sphinx extension to eliminate excessive links (GH-145130) (#145575)

Docs: use a Sphinx extension to eliminate excessive links (GH-145130)
(cherry picked from commit 15f6479c415cc6cd219cd25c1d94bab17d720cbc)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
5 weeks ago[3.14] gh-145557: Check ctypes is available in test_external_inspection (GH-145558...
Miss Islington (bot) [Thu, 5 Mar 2026 19:31:06 +0000 (20:31 +0100)] 
[3.14] gh-145557: Check ctypes is available in test_external_inspection (GH-145558) (#145565)

gh-145557: Check ctypes is available in test_external_inspection (GH-145558)

Currently TestGetStackTrace.test_self_trace_after_ctypes_import() will fail if
the _ctypes extension is not built.  Make it match test_ctypes by skipping
the test in that case.
(cherry picked from commit 7232883adfc28f94a62d2e79c897db59711702d7)

Co-authored-by: Alex Malyshev <lex.malyshev@gmail.com>
5 weeks ago[3.14] doc: Clarify logger creation example in logging HOWTO (GH-145540) (GH-145562)
Miss Islington (bot) [Thu, 5 Mar 2026 18:02:56 +0000 (19:02 +0100)] 
[3.14] doc: Clarify logger creation example in logging HOWTO (GH-145540) (GH-145562)

doc: Clarify logger creation example in logging HOWTO (GH-145540)
(cherry picked from commit e0945443a0abdee56a51a5cb82a31edba5f1adab)

Co-authored-by: Yash Kaushik <yash005kaushik@gmail.com>
5 weeks ago[3.14] gh-145417: Do not preserve SELinux context when copying venv scripts (GH-14545...
Miss Islington (bot) [Thu, 5 Mar 2026 14:59:05 +0000 (15:59 +0100)] 
[3.14] gh-145417: Do not preserve SELinux context when copying venv scripts (GH-145454) (#145549)

gh-145417: Do not preserve SELinux context when copying venv scripts (GH-145454)
(cherry picked from commit dbe0007ab2ff679c85d88e62fb875437b2dc2522)

Co-authored-by: Shrey Naithani <shrey.naithani@shelllite.tech>
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
5 weeks ago[3.14] gh-143304: Fix ctypes.CDLL to honor handle parameter on POSIX systems (GH...
Miss Islington (bot) [Thu, 5 Mar 2026 14:34:32 +0000 (15:34 +0100)] 
[3.14] gh-143304: Fix ctypes.CDLL to honor handle parameter on POSIX systems (GH-143318) (GH-145172)

The handle parameter was being ignored in the POSIX implementation
of CDLL._load_library(), causing it to always call _dlopen() even
when a valid handle was provided. This was a regression introduced
in recent refactoring.
(cherry picked from commit 27ded243485670fa836c9bb421e37a6ef16eca8e)

Co-authored-by: Arjit Singh Grover <143692910+Koolvansh07@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
5 weeks ago[3.14] gh-144981: Make PyUnstable_Code_SetExtra/GetExtra thread-safe (GH-144980)...
Miss Islington (bot) [Thu, 5 Mar 2026 13:26:09 +0000 (14:26 +0100)] 
[3.14] gh-144981: Make PyUnstable_Code_SetExtra/GetExtra thread-safe (GH-144980) (#145052)

Co-authored-by: Alper <alperyoney@fb.com>
5 weeks ago[3.14] gh-145301: Fix double-free in hashlib and hmac module initialization (GH-14532...
Miss Islington (bot) [Thu, 5 Mar 2026 04:13:02 +0000 (05:13 +0100)] 
[3.14] gh-145301: Fix double-free in hashlib and hmac module initialization (GH-145321) (#145523)

gh-145301: Fix double-free in hashlib and hmac module initialization (GH-145321)
(cherry picked from commit 6acaf659ef0fdee131bc02f0b58685da039b5855)

gh-145301: Fix double-free in hashlib and hmac initialization

Co-authored-by: krylosov-aa <krylosov.andrew@gmail.com>
5 weeks ago[3.14] gh-145506: Fixes CVE-2026-2297 by ensuring SourcelessFileLoader uses io.open_c...
Miss Islington (bot) [Wed, 4 Mar 2026 20:21:29 +0000 (21:21 +0100)] 
[3.14] gh-145506: Fixes CVE-2026-2297 by ensuring SourcelessFileLoader uses io.open_code (GH-145507)`

(cherry picked from commit a51b1b512de1d56b3714b65628a2eae2b07e535e)

Co-authored-by: Steve Dower <steve.dower@python.org>
5 weeks ago[3.14] GH-144739: Skip test_pyexpat.MemoryProtectionTest based on expat compile-time...
Victor Stinner [Wed, 4 Mar 2026 19:23:56 +0000 (20:23 +0100)] 
[3.14] GH-144739: Skip test_pyexpat.MemoryProtectionTest based on expat compile-time version, not runtime (#144740) (#145494)

GH-144739: Skip test_pyexpat.MemoryProtectionTest based on expat compile-time version, not runtime (#144740)

(cherry picked from commit 45e9343d7eed1d9e784e731cc9af853fa8649e59)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
6 weeks ago[3.14] Fix incorrect statement about argparse.ArgumentParser.add_argument() (GH-14547...
Miss Islington (bot) [Tue, 3 Mar 2026 21:47:39 +0000 (22:47 +0100)] 
[3.14] Fix incorrect statement about argparse.ArgumentParser.add_argument() (GH-145479) (#145485)

Fix incorrect statement about argparse.ArgumentParser.add_argument() (GH-145479)
(cherry picked from commit dc12d1999b88e84d5a6b8e491be468b73379e54b)

Co-authored-by: Justin Kunimune <justinkunimune@gmail.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
6 weeks ago[3.14] gh-144475: Fix reference management in partial_repr (GH-145362) (GH-145470)
Miss Islington (bot) [Tue, 3 Mar 2026 15:40:23 +0000 (16:40 +0100)] 
[3.14] gh-144475: Fix reference management in partial_repr (GH-145362) (GH-145470)

(cherry picked from commit 671a953dd65292a5b69ba7393666ddcac93dbc44)

Co-authored-by: bkap123 <97006829+bkap123@users.noreply.github.com>
6 weeks ago[3.14] gh-145455: Show output of blurb & sphinx-build version commands (GH-145457...
Miss Islington (bot) [Tue, 3 Mar 2026 14:16:05 +0000 (15:16 +0100)] 
[3.14] gh-145455: Show output of blurb & sphinx-build version commands (GH-145457) (#145461)

gh-145455: Show output of blurb & sphinx-build version commands (GH-145457)

In gh-145455, an outdated dependency caused an import error that was not
printed out (`2>&1`); the message instead said that the tools are missing.

Don't redirect stderr, to show warnings and failures.

Also, switch `blurb` to output a version on a single line (`--version` rather
than `help`), and, and don't redirect stdout either.
This results in two version info lines being printed out. These get drowned
in typical Sphinx output, and can be helpful when debugging.
(cherry picked from commit f1de65b3669226d563802a32b78a2294e971151a)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
6 weeks ago[3.14] GH-145450: Document missing `wave.Wave_write` getter methods (GH-145451) ...
Miss Islington (bot) [Tue, 3 Mar 2026 12:50:45 +0000 (13:50 +0100)] 
[3.14] GH-145450: Document missing `wave.Wave_write` getter methods (GH-145451) (GH-145466)

(cherry picked from commit db41717cd50af6db7d496b0aa282b1f3370327c6)

Co-authored-by: Michiel W. Beijen <mb@x14.nl>
6 weeks ago[3.14] gh-106318: Fix incorrectly rendered code block in `str.isalnum()` docs (GH...
Miss Islington (bot) [Tue, 3 Mar 2026 12:12:36 +0000 (13:12 +0100)] 
[3.14] gh-106318: Fix incorrectly rendered code block in `str.isalnum()` docs (GH-144718) (GH-144730)

(cherry picked from commit f912c835b94d75ae4823153c160f0cc674a243bb)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
6 weeks ago[3.14] gh-142781: Fix type confusion in zoneinfo weak cache (GH-142925) (GH-145419)
Miss Islington (bot) [Tue, 3 Mar 2026 11:48:05 +0000 (12:48 +0100)] 
[3.14] gh-142781: Fix type confusion in zoneinfo weak cache (GH-142925) (GH-145419)

(cherry picked from commit b611db491d16ebbb4c833e9a184bb987e41f9fbe)

Co-authored-by: zhong <60600792+superboy-zjc@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
6 weeks ago[3.14] Hide "object" prefix on dunders in contextlib docs & selectivly link some...
Miss Islington (bot) [Mon, 2 Mar 2026 21:18:12 +0000 (22:18 +0100)] 
[3.14] Hide "object" prefix on dunders in contextlib docs & selectivly link some more (GH-145436) (#145443)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
6 weeks ago[3.14] gh-130327: Always traverse managed dictionaries, even when inline values are...
Miss Islington (bot) [Mon, 2 Mar 2026 19:57:10 +0000 (20:57 +0100)] 
[3.14] gh-130327: Always traverse managed dictionaries, even when inline values are available (GH-130469) (#145438)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
6 weeks ago[3.14] gh-130555: Fix use-after-free in dict.clear() with embedded values (gh-145268...
Sam Gross [Mon, 2 Mar 2026 18:59:35 +0000 (13:59 -0500)] 
[3.14] gh-130555: Fix use-after-free in dict.clear() with embedded values (gh-145268) (#145431)

6 weeks ago[3.14] gh-145335: Fix crash when passing -1 as fd in os.pathconf (GH-145390) (#145433)
Miss Islington (bot) [Mon, 2 Mar 2026 18:33:47 +0000 (19:33 +0100)] 
[3.14] gh-145335: Fix crash when passing -1 as fd in os.pathconf (GH-145390) (#145433)

gh-145335: Fix crash when passing -1 as fd in os.pathconf (GH-145390)
(cherry picked from commit 5c3a47b94a39f87c36b1f36704d80775802ad034)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>