]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 days ago[3.14] gh-148821: Add more strict tests for XML encodings (GH-149765) (GH-149771)
Miss Islington (bot) [Wed, 13 May 2026 11:07:04 +0000 (13:07 +0200)] 
[3.14] gh-148821: Add more strict tests for XML encodings (GH-149765) (GH-149771)

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

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

(cherry picked from commit cd6096887e22cdb6d6365ad0eb5b0ffac50d4791)

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

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

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 days ago[3.14] gh-145235: Make dict watcher API thread-safe for free-threaded builds (gh...
Sam Gross [Tue, 12 May 2026 17:21:31 +0000 (17:21 +0000)] 
[3.14] gh-145235: Make dict watcher API thread-safe for free-threaded builds (gh-145233) (#149691)

In free-threaded builds, concurrent calls to PyDict_AddWatcher, PyDict_ClearWatcher, PyDict_Watch, and PyDict_Unwatch can race on the shared callback array and the per-dict watcher tags. This change adds a mutex to serialize watcher registration and removal, atomic operations for tag updates, and atomic acquire/release synchronization for callback dispatch in _PyDict_SendEvent.

(cherry picked from commit 8a4895985f42282504d83b9bd0c77b129f95a5d5)

Co-authored-by: Alper <alperyoney@fb.com>
3 days ago[3.14] Remove myself from CODEOWNERS (GH-149727) (#149733)
Hugo van Kemenade [Tue, 12 May 2026 16:30:10 +0000 (19:30 +0300)] 
[3.14] Remove myself from CODEOWNERS (GH-149727) (#149733)

(cherry picked from commit 058c12528d98954c44d6f92f2eea48b881c1967f)

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

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

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

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

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

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

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

* Confirm no accesses
(cherry picked from commit f23a1837d7156c4c478528321a423eae2b31e4bf)

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

---------

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Co-authored-by: Michael Droettboom <mdroettboom@nvidia.com>
4 days ago[3.14] gh-149663: fix typo in `unittest` docs (GH-149670) (#149673)
Miss Islington (bot) [Mon, 11 May 2026 12:01:57 +0000 (14:01 +0200)] 
[3.14] gh-149663: fix typo in `unittest` docs (GH-149670) (#149673)

gh-149663: fix typo in `unittest` docs (GH-149670)

`hastattr` -> `hasattr`
(cherry picked from commit 4956d2be9d5e555f2cf64faed9ef39e6a797c360)

Co-authored-by: Árni Már Jónsson <arnimarj@gmail.com>
4 days ago[3.14] gh-146061: Clarify indent=None in json docs (GH-146095) (GH-149668)
Miss Islington (bot) [Mon, 11 May 2026 11:40:39 +0000 (13:40 +0200)] 
[3.14] gh-146061: Clarify indent=None in json docs (GH-146095) (GH-149668)

(cherry picked from commit 833dae7c1fdc556200cbfc3e76bad4d54628042c)

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

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

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

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

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
5 days ago[3.14] gh-148441: Avoid integer overflow in Expat's CharacterDataHandler (GH-148904...
Miss Islington (bot) [Sun, 10 May 2026 14:08:59 +0000 (16:08 +0200)] 
[3.14] gh-148441: Avoid integer overflow in Expat's CharacterDataHandler (GH-148904) (#149638)

gh-148441: Avoid integer overflow in Expat's CharacterDataHandler (GH-148904)
(cherry picked from commit bc1be4f6174086b4a46e3fe656552f5bb4e6e7b2)

Co-authored-by: ByteFlow <fakeshadow1337@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
5 days agoPost 3.14.5
Hugo van Kemenade [Sun, 10 May 2026 12:27:46 +0000 (15:27 +0300)] 
Post 3.14.5

5 days agoPython 3.14.5 v3.14.5
Hugo van Kemenade [Sun, 10 May 2026 10:21:08 +0000 (13:21 +0300)] 
Python 3.14.5

5 days ago[3.14] gh-124111: Update macOS installer to use Tcl/Tk 9.0.3. (#149463)
Ned Deily [Sun, 10 May 2026 04:10:20 +0000 (00:10 -0400)] 
[3.14] gh-124111: Update macOS installer to use Tcl/Tk 9.0.3. (#149463)

5 days ago[3.14] gh-141388: Improve docs/tests for non-function callables as annotate functions...
Miss Islington (bot) [Sat, 9 May 2026 21:58:51 +0000 (23:58 +0200)] 
[3.14] gh-141388: Improve docs/tests for non-function callables as annotate functions (GH-142327) (#149304)

gh-141388: Improve docs/tests for non-function callables as annotate functions (GH-142327)
(cherry picked from commit c1940bcfc8a80d0d66f3f7f03e776d0d23ebb59b)

Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
5 days ago[3.14] Fix minor typos in unicode.rst (GH-149587) (#149621)
Miss Islington (bot) [Sat, 9 May 2026 21:38:55 +0000 (23:38 +0200)] 
[3.14] Fix minor typos in unicode.rst (GH-149587) (#149621)

Fix minor typos in unicode.rst (GH-149587)
(cherry picked from commit 4e97ff3351f381a61b238bd8e805e4e8dd3ea5cf)

Co-authored-by: Manoj K M <manojkmdev24@gmail.com>
6 days ago[3.14] gh-149388: Make asyncio `PipeHandle.close` idempotent (GH-149518) (#149606)
Miss Islington (bot) [Sat, 9 May 2026 15:08:23 +0000 (17:08 +0200)] 
[3.14] gh-149388: Make asyncio `PipeHandle.close` idempotent (GH-149518) (#149606)

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

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

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

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
7 days ago[3.14] gh-145176: Update CODEOWNERS for Emscripten migration to Platforms directory...
Malcolm Smith [Fri, 8 May 2026 12:52:54 +0000 (13:52 +0100)] 
[3.14] gh-145176: Update CODEOWNERS for Emscripten migration to Platforms directory (GH-149544) (#149559)

7 days ago[3.14] docs: Clarify docs for error case of `PyDict_GetItemRef` (GH-149506) (#149547)
Miss Islington (bot) [Fri, 8 May 2026 11:07:00 +0000 (13:07 +0200)] 
[3.14] docs: Clarify docs for error case of `PyDict_GetItemRef` (GH-149506) (#149547)

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

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
8 days ago[3.14] gh-142295: Update macOS framework build Info.plist files. (#149482)
Ned Deily [Thu, 7 May 2026 04:49:58 +0000 (00:49 -0400)] 
[3.14] gh-142295: Update macOS framework build Info.plist files. (#149482)

For Python macOS framework builds, update all Info.plist files to be more
compliant with current Apple guidelines. Original patch contributed by
Martinus Verburg.

(cherry picked from commit 5fcab14c3506ecc7df14916a57bfbb1710b8c7ba)

9 days ago[3.14] Rewrite RTD configuration to use build.jobs rather than build.commands (GH...
Zachary Ware [Wed, 6 May 2026 15:49:11 +0000 (10:49 -0500)] 
[3.14] Rewrite RTD configuration to use build.jobs rather than build.commands (GH-149432)

As part of this conversion, we now ensure that we're comparing against the
merge-base of the PR branch and the base branch when checking whether an RTD
build is worthwhile, deepening the history of the base branch by up to 500
commits if necessary.  If the merge-base can't be found or there are merge
conflicts with the head of the base branch, the build is skipped since it would
give a warped perception of the actual changes anyway.

This unfortunately does nothing about RTD preview comments comparing against
the wrong base, other than skipping builds that shouldn't produce any diff at
all thus avoiding the comment.

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
(adapted from 1dcc546d841a5e88675eb2af2c55b63f26930ccf)

9 days ago[3.14] gh-146270: Fix `PyMember_SetOne(..., NULL)` not being atomic (gh-148800) ...
Miss Islington (bot) [Wed, 6 May 2026 14:16:36 +0000 (16:16 +0200)] 
[3.14] gh-146270: Fix `PyMember_SetOne(..., NULL)` not being atomic (gh-148800) (#149460)

Fixes a sequential consistency bug whereby two threads that are deleting a struct member may observe both their deletions to be successful.

(cherry picked from commit 1bdfc0f253730077ccd3a4b0714388e8227b1b71)

Co-authored-by: Daniele Parmeggiani <8658291+dpdani@users.noreply.github.com>
9 days ago[3.14] gh-148615: Handle `--` separator in pdb argument parsing (GH-1… (#149442)
Tian Gao [Wed, 6 May 2026 04:56:54 +0000 (21:56 -0700)] 
[3.14] gh-148615: Handle `--` separator in pdb argument parsing (GH-1… (#149442)

[3.14] gh-148615: Handle `--` separator in pdb argument parsing (GH-148624)
(cherry picked from commit 970b0433f498fd0d048b1f50229a7f0fb4d9e07a)

Co-authored-by: Shrey Naithani <shrey.naithani@shelllite.tech>
9 days ago[3.14] gh-149096: Remove 'im_*' attribute reference from inspect module docstring...
Miss Islington (bot) [Wed, 6 May 2026 02:50:02 +0000 (04:50 +0200)] 
[3.14] gh-149096: Remove  'im_*' attribute reference from inspect module docstring (GH-149108) (#149439)

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

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

Co-authored-by: Vineet Kumar <108144301+whyvineet@users.noreply.github.com>
9 days ago[3.14] gh-145736: Fix test_tkinter test_configure_values test case backport miss...
Ned Deily [Tue, 5 May 2026 22:24:38 +0000 (18:24 -0400)] 
[3.14] gh-145736: Fix test_tkinter test_configure_values test case backport miss for Tk 9. (#149435)

9 days ago[3.14] gh-149425: Increase `test_write_without_source_date_epoch` assertion delta...
Miss Islington (bot) [Tue, 5 May 2026 21:48:22 +0000 (23:48 +0200)] 
[3.14] gh-149425: Increase `test_write_without_source_date_epoch` assertion delta (GH-149426) (#149433)

gh-149425: Increase `test_write_without_source_date_epoch` assertion delta (GH-149426)
(cherry picked from commit 17975f92edd2a6a84549e19f683f78a96992ec80)

Co-authored-by: Eduardo Villalpando Mello <eduardo.villalpando.mello@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
10 days ago[3.14] gh-149410: Test that `typing.NoDefault` is final (GH-149411) (#149419)
Miss Islington (bot) [Tue, 5 May 2026 15:25:23 +0000 (17:25 +0200)] 
[3.14] gh-149410: Test that `typing.NoDefault` is final (GH-149411) (#149419)

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

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

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

Co-authored-by: sobolevn <mail@sobolevn.me>
10 days ago[3.14] gh-137293: Ignore Exceptions when searching ELF File in Remote Debug (GH-13730...
Miss Islington (bot) [Tue, 5 May 2026 01:15:33 +0000 (03:15 +0200)] 
[3.14] gh-137293: Ignore Exceptions when searching ELF File in Remote Debug (GH-137309) (#149391)

gh-137293: Ignore Exceptions when searching ELF File in Remote Debug (GH-137309)
(cherry picked from commit 2995d4565978365233e01ad8b472c5512f3991be)

Co-authored-by: Uxío García Andrade <uxiog21@gmail.com>
10 days ago[3.14] GH-130750: Restore quoting of choices in argparse error messag… (#149385)
Savannah Ostrowski [Mon, 4 May 2026 22:22:54 +0000 (15:22 -0700)] 
[3.14] GH-130750: Restore quoting of choices in argparse error messag… (#149385)

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

10 days ago[3.14] gh-148178: Validate remote debug offset tables on load (GH-148187) (#148577)
Pablo Galindo Salgado [Mon, 4 May 2026 21:43:43 +0000 (22:43 +0100)] 
[3.14] gh-148178: Validate remote debug offset tables on load (GH-148187) (#148577)

Treat the debug offset tables read from a target process as untrusted input
and validate them before the unwinder uses any reported sizes or offsets.

Add a shared validator in debug_offsets_validation.h and run it once when
_Py_DebugOffsets is loaded and once when AsyncioDebug is loaded. The checks
cover section sizes used for fixed local buffers and every offset that is
later dereferenced against a local buffer or local object view. This keeps
the bounds checks out of the sampling hot path while rejecting malformed
tables up front.
(cherry picked from commit 289fd2c97a7e5aecb8b69f94f5e838ccfeee7e67)

10 days ago[3.14] gh-137030: Fix YIELD_VALUE bytecode assertion (#149184) (#149383)
Victor Stinner [Mon, 4 May 2026 21:41:19 +0000 (23:41 +0200)] 
[3.14] gh-137030: Fix YIELD_VALUE bytecode assertion (#149184) (#149383)

gh-137030: Fix YIELD_VALUE bytecode assertion (#149184)

(cherry picked from commit 952784af4793e6f819bfecc6e0a50676c7256e3a)

Co-authored-by: Mark Shannon <mark@hotpy.org>
11 days ago[3.14] gh-149377: update bundled pip to 26.1.1 (GH-149378) (#149379)
Miss Islington (bot) [Mon, 4 May 2026 20:43:08 +0000 (22:43 +0200)] 
[3.14] gh-149377: update bundled pip to 26.1.1 (GH-149378) (#149379)

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

Co-authored-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
11 days agoMerge branch '3.14' of https://github.com/python/cpython into 3.14
Hugo van Kemenade [Mon, 4 May 2026 20:01:29 +0000 (23:01 +0300)] 
Merge branch '3.14' of https://github.com/python/cpython into 3.14

11 days agoPost 3.14.5rc1
Hugo van Kemenade [Mon, 4 May 2026 20:00:33 +0000 (23:00 +0300)] 
Post 3.14.5rc1

11 days ago[3.14] gh-138907: Support RFC 9309 in robotparser (GH-138908) (GH-149374)
Miss Islington (bot) [Mon, 4 May 2026 18:28:54 +0000 (20:28 +0200)] 
[3.14] gh-138907: Support RFC 9309 in robotparser (GH-138908) (GH-149374)

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

(cherry picked from commit bc285e583286c739e553e49c19fd946cb63432c7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
11 days agoPython 3.14.5rc1 v3.14.5rc1
Hugo van Kemenade [Mon, 4 May 2026 15:31:15 +0000 (18:31 +0300)] 
Python 3.14.5rc1

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

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

Co-authored-by: Kit Dallege <xaum.io@gmail.com>
11 days ago[3.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>
11 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)

11 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>
12 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>
13 days 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.

13 days 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)

13 days 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>