]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
14 hours ago[3.13] gh-149035: Modernize legacy Python patterns in `Doc/tutorial/stdlib2.rst`... 3.13
Miss Islington (bot) [Tue, 28 Apr 2026 05:16:36 +0000 (07:16 +0200)] 
[3.13] gh-149035: Modernize legacy Python patterns in `Doc/tutorial/stdlib2.rst` (GH-149036) (#149090)

Co-authored-by: ByteFlow <fakeshadow1337@gmail.com>
Co-authored-by: Copilot <copilot@github.com>
23 hours ago[3.13] gh-148529: Minor improvements of the struct module documentation (GH-148565...
Serhiy Storchaka [Mon, 27 Apr 2026 20:22:47 +0000 (23:22 +0300)] 
[3.13] gh-148529: Minor improvements of the struct module documentation (GH-148565) (GH-149072)

* Document that 's' and 'p' accept bytes and bytearray.
* Fix some footnotes.
* Clarify that "string" is a byte string.
* Fix the module docstring.
(cherry picked from commit 3e5a3cb2bd222f97f793b01bc1c0f7bb62aefc31)

23 hours ago[3.13] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windo...
Miss Islington (bot) [Mon, 27 Apr 2026 19:54:45 +0000 (21:54 +0200)] 
[3.13] gh-146581: Fix vulnerability in shutil.unpack_archive() for ZIP files on Windows (GH-146591) (GH-149065)

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

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

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

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
29 hours ago[3.13] gh-82665 Mention that HTMLParser.handle_starttag value can be None (GH-134312...
Miss Islington (bot) [Mon, 27 Apr 2026 14:31:35 +0000 (16:31 +0200)] 
[3.13] gh-82665 Mention that HTMLParser.handle_starttag value can be None (GH-134312) (#149038)

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

* Specify boolean attribute behavior in parser

* Tweak wording and example

* Fix backticks

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

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

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

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

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2 days ago[3.13] gh-105936: Properly update closure cells for __setattr__ and __delattr__ in...
Gregory P. Smith [Sun, 26 Apr 2026 05:55:20 +0000 (22:55 -0700)] 
[3.13] gh-105936: Properly update closure cells for __setattr__ and __delattr__ in frozen dataclasses with slots (GH-144021) (GH-148476)

gh-105936: Properly update closure cells for `__setattr__` and `__delattr__` in frozen dataclasses with slots (GH-144021)
(cherry picked from commit 8a398bfbbc6769f6cabb3177702e7a506e203d61)

The cherry-pick required additional changes beyond the original commit
because 3.13 lacks the `__class__` closure cell fixup machinery that
was added in 3.14 by GH-124455 (gh-90562). Specifically:

- Backported `_update_func_cell_for__class__()` helper function and the
  closure fixup loop in `_add_slots()` from GH-124455. Without these,
  renaming the closure variable from `cls` to `__class__` has no effect
  because nothing updates the cell when the class is recreated with slots.
- Changed `_add_slots()` to use `newcls` instead of reusing `cls` for the
  recreated class, so both old and new class references are available for
  the fixup loop.
- Replaced `assertNotHasAttr` with `assertFalse(hasattr(...))` in tests
  (assertNotHasAttr was added in 3.14).
- Dropped `test_original_class_is_gced` additions (that test does not
  exist on 3.13; it was added by GH-137047 for gh-135228 which was not
  backported to 3.13).

gh-148947: dataclasses: fix error on empty __class__ cell  (GH-148948)

Also add a test demonstrating the need for the existing "is oldcls" check.
(cherry picked from commit 6d7bbee1d5714a345dca5a7e4089de3c2fc0fb59)

---------

Co-authored-by: Prometheus3375 <prometheus3375@gmail.com>
Co-authored-by: Sviataslau <35541026+Prometheus3375@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 days ago[3.13] gh-141473: Speed up subprocess test_communicate_timeout_large_input long tail...
Miss Islington (bot) [Sun, 26 Apr 2026 04:27:03 +0000 (06:27 +0200)] 
[3.13] gh-141473: Speed up subprocess test_communicate_timeout_large_input long tail (GH-149003) (#149005)

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

gh-141473: Speed up test_communicate_timeout_large_input

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

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2 days ago[3.13] gh-148973: fix segfault on mismatch between consts size and oparg in compiler...
Irit Katriel [Sat, 25 Apr 2026 21:59:40 +0000 (22:59 +0100)] 
[3.13] gh-148973: fix segfault on mismatch between consts size and oparg in compiler (GH-148974) (#148997)

3 days ago[3.13] gh-148735: Fix a UAF in `Element.findtext()` (GH-148738) (#148923)
Stan Ulbrych [Sat, 25 Apr 2026 09:38:14 +0000 (10:38 +0100)] 
[3.13] gh-148735: Fix a UAF in `Element.findtext()` (GH-148738) (#148923)

(cherry picked from commit 0469e6d38dcb3ff904690028cb3a25155bdcedae)

5 days ago[3.13] gh-132631: Fix "I/O operation on closed file" when parsing JSON Lines file...
Miss Islington (bot) [Thu, 23 Apr 2026 19:30:13 +0000 (21:30 +0200)] 
[3.13] gh-132631: Fix "I/O operation on closed file" when parsing JSON Lines file (GH-132632) (#148922)

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

(cherry picked from commit afde75664eb3ff3e147806f027c9da54c7eb77d4)

Co-authored-by: Gleb Popov <gvpopov.dev@gmail.com>
5 days ago[3.13] gh-90309: Base64-encode cookie values embedded in JS (GH-148888)
Miss Islington (bot) [Thu, 23 Apr 2026 13:05:17 +0000 (15:05 +0200)] 
[3.13] gh-90309: Base64-encode cookie values embedded in JS (GH-148888)

(cherry picked from commit 76b3923d688c0efc580658476c5f525ec8735104)

Co-authored-by: Seth Larson <seth@python.org>
5 days ago[3.13] gh-142965: Fix Concatenate documentation to reflect valid use cases (GH-143316...
Miss Islington (bot) [Thu, 23 Apr 2026 02:57:40 +0000 (04:57 +0200)] 
[3.13] gh-142965: Fix Concatenate documentation to reflect valid use cases (GH-143316) (#148900)

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>
5 days ago[3.13] gh-146553: Fix infinite loop in typing.get_type_hints() on circular __wrapped_...
Miss Islington (bot) [Thu, 23 Apr 2026 02:55:40 +0000 (04:55 +0200)] 
[3.13] gh-146553: Fix infinite loop in typing.get_type_hints() on circular __wrapped__ (GH-148595) (#148896)

(cherry picked from commit be833e658aaf6703b0dd0c0dadb893d72cbe4c77)

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

(cherry picked from commit bd7352d8071dc00531f2c527977602729f2d3ec6)

Co-authored-by: Vikash Kumar <163628932+Vikash-Kumar-23@users.noreply.github.com>
6 days ago[3.13] gh-148820: Fix _PyRawMutex use-after-free on spurious semaphore wakeup (gh...
Sam Gross [Wed, 22 Apr 2026 18:56:24 +0000 (14:56 -0400)] 
[3.13] gh-148820: Fix _PyRawMutex use-after-free on spurious semaphore wakeup (gh-148852) (#148885)

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

7 days ago[3.13] gh-148808: Add boundary check to asyncio.AbstractEventLoop.sock_recvf… (GH...
Miss Islington (bot) [Tue, 21 Apr 2026 16:26:37 +0000 (18:26 +0200)] 
[3.13] gh-148808: Add boundary check to asyncio.AbstractEventLoop.sock_recvf… (GH-148809) (#148836)

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>
8 days ago[3.13] Docs: Fix some typos in `calendar.rst` (GH-148756) (GH-148796)
Miss Islington (bot) [Mon, 20 Apr 2026 14:43:55 +0000 (16:43 +0200)] 
[3.13] Docs: Fix some typos in `calendar.rst` (GH-148756) (GH-148796)

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

Co-authored-by: Manoj K M <manojkmdev24@gmail.com>
8 days ago[3.13] gh-148763: Fix paramter name in `multiprocessing.connection.send_bytes/recv_by...
Miss Islington (bot) [Mon, 20 Apr 2026 00:12:30 +0000 (02:12 +0200)] 
[3.13] gh-148763: Fix paramter name in `multiprocessing.connection.send_bytes/recv_bytes_into` docs (GH-126603) (#148787)

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>
8 days ago[3.13] gh-148779: Update Briefcase link in android.rst documentation (GH-148777)...
Miss Islington (bot) [Sun, 19 Apr 2026 21:50:45 +0000 (23:50 +0200)] 
[3.13] gh-148779: Update Briefcase link in android.rst documentation (GH-148777) (#148781)

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

Co-authored-by: partev <petrosyan@gmail.com>
9 days ago[3.13] gh-121946: Use clang-20 for TSan build (GH-148570) (#148754)
Miss Islington (bot) [Sun, 19 Apr 2026 15:39:04 +0000 (17:39 +0200)] 
[3.13] gh-121946: Use clang-20 for TSan build (GH-148570) (#148754)

Co-authored-by: Sam Gross <colesbury@gmail.com>
9 days ago[3.13] Prevent GitHub's web conflict editor from converting LF to CRLF (GH-148739...
Miss Islington (bot) [Sun, 19 Apr 2026 09:44:16 +0000 (11:44 +0200)] 
[3.13] Prevent GitHub's web conflict editor from converting LF to CRLF (GH-148739) (#148749)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
10 days ago[3.13] gh-148222: Fix NULL dereference bugs in genericaliasobject.c (GH-148226) ...
Prakash Sellathurai [Sat, 18 Apr 2026 14:54:21 +0000 (20:24 +0530)] 
[3.13] gh-148222: Fix NULL dereference bugs in genericaliasobject.c (GH-148226) (#148717)

(cherry picked from commit 634568d030f18183212c01bd4544aa7f97e05442)

10 days ago[3.13] gh-148653: Fix reference leaks in test_marshal introduced in gh-148698 (GH...
Miss Islington (bot) [Sat, 18 Apr 2026 12:34:25 +0000 (14:34 +0200)] 
[3.13] gh-148653: Fix reference leaks in test_marshal introduced in gh-148698 (GH-148725) (GH-148728)

(cherry picked from commit 7ce737ea11919aebf7eef174f910759e74d0ea50)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
10 days ago[3.13] gh-148653: Fix some marshal errors related to recursive code objects (GH-14869...
Serhiy Storchaka [Sat, 18 Apr 2026 09:29:38 +0000 (12:29 +0300)] 
[3.13] gh-148653: Fix some marshal errors related to recursive code objects (GH-148698) (GH-148711) (GH-148713)

(cherry picked from commit d496c637a3dac2cc5d51aa4a7ebd9a740143a719)

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

12 days ago[3.13] gh-148535: Don't use gcc -fprofile-update=atomic flag on i686 (#148554) (...
Victor Stinner [Thu, 16 Apr 2026 17:50:27 +0000 (19:50 +0200)] 
[3.13] gh-148535: Don't use gcc -fprofile-update=atomic flag on i686 (#148554) (#148656)

gh-148535: Don't use gcc -fprofile-update=atomic flag on i686 (#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)

13 days ago[3.13] gh-100305: Deemphasize that `ast.literal_eval` is safe in `eval` documentation...
Miss Islington (bot) [Wed, 15 Apr 2026 16:15:31 +0000 (18:15 +0200)] 
[3.13] gh-100305: Deemphasize that `ast.literal_eval` is safe in `eval` documentation (GH-100326) (#148421)

(cherry picked from commit b3b0cef0c2aacdc616fa48674552ab1e34553835)

Co-authored-by: Ram Vikram Singh <ramvikrams243@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
13 days ago[3.13] Docs: Use bash lexer for http.server CLI commands, not Python (GH-148612)...
Hugo van Kemenade [Wed, 15 Apr 2026 16:01:04 +0000 (19:01 +0300)] 
[3.13] Docs: Use bash lexer for http.server CLI commands, not Python (GH-148612) (#148621)

13 days ago[3.13] gh-146333: Fix quadratic regex backtracking in configparser option parsing...
Petr Viktorin [Wed, 15 Apr 2026 10:11:10 +0000 (12:11 +0200)] 
[3.13] gh-146333: Fix quadratic regex backtracking in configparser option parsing (GH-146399) (GH-148559)

Use negative lookahead in option regex to prevent backtracking, and to avoid changing logic outside the regexes (since people could use the regex directly).
(cherry picked from commit 7e0a0be4097f9d29d66fe23f5af86f18a34ed7dd)

Co-authored-by: Joshua Swanson <22283299+joshuaswanson@users.noreply.github.com>
13 days ago[3.13] tiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580...
Miss Islington (bot) [Wed, 15 Apr 2026 00:06:49 +0000 (02:06 +0200)] 
[3.13] tiny edit, fix a couple of minor typos in enum and sqlite3 docs (GH-148580) (#148582)

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>
13 days ago[3.13] gh-137335: remove a mktemp use in multiprocessing.connection to avoid security...
Miss Islington (bot) [Wed, 15 Apr 2026 00:06:33 +0000 (02:06 +0200)] 
[3.13] gh-137335: remove a mktemp use in multiprocessing.connection to avoid security scanner noise (GH-148578) (#148584)

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>
13 days ago[3.13] gh-148186: Improve `assertCountEqual` description in docs. (GH-148463) (#148586)
Miss Islington (bot) [Tue, 14 Apr 2026 23:45:32 +0000 (01:45 +0200)] 
[3.13] gh-148186: Improve `assertCountEqual` description in docs. (GH-148463) (#148586)

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

Co-authored-by: Kliment Lamonov <klimentlamonov@yandex.ru>
2 weeks ago[3.13] gh-72406: Document argument ordering in argparse help output (GH-148534) ...
Savannah Ostrowski [Tue, 14 Apr 2026 17:53:11 +0000 (10:53 -0700)] 
[3.13] gh-72406: Document argument ordering in argparse help output (GH-148534) (#148567)

gh-72406: Document argument ordering in argparse help output (#148534)

(cherry picked from commit 4286227308ee8dafc867062df4cad73af2a84696)

Co-authored-by: Santi Hernandez <santi@santihdzs.com>
2 weeks ago[3.13] gh-148192: Fix Generator._make_boundary behavior with CRLF line endings. ...
Miss Islington (bot) [Tue, 14 Apr 2026 16:21:55 +0000 (18:21 +0200)] 
[3.13] gh-148192: Fix Generator._make_boundary behavior with CRLF line endings. (GH-148193) (#148549)

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>
2 weeks ago[3.13] gh-148487: Fix issues in `test_add_python_opts` (#148507) (#148546)
Victor Stinner [Tue, 14 Apr 2026 10:08:32 +0000 (12:08 +0200)] 
[3.13] gh-148487: Fix issues in `test_add_python_opts` (#148507) (#148546)

gh-148487: Fix issues in `test_add_python_opts` (#148507)

(cherry picked from commit 44f1b987ed1908185d8021fd31703b2dd4d97e82)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.13] gh-148508: Add resilience to SSL preauth tests on iOS (GH-148536) (#148540)
Miss Islington (bot) [Tue, 14 Apr 2026 03:54:43 +0000 (05:54 +0200)] 
[3.13] gh-148508: Add resilience to SSL preauth tests on iOS (GH-148536) (#148540)

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>
2 weeks ago[3.13] gh-148370: prevent quadratic behavior in `configparser.ParsingError.combine...
Miss Islington (bot) [Mon, 13 Apr 2026 23:05:38 +0000 (01:05 +0200)] 
[3.13] gh-148370: prevent quadratic behavior in `configparser.ParsingError.combine` (GH-148452) (#148533)

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>
2 weeks ago[3.13] gh-146139: Disable `socketpair` authentication on WASI (GH-146140) (#148527)
Miss Islington (bot) [Mon, 13 Apr 2026 21:30:52 +0000 (23:30 +0200)] 
[3.13] gh-146139: Disable `socketpair` authentication on WASI (GH-146140) (#148527)

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>
2 weeks ago[3.13] InternalDocs: Correct struct path for latin1 singletons in `string_interning...
Miss Islington (bot) [Mon, 13 Apr 2026 18:52:47 +0000 (20:52 +0200)] 
[3.13] InternalDocs: Correct struct path for latin1 singletons in `string_interning.md` (GH-148358) (#148491)

(cherry picked from commit 0274d8304e5eec23de100d827eb4da06ab7fd8aa)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.13] Fix "encodings" typo in argparse.FileType documentation (GH-148502) (#148514)
Miss Islington (bot) [Mon, 13 Apr 2026 18:34:05 +0000 (20:34 +0200)] 
[3.13] Fix "encodings" typo in argparse.FileType documentation (GH-148502) (#148514)

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

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

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>
2 weeks ago[3.13] tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345...
Miss Islington (bot) [Mon, 13 Apr 2026 01:13:53 +0000 (03:13 +0200)] 
[3.13] tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345) (#148411)

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>
2 weeks ago[3.13] gh-146450: Ensure Android gradle build uses custom cross-build dir (GH-148319...
Miss Islington (bot) [Mon, 13 Apr 2026 01:13:37 +0000 (03:13 +0200)] 
[3.13] gh-146450: Ensure Android gradle build uses custom cross-build dir (GH-148319) (#148471)

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>
2 weeks ago[3.13] gh-146313: Fix multiprocessing ResourceTracker deadlock after os.fork() (GH...
Miss Islington (bot) [Sun, 12 Apr 2026 17:08:36 +0000 (19:08 +0200)] 
[3.13] gh-146313: Fix multiprocessing ResourceTracker deadlock after os.fork() (GH-146316) (#148426)

gh-146313: Fix multiprocessing ResourceTracker deadlock after os.fork() (GH-146316)

`ResourceTracker.__del__` (added in gh-88887 circa Python 3.12) calls
os.waitpid(pid, 0) which blocks indefinitely if a process created via os.fork()
still holds the tracker pipe's write end. The tracker never sees EOF, never
exits, and the parent hangs at interpreter shutdown.

Fix with two layers:

- **At-fork handler.** An os.register_at_fork(after_in_child=...)
  handler closes the inherited pipe fd in the child unless a preserve
  flag is set. popen_fork.Popen._launch() sets the flag before its
  fork so mp.Process(fork) children keep the fd and reuse the parent's
  tracker (preserving gh-80849). Raw os.fork() children close the fd,
  letting the parent reap promptly.

- **Timeout safety-net.** _stop_locked() gains a wait_timeout
  parameter. When called from `__del__`, it polls with WNOHANG using
  exponential backoff for up to 1 second instead of blocking
  indefinitely. The at-fork handler makes this unreachable in
  well-behaved paths; it remains for abnormal shutdowns.
(cherry picked from commit 3a7df632c96eb6c5de12fac08d1da42df9e25334)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Itamar Oren <itamarost@gmail.com>
2 weeks ago[3.13] gh-147965: Add shutdown() to multiprocessing.Queue excluded methods (GH-147970...
Miss Islington (bot) [Sun, 12 Apr 2026 00:52:32 +0000 (02:52 +0200)] 
[3.13] gh-147965: Add shutdown() to multiprocessing.Queue excluded methods (GH-147970) (#148417)

gh-147965: Add shutdown() to multiprocessing.Queue excluded methods (GH-147970)

The multiprocessing.Queue documentation states it implements all
methods of queue.Queue except task_done() and join(). Since
queue.Queue.shutdown() was added in Python 3.13,
multiprocessing.Queue also does not implement it. Update the docs
to include shutdown() in the list of excluded methods.
(cherry picked from commit 22290ed011a8ac4060390e57f53053ab932fb3f3)

Co-authored-by: WYSIATI <chester.lee.cold@gmail.com>
2 weeks ago[3.13] gh-148337: Document `importlib.resources` security model (GH-148340) (#148355)
Miss Islington (bot) [Sun, 12 Apr 2026 00:10:53 +0000 (02:10 +0200)] 
[3.13] gh-148337: Document `importlib.resources` security model (GH-148340) (#148355)

gh-148337: Document `importlib.resources` security model (GH-148340)
(cherry picked from commit 70b86e7829c42d36c80853ba9bf1da0d8464065b)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.13] Default GHA permissions to `contents: read` (GH-148346) (#148387)
Hugo van Kemenade [Sun, 12 Apr 2026 00:06:41 +0000 (03:06 +0300)] 
[3.13] Default GHA permissions to `contents: read` (GH-148346) (#148387)

(cherry picked from commit 9c9df8ac8cbb8f539b3f342d01e40b7a0a57dcbf)

2 weeks ago[3.13] gh-145105: Fix crash in csv.reader with re-entrant iterator (GH-145106) (...
Miss Islington (bot) [Sat, 11 Apr 2026 22:44:45 +0000 (00:44 +0200)] 
[3.13] gh-145105: Fix crash in csv.reader with re-entrant iterator (GH-145106) (#148405)

gh-145105: Fix crash in csv.reader with re-entrant iterator (GH-145106)

When a custom iterator calls next() on the same csv.reader from
within __next__, the inner iteration sets self->fields to NULL.
The outer iteration then crashes in parse_save_field() by passing
NULL to PyList_Append.

Add a guard after PyIter_Next() to detect that fields was set to
NULL by a re-entrant call, and raise csv.Error instead of crashing.
(cherry picked from commit 20994b1809f9c162e4cae01a5af08bd492ede9f9)

Co-authored-by: Ramin Farajpour Cami <ramin.blackhat@gmail.com>
2 weeks ago[3.13] Fix mixed line endings with pre-commit (GH-148336) (#148339)
Hugo van Kemenade [Fri, 10 Apr 2026 15:36:16 +0000 (18:36 +0300)] 
[3.13] Fix mixed line endings with pre-commit (GH-148336) (#148339)

Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
2 weeks ago[3.13] gh-145831: email.quoprimime: `decode()` leaves stray `\r` when `eol='\r\n...
Miss Islington (bot) [Fri, 10 Apr 2026 12:51:34 +0000 (14:51 +0200)] 
[3.13] gh-145831: email.quoprimime: `decode()` leaves stray `\r` when `eol='\r\n'` (GH-145832) (#148311)

decoded[:-1] only strips one character, leaving a stray \r when eol
is two characters. Fix: decoded[:-len(eol)].
(cherry picked from commit 1a0edb1fa899c067f19b09598b45cdb6e733c4ee)

Co-authored-by: Stefan Zetzsche <120379523+stefanzetzsche@users.noreply.github.com>
2 weeks ago[3.13] gh-148254: Use singular "sec" in timeit verbose output (GH-148290) (#148304)
Hugo van Kemenade [Thu, 9 Apr 2026 15:06:27 +0000 (18:06 +0300)] 
[3.13] gh-148254: Use singular "sec" in timeit verbose output (GH-148290) (#148304)

Co-authored-by: gaweng <38250674+gaweng@users.noreply.github.com>
2 weeks ago[3.13] gh-148091: clarify asyncio.Future.cancel(msg) behaviour (GH-148248) (#148300)
Miss Islington (bot) [Thu, 9 Apr 2026 14:52:59 +0000 (16:52 +0200)] 
[3.13] gh-148091: clarify asyncio.Future.cancel(msg) behaviour (GH-148248) (#148300)

gh-148091: clarify asyncio.Future.cancel(msg) behaviour (GH-148248)
(cherry picked from commit 2acb8d9257c4f5049777d9d462092373b0b3feca)

Co-authored-by: Manoj K M <136242596+manoj-k-m@users.noreply.github.com>
2 weeks ago[3.13] gh-148067: Fix typo in asyncio event loop docs: 'signals' -> 'signal' (GH...
Miss Islington (bot) [Thu, 9 Apr 2026 14:07:54 +0000 (16:07 +0200)] 
[3.13] gh-148067: Fix typo in asyncio event loop docs: 'signals' -> 'signal' (GH-148073) (#148245)

Co-authored-by: TT <70463940+Herrtian@users.noreply.github.com>
2 weeks ago[3.13] gh-106318: Add example for str.swapcase() method (GH-144575) (#148297)
Miss Islington (bot) [Thu, 9 Apr 2026 13:40:28 +0000 (15:40 +0200)] 
[3.13] gh-106318: Add example for str.swapcase() method (GH-144575) (#148297)

Co-authored-by: Adorilson Bezerra <adorilson@gmail.com>
2 weeks ago[3.13] gh-146646: Document that glob functions suppress OSError (GH-147996) (#148289)
Miss Islington (bot) [Thu, 9 Apr 2026 10:51:12 +0000 (12:51 +0200)] 
[3.13] gh-146646: Document that glob functions suppress OSError (GH-147996) (#148289)

gh-146646: Document that glob functions suppress OSError (GH-147996)
(cherry picked from commit 8000a9de3c0b22f8202898a424c1008e13bd16ce)

Co-authored-by: WYSIATI <chester.lee.cold@gmail.com>
2 weeks ago[3.13] gh-70039: smtplib: store the server name in ._host in .connect() (GH-115259...
Miss Islington (bot) [Wed, 8 Apr 2026 22:15:16 +0000 (00:15 +0200)] 
[3.13] gh-70039: smtplib: store the server name in ._host in .connect() (GH-115259) (#148272)

Original patch by gigaplastik, extended with a few more tests.

Addresses gh-70039 and bpo-25852: failure of starttls if connect is called explicitly.
(cherry picked from commit 442f83a5ea1b4d334befd231a79c40d6ff41a0bd)

Co-authored-by: nmartensen <nis.martensen@web.de>
2 weeks ago[3.13] Minor edit: Four space indent in example (gh-148264) (gh-148266)
Miss Islington (bot) [Wed, 8 Apr 2026 17:56:10 +0000 (19:56 +0200)] 
[3.13] Minor edit: Four space indent in example (gh-148264) (gh-148266)

2 weeks agoPost 3.13.13
Thomas Wouters [Tue, 7 Apr 2026 21:28:57 +0000 (23:28 +0200)] 
Post 3.13.13

3 weeks agoPython 3.13.13 v3.13.13
Thomas Wouters [Tue, 7 Apr 2026 18:18:42 +0000 (20:18 +0200)] 
Python 3.13.13

3 weeks ago[3.13] GH-146128: Remove the buggy AArch64 "33rx" relocation (#146263) (#148199)
Hugo van Kemenade [Tue, 7 Apr 2026 18:10:33 +0000 (21:10 +0300)] 
[3.13] GH-146128: Remove the buggy AArch64 "33rx" relocation (#146263) (#148199)

GH-146128: Remove the buggy AArch64 "33rx" relocation (#146263)

(cherry picked from commit 6bb7b33e8f8e1640e284aeb24bf90292df6a8187)

Co-authored-by: Brandt Bucher <brandt@python.org>
Co-authored-by: Ken Jin <kenjin@python.org>
3 weeks ago[3.13] gh-124613: Deactivate perf support in tests if the jit is set (GH-124794)...
Miss Islington (bot) [Tue, 7 Apr 2026 14:51:43 +0000 (16:51 +0200)] 
[3.13] gh-124613: Deactivate perf support in tests if the jit is set (GH-124794) (GH-148214)

gh-124613: Deactivate perf support in tests if the jit is set (GH-124794)

gh-124613: Deactivate the JIT during perf tests

(cherry picked from commit 5e9e50612eb27aef8f74a0ccc234e5cfae50c4d7)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
3 weeks ago[3.13] gh-146121: Clarify security model of pkgutil.getdata; revert checks (GH-148197...
Miss Islington (bot) [Tue, 7 Apr 2026 10:26:51 +0000 (12:26 +0200)] 
[3.13] gh-146121: Clarify security model of pkgutil.getdata; revert checks (GH-148197) (#148205)

gh-146121: Clarify security model of pkgutil.getdata; revert checks (GH-148197)

This reverts commit bcdf231946b1da8bdfbab4c05539bb0cc964a1c7,
and clarifies get_data's security model.

(cherry picked from commit cf59bf76470f3d75ad47d80ffb8ce76b64b5e943)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.13] gh-146613: Fix re-entrant use-after-free in `itertools._grouper` (GH-147962...
Miss Islington (bot) [Tue, 7 Apr 2026 10:24:54 +0000 (12:24 +0200)] 
[3.13] gh-146613: Fix re-entrant use-after-free in `itertools._grouper` (GH-147962) (#148011)

gh-146613: Fix re-entrant use-after-free in `itertools._grouper` (GH-147962)
(cherry picked from commit fc7a188fe70a7b98696b4fcee8db9eb8398aeb7b)

Co-authored-by: Ma Yukun <68433685+TheSkyC@users.noreply.github.com>
3 weeks ago[3.13] gh-144984: Fix crash in Expat's `ExternalEntityParserCreate` error paths ...
Ramin Farajpour Cami [Tue, 7 Apr 2026 10:22:22 +0000 (13:52 +0330)] 
[3.13] gh-144984: Fix crash in Expat's `ExternalEntityParserCreate` error paths (GH-144992) (#146142)

* gh-144984: Fix crash in Expat's `ExternalEntityParserCreate` error paths (#144992)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* gh-144984: Skip test under tracerefs (GH-146218)

---------

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
3 weeks ago[3.13] gh-144503: Pass sys.argv to forkserver as real argv elements (GH-148194) ...
Gregory P. Smith [Tue, 7 Apr 2026 06:19:40 +0000 (23:19 -0700)] 
[3.13] gh-144503: Pass sys.argv to forkserver as real argv elements (GH-148194) (#148196)

Avoid embedding the parent's sys.argv into the forkserver -c command
string via repr().  When sys.argv is large (e.g. thousands of file
paths from a pre-commit hook), the resulting single argument could
exceed the OS per-argument length limit (MAX_ARG_STRLEN on Linux,
typically 128 KiB), causing posix_spawn to fail and the parent to
observe a BrokenPipeError.

Instead, append the argv entries as separate command-line arguments
after -c; the forkserver child reads them back as sys.argv[1:].  This
cannot exceed any limit the parent itself did not already satisfy.

Regression introduced by gh-143706 / 298d5440eb8.
(cherry picked from commit 5e9d90b615b94469081b39a7b0808fea86c417be)

3 weeks ago[3.13] gh-137586: Open external osascript program with absolute path (GH-137584)...
Miss Islington (bot) [Tue, 7 Apr 2026 03:35:14 +0000 (05:35 +0200)] 
[3.13] gh-137586: Open external osascript program with absolute path (GH-137584) (#148174)

Co-authored-by: Fionn <1897918+fionn@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
3 weeks ago[3.13] gh-148157: Check for `_PyPegen_add_type_comment_to_arg` fail in `_PyPegen_name...
Miss Islington (bot) [Mon, 6 Apr 2026 12:13:32 +0000 (14:13 +0200)] 
[3.13] gh-148157: Check for `_PyPegen_add_type_comment_to_arg` fail in `_PyPegen_name_default_pair` (GH-148158) (#148163)

(cherry picked from commit 1795fccfbc7ccb89ead5c529b2f55f54622d1314)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.13] Docs: Update "Installing Python modules" (GH-146249) (#148160)
Miss Islington (bot) [Mon, 6 Apr 2026 11:28:40 +0000 (13:28 +0200)] 
[3.13] Docs: Update "Installing Python modules" (GH-146249) (#148160)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
3 weeks ago[3.13] gh-144418: Increase Android testbed emulator RAM to 4 GB (GH-148054) (#148151)
Miss Islington (bot) [Mon, 6 Apr 2026 06:09:20 +0000 (08:09 +0200)] 
[3.13] gh-144418: Increase Android testbed emulator RAM to 4 GB (GH-148054) (#148151)

Pre-create the Android emulator image so that the the configuration can be
modified to use 4GB of RAM.
(cherry picked from commit a95ee3a21d97afdbe6bd2ce4cd8343a36cd13b02)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
3 weeks ago[3.13] gh-146541: Allow building the Android testbed for 32-bit targets (GH-146542...
Malcolm Smith [Sun, 5 Apr 2026 23:47:01 +0000 (00:47 +0100)] 
[3.13] gh-146541: Allow building the Android testbed for 32-bit targets (GH-146542) (#148107)

Allows building the Android testbed for 32-bit targets, adding the target triplets
`arm-linux-androideabi` and `i686-linux-android`.
(cherry picked from commit 848bbe9ff21ae0a3ee412cc25843835ace4f75df)

Co-authored-by: Robert Kirkman <31490854+robertkirkman@users.noreply.github.com>
3 weeks ago[3.13] gh-145098: Use `macos-15-intel` instead of unstable `macos-26-intel` in `...
Hugo van Kemenade [Sun, 5 Apr 2026 22:11:29 +0000 (01:11 +0300)] 
[3.13] gh-145098: Use `macos-15-intel` instead of unstable `macos-26-intel` in `{jit,tail-call}.yml` (GH-148126) (#148136)

(cherry picked from commit bce96a181350f348560fe0623361f39a6d5c6361)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.13] gh-94632: document the subprocess need for extra_groups=() with user= (GH...
Miss Islington (bot) [Sun, 5 Apr 2026 18:14:03 +0000 (20:14 +0200)] 
[3.13] gh-94632: document the subprocess need for extra_groups=() with user= (GH-148129) (#148131)

gh-94632: document the subprocess need for extra_groups=() with user= (GH-148129)
(cherry picked from commit a1cf4430ed89ec702528ef074138c407ccf89946)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
3 weeks ago[3.13] Add `permissions: {}` to all reusable workflows (#148114) (#148116)
Ezio Melotti [Sun, 5 Apr 2026 10:04:33 +0000 (18:04 +0800)] 
[3.13] Add `permissions: {}` to all reusable workflows (#148114) (#148116)

Add `permissions: {}` to all reusable workflows (#148114)

Add permissions: {} to all reusable workflows

(cherry picked from commit 1f36a510a2a16e8ff15572f44090c7db43bb7935)

3 weeks ago[3.13] Docs: Standardize documentation authors (GH-148102) (#148106)
Stan Ulbrych [Sat, 4 Apr 2026 18:14:37 +0000 (19:14 +0100)] 
[3.13] Docs: Standardize documentation authors (GH-148102) (#148106)

(cherry picked from commit 75be902a13c670a1ea16aee3644548723b7d7407)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.13] Regex HOWTO: invalid string literals result in `SyntaxWarning` (GH-148092...
Miss Islington (bot) [Sat, 4 Apr 2026 16:19:58 +0000 (18:19 +0200)] 
[3.13] Regex HOWTO: invalid string literals result in `SyntaxWarning` (GH-148092) (#148098)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
3 weeks ago[3.13] gh-145883: Fix two heap-buffer-overflows in `_zoneinfo` (GH-145885) (#148086)
Miss Islington (bot) [Sat, 4 Apr 2026 16:14:19 +0000 (18:14 +0200)] 
[3.13] gh-145883: Fix two heap-buffer-overflows in `_zoneinfo` (GH-145885) (#148086)

(cherry picked from commit fe9befc1ca7eac36749ec358969464334381b9f9)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.13] gh-145098: Use `macos-15-intel` instead of unstable `macos-26-intel` (GH-14803...
Hugo van Kemenade [Sat, 4 Apr 2026 10:04:43 +0000 (13:04 +0300)] 
[3.13] gh-145098: Use `macos-15-intel` instead of unstable `macos-26-intel` (GH-148038) (#148077)

3 weeks ago[3.13] gh-146450: Normalise feature set of Android build script with other platform...
Miss Islington (bot) [Sat, 4 Apr 2026 04:27:56 +0000 (06:27 +0200)] 
[3.13] gh-146450: Normalise feature set of Android build script with other platform build scripts (GH-146451) (#148066)

Allows for cleaning a subset of targets, customization of the download cache and
cross-build directories, and modifies the build command to allow 'all', 'build'
and 'hosts' targets.
(cherry picked from commit b8470deb5d52f524ae18c6f232fecfc99b133397)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
3 weeks ago[3.13] gh-126676: Expand argparse docs for type=bool with warning and alternatives...
Miss Islington (bot) [Fri, 3 Apr 2026 19:10:09 +0000 (21:10 +0200)] 
[3.13] gh-126676: Expand argparse docs for type=bool with warning and alternatives (GH-146435) (#148049)

gh-126676: Expand argparse docs for type=bool with warning and alternatives (GH-146435)
(cherry picked from commit 80d0a85d969d305c7436dc54f8939d7b6f441b5f)

Co-authored-by: Joshua Swanson <22283299+joshuaswanson@users.noreply.github.com>
Co-authored-by: joshuaswanson <joshuaswanson@users.noreply.github.com>
Co-authored-by: Savannah Ostrowski <savannah@python.org>
3 weeks ago[3.13] gh-143930: Tweak the exception message and increase test coverage (GH-146476...
Łukasz Langa [Fri, 3 Apr 2026 17:45:02 +0000 (19:45 +0200)] 
[3.13] gh-143930: Tweak the exception message and increase test coverage (GH-146476) (GH-148045)

(cherry picked from commit 3681d47a440865aead912a054d4599087b4270dd)

3 weeks ago[3.13] gh-125895: Fix static asset location for `sphinx-notfound-page` (GH-147984...
Miss Islington (bot) [Fri, 3 Apr 2026 15:40:32 +0000 (17:40 +0200)] 
[3.13] gh-125895: Fix static asset location for `sphinx-notfound-page` (GH-147984) (#148041)

(cherry picked from commit 80ab6d958a0e4aa322aaf96994c43cd637496be6)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.13] gh-143394: Skip pyrepl test_no_newline() basic REPL if readline is missing...
Miss Islington (bot) [Fri, 3 Apr 2026 12:35:26 +0000 (14:35 +0200)] 
[3.13] gh-143394: Skip pyrepl test_no_newline() basic REPL if readline is missing (GH-147973) (#148006)

gh-143394: Skip pyrepl test_no_newline() basic REPL if readline is missing (GH-147973)
(cherry picked from commit 97babb8ef70c1c25768a0e534cfb10955c6b290d)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks ago[3.13] gh-146907: Clarify ABI compatibility between debug and release builds (GH...
Miss Islington (bot) [Fri, 3 Apr 2026 08:03:09 +0000 (10:03 +0200)] 
[3.13] gh-146907: Clarify ABI compatibility between debug and release builds (GH-146925) (GH-147972)

(cherry picked from commit 03f3b9ade975e78a31bf776ff27ac6ac22fcb65a)

Co-authored-by: konsti <konstin@mailbox.org>
3 weeks ago[3.13] gh-142533: Document CRLF injection vulnerabilities in http.server doc (GH...
Miss Islington (bot) [Thu, 2 Apr 2026 21:33:00 +0000 (23:33 +0200)] 
[3.13] gh-142533: Document CRLF injection vulnerabilities in http.server doc (GH-143395) (#148021)

gh-142533: Document CRLF injection vulnerabilities in http.server doc (GH-143395)
(cherry picked from commit 617f4cc1c2605b86b4833450253c3599b61d6638)

Co-authored-by: Tadej Magajna <tmagajna@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks ago[3.13] gh-146488: hash-pin all action references (gh-146489) (#147981)
William Woodruff [Thu, 2 Apr 2026 05:49:07 +0000 (01:49 -0400)] 
[3.13] gh-146488: hash-pin all action references (gh-146489) (#147981)

3 weeks ago[3.13] gh-146615: Fix format specifiers in Objects/ directory (GH-146620) (#147705)
sunmy2019 [Wed, 1 Apr 2026 21:52:14 +0000 (05:52 +0800)] 
[3.13] gh-146615: Fix format specifiers in Objects/ directory (GH-146620)  (#147705)

* Fix format specifiers in vgetargskeywordsfast_impl for improved error messages.
* Fix f-string syntax error message in tok_get_normal_mode.

4 weeks ago[3.13] gh-143050: Correct PyLong_FromString() to use _PyLong_Negate() (#145901) ...
Victor Stinner [Tue, 31 Mar 2026 15:06:38 +0000 (17:06 +0200)] 
[3.13] gh-143050: Correct PyLong_FromString() to use _PyLong_Negate() (#145901) (#147437)

The long_from_string_base() might return a small integer, when the
_pylong.py is used to do conversion.  Hence, we must be careful here to
not smash it "small int" bit by using the _PyLong_FlipSign().

Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit db5936c5b89aa19e04d63120e0cf5bbc73bf2420)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
4 weeks ago[3.13] gh-146615: Fix format specifiers in extension modules (GH-146617) (GH-146652...
Serhiy Storchaka [Tue, 31 Mar 2026 10:59:06 +0000 (13:59 +0300)] 
[3.13] gh-146615: Fix format specifiers in extension modules (GH-146617) (GH-146652) (GH-146658)

(cherry picked from commit 1c396e18218daa723b425af0781c5e762d7717c2)
(cherry picked from commit 58c7259133bed4c0bff6a0d3939ddccf95e543f7)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
4 weeks ago[3.13] gh-146615: Fix crash in __get__() for METH_METHOD descriptors with invalid...
Miss Islington (bot) [Tue, 31 Mar 2026 09:22:59 +0000 (11:22 +0200)] 
[3.13] gh-146615: Fix crash in __get__() for METH_METHOD descriptors with invalid type argument (GH-146634) (GH-146648)

(cherry picked from commit 72d29ea363f1515115753653aeca735a1a817a7f)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
4 weeks ago[3.13] gh-146615: Fix format specifiers in Python/ directory (GH-146619) (GH-146654)
Serhiy Storchaka [Tue, 31 Mar 2026 09:16:44 +0000 (12:16 +0300)] 
[3.13] gh-146615: Fix format specifiers in Python/ directory (GH-146619) (GH-146654)

(cherry picked from commit dcb260eff2d276976933f78c24a4ebd0ed7dbc36)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
4 weeks ago[3.13] gh-146615: Fix format specifiers in Objects/ directory (GH-146620) (GH-146655)
Serhiy Storchaka [Tue, 31 Mar 2026 08:44:51 +0000 (11:44 +0300)] 
[3.13] gh-146615: Fix format specifiers in Objects/ directory (GH-146620) (GH-146655)

(cherry picked from commit bbf7fb2c15a1dc9a54d10937c3d0831b0968257d)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
4 weeks ago[3.13] gh-146615: Fix format specifiers in test cextensions (GH-146618) (GH-146653)
Serhiy Storchaka [Tue, 31 Mar 2026 08:38:59 +0000 (11:38 +0300)] 
[3.13] gh-146615: Fix format specifiers in test cextensions (GH-146618) (GH-146653)

(cherry picked from commit b7055533abc2f7f93e04778fb70664096aa3d3b5)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
4 weeks ago[3.13] gh-146250: Fix memory leak in re-initialization of `SyntaxError` (GH-146251...
AN Long [Mon, 30 Mar 2026 16:06:52 +0000 (00:06 +0800)] 
[3.13] gh-146250: Fix memory leak in re-initialization of `SyntaxError` (GH-146251) (#146519)

* [3.13] gh-146250: Fix memory leak in re-initialization of `SyntaxError` (GH-146251)
(cherry picked from commit 0de4e08a5990e4692feb1b1ea01c303e468a2894)

Co-authored-by: Brij Kapadia <97006829+bkap123@users.noreply.github.com>
* Minimize the changes

* Minimize the changes

* Minimize the changes

---------

Co-authored-by: Brij Kapadia <97006829+bkap123@users.noreply.github.com>
4 weeks ago[3.13] gh-145098: Run Apple Silicon macOS CI on macos-26 (Tahoe) (GH-145099) (GH...
Hugo van Kemenade [Mon, 30 Mar 2026 13:21:40 +0000 (16:21 +0300)] 
[3.13] gh-145098: Run Apple Silicon macOS CI on macos-26 (Tahoe) (GH-145099) (GH-146412) (#146414)

Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Co-authored-by: clintonsteiner <47841949+clintonsteiner@users.noreply.github.com>
4 weeks ago[3.13] gh-146083: Upgrade bundled Expat to 2.7.5 (GH-146085) (#146604)
Miss Islington (bot) [Sun, 29 Mar 2026 17:50:07 +0000 (19:50 +0200)] 
[3.13] gh-146083: Upgrade bundled Expat to 2.7.5 (GH-146085) (#146604)

(cherry picked from commit e39d84a37dfc8bcdc0eb4d6f3ce7d5ee829d7f30)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
4 weeks ago[3.13] gh-146090: fix memory management of internal `sqlite3` callback contexts ...
Miss Islington (bot) [Sun, 29 Mar 2026 13:14:58 +0000 (15:14 +0200)] 
[3.13] gh-146090: fix memory management of internal `sqlite3` callback contexts (GH-146569) (#146596)

gh-146090: fix memory management of internal `sqlite3` callback contexts (GH-146569)
(cherry picked from commit aa6680775d6d9ca571a675c3b2d655f4ade78c0c)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 weeks ago[3.13] gh-146080: fix a crash in SNI callbacks when the SSL object is gone (GH-146573...
Bénédikt Tran [Sun, 29 Mar 2026 13:07:15 +0000 (15:07 +0200)] 
[3.13] gh-146080: fix a crash in SNI callbacks when the SSL object is gone (GH-146573) (#146598)

(cherry picked from commit 24db78c5329dd405460bfdf76df380ced6231353)

4 weeks ago[3.13] gh-146544: Fix `asyncio.Queue` docstring ambiguity (GH-146545) (#146568)
Miss Islington (bot) [Sat, 28 Mar 2026 11:27:59 +0000 (12:27 +0100)] 
[3.13] gh-146544: Fix `asyncio.Queue` docstring ambiguity (GH-146545) (#146568)

gh-146544: Fix `asyncio.Queue` docstring ambiguity (GH-146545)
(cherry picked from commit 578d726d467dee14abe52a7790aca36e4cb9f70c)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
4 weeks ago[3.13] Docs: don't rely on implicit 'above' directions in socket docs (GH-146426...
Miss Islington (bot) [Sat, 28 Mar 2026 09:53:21 +0000 (10:53 +0100)] 
[3.13] Docs: don't rely on implicit 'above' directions in socket docs (GH-146426) (#146561)

Docs: don't rely on implicit 'above' directions in socket docs (GH-146426)
(cherry picked from commit 3ff582238fda913691734245416eaa1a18c7ca0e)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
4 weeks ago[3.13] gh-145616: Detect Android sysconfig ABI correctly on 32-bit ARM Android on...
Malcolm Smith [Sat, 28 Mar 2026 07:25:35 +0000 (07:25 +0000)] 
[3.13] gh-145616: Detect Android sysconfig ABI correctly on 32-bit ARM Android on 64-bit ARM kernel (GH-145617) (#146539)

When Python is running on 32-bit ARM Android on a 64-bit ARM kernel, `os.uname().machine` is `armv8l`. Such devices run the same userspace code as `armv7l` devices, so apply the same `armeabi_v7a` Android ABI to them, which works.
(cherry picked from commit 3a2b81e919103c0be3bc60a47aaa74d34fea6e9e)

Co-authored-by: Robert Kirkman <31490854+robertkirkman@users.noreply.github.com>