]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
11 days ago[3.14] gh-147998: Fix possible memory leak in _pop_preserved (crossinterp.c) (GH...
Miss Islington (bot) [Mon, 4 May 2026 14:11:04 +0000 (16:11 +0200)] 
[3.14] gh-147998: Fix possible memory leak in _pop_preserved (crossinterp.c) (GH-147999) (GH-149365)

(cherry picked from commit 72f29dc704812aa846b10323a31743d6df37cc2c)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
11 days ago[3.14] gh-148418: Fix a possible reference leak in a corrupted TYPE_CODE marshal...
Miss Islington (bot) [Mon, 4 May 2026 14:07:43 +0000 (16:07 +0200)] 
[3.14] gh-148418: Fix a possible reference leak in a corrupted TYPE_CODE marshal stream (GH-148419) (GH-149363)

(cherry picked from commit c3972f2795bf9270008d09dc6919b9735e20c606)

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

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

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

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

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

(cherry picked from commit 1504bd671eebce0a99c15c113d219e0f344c03d9)

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

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>
12 days ago[3.14] GH-146475: Block Apple Clang for building JIT stencils (#149188) (#149339)
Savannah Ostrowski [Mon, 4 May 2026 00:30:24 +0000 (17:30 -0700)] 
[3.14] GH-146475: Block Apple Clang for building JIT stencils (#149188) (#149339)

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

(cherry picked from commit c0e064003954142b4ba820dfe149f893227c4f11)

12 days ago[3.14] gh-149254: Update CI to use latest OpenSSL versions (GH-149333)
Zachary Ware [Sun, 3 May 2026 21:11:42 +0000 (16:11 -0500)] 
[3.14] gh-149254: Update CI to use latest OpenSSL versions (GH-149333)

Also update Modules/_ssl_data_35.h to include an added symbol from 3.5.6.

(adapted from commit 68fe899feb8515113d09a4161f34ae45809b807a)

12 days ago[3.14] gh-149254: Update Windows builds to OpenSSL 3.0.20 (GH-149327)
Zachary Ware [Sun, 3 May 2026 20:04:51 +0000 (15:04 -0500)] 
[3.14] gh-149254: Update Windows builds to OpenSSL 3.0.20 (GH-149327)

12 days ago[3.14] gh-149267: Document ast.Constant.kind attribute (GH-149268) (#149293)
Miss Islington (bot) [Sun, 3 May 2026 16:04:14 +0000 (18:04 +0200)] 
[3.14] gh-149267: Document ast.Constant.kind attribute (GH-149268) (#149293)

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>
12 days ago[3.14] gh-148063: documentation: move ast.compare from "Compiler flags" to "ast helpe...
Miss Islington (bot) [Sun, 3 May 2026 16:02:25 +0000 (18:02 +0200)] 
[3.14] gh-148063: documentation: move ast.compare from "Compiler flags" to "ast helpers" (GH-147954) (#149291)

(cherry picked from commit 7b0244dbc7a5ba037e2cf2b5c8db1e35a0643a18)

Co-authored-by: Hunter Hogan <hunterhogan@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
12 days ago[3.14] Ignore `/jit_unwind_info*.h` from git (GH-149311) (#149314)
Miss Islington (bot) [Sun, 3 May 2026 09:58:09 +0000 (11:58 +0200)] 
[3.14] Ignore `/jit_unwind_info*.h` from git (GH-149311) (#149314)

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

Co-authored-by: sobolevn <mail@sobolevn.me>
13 days ago[3.14] gh-149221: Sync random.py with main branch (#149288)
Jelle Zijlstra [Sat, 2 May 2026 21:44:53 +0000 (14:44 -0700)] 
[3.14] gh-149221: Sync random.py with main branch (#149288)

* [3.14] fix trailing whitespace

* sync with main

13 days ago[3.14] gh-149285: Increase recursion depth for `test_xml_etree` from 150k to 500k...
Miss Islington (bot) [Sat, 2 May 2026 16:29:49 +0000 (18:29 +0200)] 
[3.14] gh-149285: Increase recursion depth for `test_xml_etree` from 150k to 500k (GH-149286) (#149287)

(cherry picked from commit b1d62317362055da7e2248a76a00c0f46cacac7a)

Co-authored-by: Zanie Blue <contact@zanie.dev>
13 days ago[3.14]gh-149221:Fix binomialvariate Function for random module (gh-149276)
lighting9999 [Sat, 2 May 2026 12:57:42 +0000 (20:57 +0800)] 
[3.14]gh-149221:Fix binomialvariate Function for random module (gh-149276)

13 days ago[3.14] gh-148914: Fix memoization of in-band PickleBuffer in the Python implementatio...
Miss Islington (bot) [Sat, 2 May 2026 09:30:16 +0000 (11:30 +0200)] 
[3.14] gh-148914: Fix memoization of in-band PickleBuffer in the Python implementation (GH-149052) (GH-149274)

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>
2 weeks ago[3.14] gh-149254: Bump OpenSSL versions for iOS and Android. (#149272)
Russell Keith-Magee [Sat, 2 May 2026 08:51:06 +0000 (16:51 +0800)] 
[3.14] gh-149254: Bump OpenSSL versions for iOS and Android. (#149272)

Bump OpenSSL to 3.0.20 for iOS and Android.

2 weeks ago[3.14] gh-149254: Update macOS installer to use OpenSSL 3.0.20. (#149263)
Ned Deily [Sat, 2 May 2026 03:53:44 +0000 (23:53 -0400)] 
[3.14] gh-149254: Update macOS installer to use OpenSSL 3.0.20. (#149263)

2 weeks ago[3.14] gh-149117: Set `ImportError.name` on errors from `runpy.run_module`/`run_path...
Miss Islington (bot) [Sat, 2 May 2026 02:54:02 +0000 (04:54 +0200)] 
[3.14] gh-149117: Set `ImportError.name` on errors from `runpy.run_module`/`run_path` (gh-149159) (#149257)

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>
2 weeks ago[3.14] gh-149242: Heap size should be added at end of the struct (#149241)
Dino Viehland [Fri, 1 May 2026 19:56:30 +0000 (12:56 -0700)] 
[3.14] gh-149242: Heap size should be added at end of the struct  (#149241)

Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2 weeks ago[3.14] Fix source link in `Doc/howto/descriptor.rst` (GH-149215) (#149250)
Miss Islington (bot) [Fri, 1 May 2026 19:47:47 +0000 (21:47 +0200)] 
[3.14] Fix source link in `Doc/howto/descriptor.rst` (GH-149215) (#149250)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.14] gh-148726: Document the GC change in What's New in Python 3.14 (GH-149209...
Hugo van Kemenade [Fri, 1 May 2026 19:08:33 +0000 (22:08 +0300)] 
[3.14] gh-148726: Document the GC change in What's New in Python 3.14 (GH-149209) (#149249)

2 weeks ago[3.14] gh-148390: fix undefined behavior of `memoryview(...).cast("?")` (GH-148454...
Stan Ulbrych [Fri, 1 May 2026 15:43:59 +0000 (16:43 +0100)] 
[3.14] gh-148390: fix undefined behavior of `memoryview(...).cast("?")` (GH-148454) (GH-148667)

(cherry picked from commit 69e0a78e6edc3166c7a5b166955c0cefd1bacd5d)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 weeks ago[3.14] gh-148967: Fix FFI type pointer handling for C complex support in set_stginfo_...
Miss Islington (bot) [Fri, 1 May 2026 13:43:38 +0000 (15:43 +0200)] 
[3.14] gh-148967: Fix FFI type pointer handling for C complex support in set_stginfo_ffi_type_pointer (GH-148969) (GH-149224)

(cherry picked from commit f2c7c0d2b799c927d9a78e87e4a640d3f9b0356c)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
2 weeks ago[3.14] gh-111264: Add a note about untrusted input to tomllib docs (GH-146209) (GH...
Petr Viktorin [Fri, 1 May 2026 12:42:33 +0000 (14:42 +0200)] 
[3.14] gh-111264: Add a note about untrusted input to tomllib docs (GH-146209) (GH-149223)

(cherry picked from commit 9d41e2a534aab460dd656ef251adaed5d2d64b93)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.14] gh-148518 fix index error in local part attribute (GH-148522) (#149200)
Miss Islington (bot) [Thu, 30 Apr 2026 22:13:52 +0000 (00:13 +0200)] 
[3.14] gh-148518 fix index error in local part attribute (GH-148522) (#149200)

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

Co-authored-by: R. David Murray <rdmurray@bitdance.com>
2 weeks ago[3.14] Remove dead links to `pkg_resources` in `importlib` docs (GH-148344) (#148964)
Stan Ulbrych [Thu, 30 Apr 2026 19:42:35 +0000 (20:42 +0100)] 
[3.14] Remove dead links to `pkg_resources` in `importlib` docs (GH-148344) (#148964)

(cherry picked from commit 1b691564a785721dc71e230a9809dd37adff5f13)

2 weeks ago[3.14] bpo-39100: _header_value_parser: do not treat a Group as invalid-mailbox ...
Miss Islington (bot) [Thu, 30 Apr 2026 18:15:21 +0000 (20:15 +0200)] 
[3.14] bpo-39100: _header_value_parser: do not treat a Group as invalid-mailbox (GH-24872) (#149191)

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

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

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

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

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

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

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

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

Co-authored-by: elenril <anton@khirnov.net>
2 weeks ago[3.14] gh-149122: Fix refleak in codegen (GH-149179) (#149181)
Miss Islington (bot) [Thu, 30 Apr 2026 13:12:52 +0000 (15:12 +0200)] 
[3.14] gh-149122: Fix refleak in codegen (GH-149179) (#149181)

gh-149122: Fix refleak in codegen (GH-149179)
(cherry picked from commit 4599335a83a22cf73a0c20e3692c29fd0278d23b)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2 weeks ago[3.14] gh-149148: Upgrade bundled pip to 26.1 (GH-149150) (#149154)
Miss Islington (bot) [Wed, 29 Apr 2026 15:02:20 +0000 (17:02 +0200)] 
[3.14] gh-149148: Upgrade bundled pip to 26.1 (GH-149150) (#149154)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.14] gh-148740: Fix `uuid` CLI with custom UUIDs for UUIDv3/v5 namespaces (GH-14874...
Miss Islington (bot) [Wed, 29 Apr 2026 15:00:13 +0000 (17:00 +0200)] 
[3.14] gh-148740: Fix `uuid` CLI with custom UUIDs for UUIDv3/v5 namespaces (GH-148741) (#149152)

gh-148740: Fix `uuid` CLI with custom UUIDs for UUIDv3/v5 namespaces (GH-148741)
(cherry picked from commit f1588d460db97086f5ea28b5797ccdcfffb0307f)

Co-authored-by: Jansen Price <sumpygump@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 weeks ago[3.14] gh-149122: Fix segfault in compiler when certain builtin functions are passed...
Miss Islington (bot) [Wed, 29 Apr 2026 14:01:45 +0000 (16:01 +0200)] 
[3.14] gh-149122: Fix segfault in compiler when certain builtin functions are passed a coroutine as arg (GH-149138) (#149151)

gh-149122: Fix segfault in compiler when certain builtin functions are passed a coroutine as arg (GH-149138)
(cherry picked from commit 16f292ef4e8c56bfd115ecdb91420c7b4006249f)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2 weeks ago[3.14] GH-148726: Add heap_size to _gc_runtime_state (#149025)
Sergey Miryanov [Wed, 29 Apr 2026 10:04:11 +0000 (15:04 +0500)] 
[3.14] GH-148726: Add heap_size to _gc_runtime_state (#149025)

2 weeks ago[3.14] gh-97032: avoid test_squeezer crash on macOS buildbots (gh-115508) (GH-148141...
Miss Islington (bot) [Wed, 29 Apr 2026 10:00:43 +0000 (12:00 +0200)] 
[3.14] gh-97032: avoid test_squeezer crash on macOS buildbots (gh-115508) (GH-148141) (#148414)

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

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

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks ago[3.14] gh-149017: Upgrade bundled Expat to 2.8.0 (GH-149020) (#149073)
Stan Ulbrych [Tue, 28 Apr 2026 13:30:12 +0000 (14:30 +0100)] 
[3.14] gh-149017: Upgrade bundled Expat to 2.8.0 (GH-149020) (#149073)

(cherry picked from commit 005555a3f0ae20ee8154eb4ee172e1e355144c8c)

2 weeks ago[3.14] gh-149035: Modernize legacy Python patterns in `Doc/tutorial/stdlib2.rst`...
Miss Islington (bot) [Tue, 28 Apr 2026 05:17:18 +0000 (07:17 +0200)] 
[3.14] gh-149035: Modernize legacy Python patterns in `Doc/tutorial/stdlib2.rst` (GH-149036) (#149089)

Co-authored-by: ByteFlow <fakeshadow1337@gmail.com>
Co-authored-by: Copilot <copilot@github.com>
2 weeks ago[3.14] gh-148529: Minor improvements of the struct module documentation (GH-148565...
Miss Islington (bot) [Mon, 27 Apr 2026 20:07:00 +0000 (22:07 +0200)] 
[3.14] gh-148529: Minor improvements of the struct module documentation (GH-148565) (GH-149063)

* 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)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.14] gh-148663: Document that `calendar.IllegalMonthError` inherits from both ...
Miss Islington (bot) [Mon, 27 Apr 2026 20:00:46 +0000 (22:00 +0200)] 
[3.14] gh-148663: Document that `calendar.IllegalMonthError` inherits from both `ValueError` and `IndexError` (GH-148664) (#148917)

(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>
2 weeks ago[3.14] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windo...
Miss Islington (bot) [Mon, 27 Apr 2026 19:55:02 +0000 (21:55 +0200)] 
[3.14] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows (GH-146591) (GH-149064)

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

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

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

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.14] Un-skip previously-broken `test_get_type_hints_modules_forward_ref` (#149053)
Thomas Kowalski [Mon, 27 Apr 2026 16:54:56 +0000 (18:54 +0200)] 
[3.14] Un-skip previously-broken `test_get_type_hints_modules_forward_ref` (#149053)

2 weeks ago[3.14] Improve `hash()` builtin docstring with caveats. (GH-125229) (#149054)
Gregory P. Smith [Mon, 27 Apr 2026 16:17:30 +0000 (09:17 -0700)] 
[3.14] Improve  `hash()` builtin docstring with caveats. (GH-125229) (#149054)

Improve  `hash()` builtin docstring with caveats.

Mention its return type and that the value can be expected to change between
processes (hash randomization).

Why? The `hash` builtin gets reached for and used by a lot of people whether it
is the right tool or not. IDEs surface docstrings and people use pydoc and
`help(hash)`.
(cherry picked from commit 665b7dfcfa240e02760f58bed5ca29ec01d028e6)

2 weeks ago[3.14] gh-82665 Mention that HTMLParser.handle_starttag value can be None (GH-134312...
Miss Islington (bot) [Mon, 27 Apr 2026 14:30:00 +0000 (16:30 +0200)] 
[3.14] gh-82665 Mention that HTMLParser.handle_starttag value can be None (GH-134312) (#149037)

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

* Specify boolean attribute behavior in parser

* Tweak wording and example

* Fix backticks

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

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

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

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

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2 weeks ago[3.14] GH-148726: Forward-port generational GC (#148720)
Sergey Miryanov [Sun, 26 Apr 2026 18:12:52 +0000 (23:12 +0500)] 
[3.14] GH-148726: Forward-port generational GC (#148720)

Co-authored-by: Neil Schemenauer <nas@arctrix.com>
Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2 weeks ago[3.14] gh-146455: Fix O(N²) in add_const() after constant folding moved to CFG (GH...
Miss Islington (bot) [Sun, 26 Apr 2026 15:45:38 +0000 (17:45 +0200)] 
[3.14] gh-146455: Fix O(N²) in add_const() after constant folding moved to CFG (GH-146456) (#149011)

gh-146455: Fix O(N²) in add_const() after constant folding moved to CFG (GH-146456)

The add_const() function in flowgraph.c uses a linear search over the
consts list to find the index of a constant. After gh-126835 moved
constant folding from the AST optimizer to the CFG optimizer, this
function is now called N times for N inner tuple elements during
fold_tuple_of_constants(), resulting in O(N²) total time.

Fix by maintaining an auxiliary _Py_hashtable_t that maps object
pointers to their indices in the consts list, providing O(1) lookup.

For a file with 100,000 constant 2-tuples:
- Before: 10.38s (add_const occupies 83.76% of CPU time)
- After:  1.48s
(cherry picked from commit 5d416324c56cd6f262fa123f41b97b48631bea79)

Co-authored-by: zSirius <107359899+zSirius@users.noreply.github.com>
2 weeks ago[3.14] gh-141473: Speed up subprocess test_communicate_timeout_large_input long tail...
Miss Islington (bot) [Sun, 26 Apr 2026 04:29:47 +0000 (06:29 +0200)] 
[3.14] gh-141473: Speed up subprocess test_communicate_timeout_large_input long tail (GH-149003) (#149004)

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

gh-141473: Speed up test_communicate_timeout_large_input

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

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2 weeks ago[3.14] gh-148947: dataclasses: fix error on empty __class__ cell (GH-148948) (#148995)
Miss Islington (bot) [Sat, 25 Apr 2026 15:57:33 +0000 (17:57 +0200)] 
[3.14] gh-148947: dataclasses: fix error on empty __class__ cell  (GH-148948) (#148995)

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: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks ago[3.14] gh-148973: fix segfault on mismatch between consts size and oparg in compiler...
Miss Islington (bot) [Sat, 25 Apr 2026 12:53:42 +0000 (14:53 +0200)] 
[3.14] gh-148973: fix segfault on mismatch between consts size and oparg in compiler (GH-148974) (#148980)

gh-148973: fix segfault on mismatch between consts size and oparg in compiler (GH-148974)
(cherry picked from commit c650b51c32f92563f3319bb25c64ca2d2dc05ec0)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 weeks ago[3.14] gh-148735: Fix a UAF in `Element.findtext()` (GH-148738) (#148916)
Miss Islington (bot) [Fri, 24 Apr 2026 20:38:15 +0000 (22:38 +0200)] 
[3.14] gh-148735: Fix a UAF in `Element.findtext()` (GH-148738) (#148916)

(cherry picked from commit 0469e6d38dcb3ff904690028cb3a25155bdcedae)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.14] Additional itertool recipes for running statistics (gh-148879) (gh-148949)
Miss Islington (bot) [Fri, 24 Apr 2026 05:52:35 +0000 (07:52 +0200)] 
[3.14] Additional itertool recipes for running statistics (gh-148879) (gh-148949)

3 weeks ago[3.14] gh-113956: Make intern_common thread-safe in free-threaded build (gh-148886...
Sam Gross [Thu, 23 Apr 2026 19:12:19 +0000 (15:12 -0400)] 
[3.14] gh-113956: Make intern_common thread-safe in free-threaded build (gh-148886) (#148927)

Avoid racing with the owning thread's refcount operations when
immortalizing an interned string: if we don't own it and its refcount
isn't merged, intern a copy we own instead. Use atomic stores in
_Py_SetImmortalUntracked so concurrent atomic reads are race-free.

(cherry picked from commit 4629c2215a9a4b3d1ec4a306cd4dd7d11dcfebb4)

3 weeks ago[3.14] gh-132631: Fix "I/O operation on closed file" when parsing JSON Lines file...
Miss Islington (bot) [Thu, 23 Apr 2026 16:32:29 +0000 (18:32 +0200)] 
[3.14] gh-132631: Fix "I/O operation on closed file" when parsing JSON Lines file (GH-132632) (#148921)

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

(cherry picked from commit afde75664eb3ff3e147806f027c9da54c7eb77d4)

Co-authored-by: Gleb Popov <gvpopov.dev@gmail.com>
3 weeks ago[3.14] gh-148464: Add missing ``__ctype_le/be__`` attributes for complex types in...
Miss Islington (bot) [Thu, 23 Apr 2026 13:57:55 +0000 (15:57 +0200)] 
[3.14] gh-148464: Add missing ``__ctype_le/be__`` attributes for complex types in the ctype module (GH-148485) (GH-148677)

(cherry picked from commit 769cc8338f35eb134508aca701a59342bcb6a84b)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
3 weeks ago[3.14] gh-148680: Replace internal names with type_reprs of objects in string represe...
Miss Islington (bot) [Thu, 23 Apr 2026 13:47:52 +0000 (15:47 +0200)] 
[3.14] gh-148680: Replace internal names with type_reprs of objects in string representations of ForwardRef (GH-148682) (#148913)

(cherry picked from commit 158dbbb97fffbc47eb446d2b1576ce887e5c1802)

Co-authored-by: David Ellis <ducksual@gmail.com>
Co-authored-by: Shamil <ashm.tech@proton.me>
3 weeks ago[3.14] gh-90309: Base64-encode cookie values embedded in JS (GH-148889)
Miss Islington (bot) [Thu, 23 Apr 2026 13:05:09 +0000 (15:05 +0200)] 
[3.14] gh-90309: Base64-encode cookie values embedded in JS (GH-148889)

(cherry picked from commit 76b3923d688c0efc580658476c5f525ec8735104)

Co-authored-by: Seth Larson <seth@python.org>
3 weeks ago[3.14] gh-148892: Drop mention of deprecated cibuildwheel option (GH-148893) (#148903)
Miss Islington (bot) [Thu, 23 Apr 2026 04:06:39 +0000 (06:06 +0200)] 
[3.14] gh-148892: Drop mention of deprecated cibuildwheel option (GH-148893) (#148903)

gh-148892: Drop mention of deprecated cibuildwheel option (GH-148893)
(cherry picked from commit 3b9397988d1f83740e7d73d17d56767976a583b4)

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
3 weeks ago[3.14] gh-119180: Document the `format` parameter in `typing.get_type_hints()` (GH...
Miss Islington (bot) [Thu, 23 Apr 2026 02:59:18 +0000 (04:59 +0200)] 
[3.14] gh-119180: Document the `format` parameter in `typing.get_type_hints()` (GH-143758) (#148901)

Do not mention `__annotations__` dictionaries, as this is slightly
outdated since 3.14.

Rewrite the note about possible exceptions for clarity. Also do not
mention imported type aliases, as since 3.12 aliases with the `type`
statement do not suffer from this limitation anymore.
(cherry picked from commit 8bf99ae3a9f12d105a70d6fda93dddde4adeee8f)

Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
3 weeks ago[3.14] gh-142965: Fix Concatenate documentation to reflect valid use cases (GH-143316...
Miss Islington (bot) [Thu, 23 Apr 2026 02:57:54 +0000 (04:57 +0200)] 
[3.14] gh-142965: Fix Concatenate documentation to reflect valid use cases (GH-143316) (#148899)

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

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

(cherry picked from commit be833e658aaf6703b0dd0c0dadb893d72cbe4c77)

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

(cherry picked from commit bd7352d8071dc00531f2c527977602729f2d3ec6)

Co-authored-by: Vikash Kumar <163628932+Vikash-Kumar-23@users.noreply.github.com>
3 weeks ago[3.14] Add a new Sphinx `soft-deprecated` directive (GH-148630) (#148714)
Hugo van Kemenade [Wed, 22 Apr 2026 21:41:40 +0000 (00:41 +0300)] 
[3.14] Add a new Sphinx `soft-deprecated` directive (GH-148630) (#148714)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.14] gh-148801: Fix unbound C recursion in `Element.__deepcopy__()` (GH-148802...
Stan Ulbrych [Wed, 22 Apr 2026 21:19:25 +0000 (22:19 +0100)] 
[3.14] gh-148801: Fix unbound C recursion in `Element.__deepcopy__()` (GH-148802) (#148842)

(cherry picked from commit 33e82be1746a964b595b2bba64f38a5787681eb3)

3 weeks ago[3.14] gh-148820: Fix _PyRawMutex use-after-free on spurious semaphore wakeup (gh...
Sam Gross [Wed, 22 Apr 2026 18:59:58 +0000 (14:59 -0400)] 
[3.14] gh-148820: Fix _PyRawMutex use-after-free on spurious semaphore wakeup (gh-148852) (#148884)

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

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

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

(cherry picked from commit ad3c5b7958b890382f431a53349320cb7c84d405)

3 weeks ago[3.14] gh-146578: _zstd: Fix printf format for pledged size errors (GH-146576) (...
Miss Islington (bot) [Tue, 21 Apr 2026 20:31:46 +0000 (22:31 +0200)] 
[3.14] gh-146578: _zstd: Fix printf format for pledged size errors (GH-146576) (#148855)

gh-146578: _zstd: Fix printf format for pledged size errors (GH-146576)

Use %llu instead of %ull for unsigned long long in zstd_contentsize_converter ValueError messages.
(cherry picked from commit 09233bd19879284395aff97d7357b693893e6dd7)

Co-authored-by: cui <cuiweixie@gmail.com>
3 weeks ago[3.14] gh-148808: Add boundary check to asyncio.AbstractEventLoop.sock_recvf… (GH...
Miss Islington (bot) [Tue, 21 Apr 2026 16:26:19 +0000 (18:26 +0200)] 
[3.14] gh-148808: Add boundary check to asyncio.AbstractEventLoop.sock_recvf… (GH-148809) (#148837)

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

Co-authored-by: Seth Larson <seth@python.org>
3 weeks ago[3.14] gh-146211: Reject CR/LF in HTTP tunnel request headers (GH-146212) (#148342)
Miss Islington (bot) [Tue, 21 Apr 2026 07:49:37 +0000 (09:49 +0200)] 
[3.14] gh-146211: Reject CR/LF in HTTP tunnel request headers (GH-146212) (#148342)

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>
3 weeks ago[3.14] gh-148814: Fix an issue in Emscripten README (GH-148752) (#148815)
Miss Islington (bot) [Mon, 20 Apr 2026 23:10:52 +0000 (01:10 +0200)] 
[3.14] gh-148814: Fix an issue in Emscripten README (GH-148752) (#148815)

Correct the description of the default state of test module compilation.
(cherry picked from commit d206d42834b2a34aee11b048357131371cf6947d)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.14] Docs: Fix some typos in `calendar.rst` (GH-148756) (GH-148795)
Miss Islington (bot) [Mon, 20 Apr 2026 14:43:12 +0000 (16:43 +0200)] 
[3.14] Docs: Fix some typos in `calendar.rst` (GH-148756) (GH-148795)

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

Co-authored-by: Manoj K M <manojkmdev24@gmail.com>
3 weeks ago[3.14] gh-148788: Update Emscripten example post move to Platforms dir (GH-148761...
Miss Islington (bot) [Mon, 20 Apr 2026 02:36:44 +0000 (04:36 +0200)] 
[3.14] gh-148788: Update Emscripten example post move to Platforms dir (GH-148761) (#148789)

Update Emscripten example post move to Platforms dir.
(cherry picked from commit a00b24ec6832f0972823fb0a453a547113fbd55f)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.14] gh-148763: Fix paramter name in `multiprocessing.connection.send_bytes/recv_by...
Miss Islington (bot) [Mon, 20 Apr 2026 00:11:52 +0000 (02:11 +0200)] 
[3.14] gh-148763: Fix paramter name in `multiprocessing.connection.send_bytes/recv_bytes_into` docs (GH-126603) (#148786)

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

Doc: Fix buf argument name in multiprocessing connection send_bytes

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

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

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

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

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
3 weeks ago[3.14] gh-133403: Add type annotations to generate_levenshtein_examples.py (GH-143317...
Miss Islington (bot) [Sun, 19 Apr 2026 09:22:26 +0000 (11:22 +0200)] 
[3.14] gh-133403: Add type annotations to generate_levenshtein_examples.py (GH-143317) (#148734)

Co-authored-by: John Seong <39040639+sandole@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
3 weeks ago[3.14] gh-148653: Fix reference leaks in test_marshal introduced in gh-148698 (GH...
Miss Islington (bot) [Sat, 18 Apr 2026 12:35:51 +0000 (14:35 +0200)] 
[3.14] gh-148653: Fix reference leaks in test_marshal introduced in gh-148698 (GH-148725) (GH-148727)

(cherry picked from commit 7ce737ea11919aebf7eef174f910759e74d0ea50)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 weeks ago[3.14] gh-148653: Fix some marshal errors related to recursive immutable objects...
Serhiy Storchaka [Sat, 18 Apr 2026 08:57:55 +0000 (11:57 +0300)] 
[3.14] gh-148653: Fix some marshal errors related to recursive immutable objects (GH-148698) (GH-148711)

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

4 weeks ago[3.14] gh-148222: Fix NULL dereference bugs in genericaliasobject.c (GH-148226) ...
Miss Islington (bot) [Sat, 18 Apr 2026 00:47:06 +0000 (02:47 +0200)] 
[3.14] gh-148222: Fix NULL dereference bugs in genericaliasobject.c (GH-148226) (#148705)

gh-148222: Fix NULL dereference bugs in genericaliasobject.c (GH-148226)
(cherry picked from commit 634568d030f18183212c01bd4544aa7f97e05442)

Co-authored-by: Prakash Sellathurai <prakashsellathurai@gmail.com>
4 weeks ago[3.14] gh-148651: Fix refcount leak in _zstd decompressor options (GH-148657) (#148691)
Miss Islington (bot) [Fri, 17 Apr 2026 16:07:54 +0000 (18:07 +0200)] 
[3.14] gh-148651: Fix refcount leak in _zstd decompressor options (GH-148657) (#148691)

gh-148651: Fix refcount leak in _zstd decompressor options (GH-148657)

The option parsing in Modules/_zstd/decompressor.c had a missing Py_DECREF(value) before the early return -1 when PyLong_AsInt(key) fails. The identical code in Modules/_zstd/compressor.c line 158 has the fix.
(cherry picked from commit 446edda20919447fdc8b5a43f2f2ae686df82e6a)

Co-authored-by: Michael Bommarito <michael.bommarito@gmail.com>
4 weeks ago[3.14] gh-148535: Don't use gcc -fprofile-update=atomic flag on i686 (GH-148554)...
Miss Islington (bot) [Thu, 16 Apr 2026 17:46:06 +0000 (19:46 +0200)] 
[3.14] gh-148535: Don't use gcc -fprofile-update=atomic flag on i686 (GH-148554) (#148655)

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

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

Co-authored-by: Victor Stinner <vstinner@python.org>
4 weeks ago[3.14] gh-137814: Fix __qualname__ of __annotate__ functions in the interpreter ...
Jelle Zijlstra [Thu, 16 Apr 2026 04:52:43 +0000 (21:52 -0700)] 
[3.14] gh-137814: Fix __qualname__ of __annotate__ functions in the interpreter (#148221)

gh-137814: [3.14] Fix __qualname__ of __annotate__ functions in the interpreter

I'd still like to do #137842 on 3.15+, but that requires changing bytecode and we can't
really afford to do that in 3.14. So to fix this in 3.14, let's patch things up in the
ceval loop instead.

This is safe because the compiler only sets __annotate__ to just-created dedicated
annotate functions.

4 weeks agoAdd PyManager documentation for index signatures (GH-148631)
Miss Islington (bot) [Wed, 15 Apr 2026 21:54:01 +0000 (23:54 +0200)] 
Add PyManager documentation for index signatures (GH-148631)

(cherry picked from commit 54607eec34b42d377a12fe16697e61a1663a1f42)

Co-authored-by: Steve Dower <steve.dower@python.org>
4 weeks ago[3.14] gh-100305: Deemphasize that `ast.literal_eval` is safe in `eval` documentation...
Miss Islington (bot) [Wed, 15 Apr 2026 16:15:42 +0000 (18:15 +0200)] 
[3.14] gh-100305: Deemphasize that `ast.literal_eval` is safe in `eval` documentation (GH-100326) (#148420)

(cherry picked from commit b3b0cef0c2aacdc616fa48674552ab1e34553835)

Co-authored-by: Ram Vikram Singh <ramvikrams243@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
4 weeks ago[3.14] Docs: Use bash lexer for http.server CLI commands, not Python (GH-148612)...
Miss Islington (bot) [Wed, 15 Apr 2026 15:27:06 +0000 (17:27 +0200)] 
[3.14] Docs: Use bash lexer for http.server CLI commands, not Python (GH-148612) (#148620)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
4 weeks ago[3.14] tiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580...
Miss Islington (bot) [Wed, 15 Apr 2026 00:06:41 +0000 (02:06 +0200)] 
[3.14] tiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580) (#148581)

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

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

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

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

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

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

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

Co-authored-by: Kliment Lamonov <klimentlamonov@yandex.ru>
4 weeks ago[3.14] gh-72406: Document argument ordering in argparse help output (GH-148534) ...
Miss Islington (bot) [Tue, 14 Apr 2026 17:42:10 +0000 (19:42 +0200)] 
[3.14] gh-72406: Document argument ordering in argparse help output (GH-148534) (#148562)

gh-72406: Document argument ordering in argparse help output (GH-148534)
(cherry picked from commit 4286227308ee8dafc867062df4cad73af2a84696)

Co-authored-by: Santi Hernandez <santi@santihdzs.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
4 weeks ago[3.14] gh-148192: Fix Generator._make_boundary behavior with CRLF line endings. ...
Miss Islington (bot) [Tue, 14 Apr 2026 16:04:50 +0000 (18:04 +0200)] 
[3.14] gh-148192: Fix Generator._make_boundary behavior with CRLF line endings. (GH-148193) (#148550)

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

Co-authored-by: Henry Jones <44321887+henryivesjones@users.noreply.github.com>
4 weeks ago[3.14] gh-148487: Fix issues in `test_add_python_opts` (GH-148507) (#148545)
Miss Islington (bot) [Tue, 14 Apr 2026 10:12:42 +0000 (12:12 +0200)] 
[3.14] gh-148487: Fix issues in `test_add_python_opts` (GH-148507) (#148545)

gh-148487: Fix issues in `test_add_python_opts` (GH-148507)
(cherry picked from commit 44f1b987ed1908185d8021fd31703b2dd4d97e82)

Co-authored-by: Stan Ulbrych <stan@python.org>
4 weeks ago[3.14] gh-148508: Add resilience to SSL preauth tests on iOS (GH-148536) (#148539)
Miss Islington (bot) [Tue, 14 Apr 2026 04:41:37 +0000 (06:41 +0200)] 
[3.14] gh-148508: Add resilience to SSL preauth tests on iOS (GH-148536) (#148539)

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

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
4 weeks ago[3.14] gh-148370: prevent quadratic behavior in `configparser.ParsingError.combine...
Miss Islington (bot) [Mon, 13 Apr 2026 22:59:47 +0000 (00:59 +0200)] 
[3.14] gh-148370: prevent quadratic behavior in `configparser.ParsingError.combine` (GH-148452) (#148532)

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

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

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

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

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

(cherry picked from commit 0274d8304e5eec23de100d827eb4da06ab7fd8aa)

Co-authored-by: Stan Ulbrych <stan@python.org>
4 weeks ago[3.14] gh-148393: Use acquire load for _ma_watcher_tag in dict notify event (gh-14850...
Miss Islington (bot) [Mon, 13 Apr 2026 18:38:15 +0000 (20:38 +0200)] 
[3.14] gh-148393: Use acquire load for _ma_watcher_tag in dict notify event (gh-148509) (#148512)

The watcher-bits read in _PyDict_NotifyEvent needs to use acquire to
synchronize with the release from PyDict_Watch so that the callback
publication is visible before the callback is invoked.
(cherry picked from commit 19f96f99febe9eadbcc58ffc042791fb017ac90b)

Co-authored-by: Sam Gross <colesbury@gmail.com>
4 weeks ago[3.14] Fix "encodings" typo in argparse.FileType documentation (GH-148502) (#148513)
Miss Islington (bot) [Mon, 13 Apr 2026 18:33:28 +0000 (20:33 +0200)] 
[3.14] Fix "encodings" typo in argparse.FileType documentation (GH-148502) (#148513)

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

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

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

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

Co-authored-by: Stan Ulbrych <stan@python.org>
4 weeks ago[3.14] gh-146450: Ensure Android gradle build uses custom cross-build dir (GH-148319...
Miss Islington (bot) [Mon, 13 Apr 2026 01:13:49 +0000 (03:13 +0200)] 
[3.14] gh-146450: Ensure Android gradle build uses custom cross-build dir (GH-148319) (#148470)

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

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Malcolm Smith <smith@chaquo.com>
4 weeks ago[3.14] tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345...
Miss Islington (bot) [Mon, 13 Apr 2026 01:13:14 +0000 (03:13 +0200)] 
[3.14] tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345) (#148410)

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

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

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

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

Co-authored-by: Artem Yarulin <artem.yarulin@kapteko.com>