]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
11 days ago[3.15] gh-151678: Add tests for tkinter.Listbox (GH-151686) (GH-151712)
Miss Islington (bot) [Fri, 19 Jun 2026 09:30:55 +0000 (11:30 +0200)] 
[3.15] gh-151678: Add tests for tkinter.Listbox (GH-151686) (GH-151712)

Cover previously-untested Listbox methods in ListboxTest: size, delete,
index resolution, nearest, see, activate, and the selection methods
(selection_set/clear/includes/anchor and their select_* aliases),
including the errors raised for invalid indices.
(cherry picked from commit cf3b3c11485a870d8e8c02579bed27a316838eb1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-151678: Add tests for tkinter.Menu (GH-151685) (GH-151709)
Miss Islington (bot) [Fri, 19 Jun 2026 09:28:03 +0000 (11:28 +0200)] 
[3.15] gh-151678: Add tests for tkinter.Menu (GH-151685) (GH-151709)

Cover previously-untested Menu methods in MenuTest: adding, inserting and
deleting items of every type, index resolution, invoking items, entry x/y
positions, and post/unpost/tk_popup mapping.

Also test per-entry configuration options and the errors raised for
invalid indices, entry types, option names and option values.
(cherry picked from commit ef5c32a40be50a33a9b7ac39ee64e6893bc22f60)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-141510 Add frozendict fast paths to abstract.c (GH-150692) (#151704)
Miss Islington (bot) [Fri, 19 Jun 2026 09:08:08 +0000 (11:08 +0200)] 
[3.15] gh-141510 Add frozendict fast paths to abstract.c (GH-150692) (#151704)

gh-141510 Add frozendict fast paths to abstract.c (GH-150692)

Add frozendict to the fast paths of PyMapping_GetOptionalItem(),
PyMapping_Keys(), PyMapping_Values(), and PyMapping_Items().
(cherry picked from commit a5568d0eb70f8ffbfc7815b58e24170787615931)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
11 days ago[3.15] gh-151695: Fix use-after-free of the curses screen encoding (GH-151696) (GH...
Miss Islington (bot) [Fri, 19 Jun 2026 09:07:51 +0000 (11:07 +0200)] 
[3.15] gh-151695: Fix use-after-free of the curses screen encoding (GH-151696) (GH-151703)

The module-global curses_screen_encoding stored a borrowed pointer to the
encoding owned by the window returned by the first initscr() call.  That
window can be deallocated while unctrl() and ungetch(), which have no window
of their own, still use the pointer to encode non-ASCII characters.

Keep a private copy of the encoding instead.
(cherry picked from commit 551f8e16f8bb38a1e9c6df259a2a0969493de070)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
11 days ago[3.15] gh-141510 Document and test frozendict class matching behaviour (GH-150799...
Miss Islington (bot) [Fri, 19 Jun 2026 08:45:02 +0000 (10:45 +0200)] 
[3.15] gh-141510 Document and test frozendict class matching behaviour (GH-150799) (#151701)

gh-141510 Document and test frozendict class matching behaviour (GH-150799)

Frozendict has `_Py_TPFLAGS_MATCH_SELF` set so works correctly
with the single-arg class matching. However it isn't documented
in the list of classes this works with and it isn't tested.

The test is some way below the other similar tests but anything
else would need a large renumbering.
(cherry picked from commit fd53ae113911e5a7d83c04b08623df824f9d5d70)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
11 days ago[3.15] gh-151229: Add CI to prevent JIT stress test regression (GH-151647) (gh-151670)
Miss Islington (bot) [Fri, 19 Jun 2026 08:37:50 +0000 (10:37 +0200)] 
[3.15] gh-151229: Add CI to prevent JIT stress test regression (GH-151647) (gh-151670)

11 days ago[3.15] gh-151436: Fix missing `tstate->last_profiled_frame` updates (GH-151437) ...
Miss Islington (bot) [Fri, 19 Jun 2026 08:24:53 +0000 (10:24 +0200)] 
[3.15] gh-151436: Fix missing `tstate->last_profiled_frame` updates (GH-151437) (#151612)

gh-151436: Fix missing `tstate->last_profiled_frame` updates (GH-151437)
(cherry picked from commit a8d74c062fe3c5cb2962dde8bee83704fcfa1bc9)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
11 days ago[3.15] gh-151427: add 'not macOS' and 'not iOS' restrictions on availability state...
Miss Islington (bot) [Fri, 19 Jun 2026 08:18:49 +0000 (10:18 +0200)] 
[3.15] gh-151427: add  'not macOS' and 'not iOS' restrictions on availability state of some functions in `os` module. (GH-151537) (#151699)

(cherry picked from commit da69fcf98de500b1e10bdce41a05c904e345d89f)
Co-authored-by: Duprat <yduprat@gmail.com>
11 days ago[3.15] gh-101100: Document os.uname_result and os.statvfs_result with related constan...
Miss Islington (bot) [Fri, 19 Jun 2026 07:34:16 +0000 (09:34 +0200)] 
[3.15] gh-101100: Document os.uname_result and os.statvfs_result with related constants (GH-151301) (GH-151692)

(cherry picked from commit 9688d252d330b0b586760a121ee8c8f7215176e8)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
11 days ago[3.15] gh-146353: Document `PyBytesWriter_GetData` pointer validity (GH-151418) ...
Miss Islington (bot) [Thu, 18 Jun 2026 17:39:20 +0000 (19:39 +0200)] 
[3.15] gh-146353: Document `PyBytesWriter_GetData` pointer validity (GH-151418) (GH-151664)

gh-146353: Document `PyBytesWriter_GetData` pointer validity (GH-151418)
(cherry picked from commit e99b319682fe984074e32f52354dbec23ded4d0a)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
12 days ago[3.15] gh-86726: Add few missing versionadded directives (GH-151662) (GH-151663)
Miss Islington (bot) [Thu, 18 Jun 2026 15:56:14 +0000 (17:56 +0200)] 
[3.15] gh-86726: Add few missing versionadded directives (GH-151662) (GH-151663)

Pack.pack_content, Place.place_content and Grid.grid_content were
added in 3.15.
(cherry picked from commit bfecfcc2a860071c8e5022ac512bde94e0fb5f76)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 days ago[3.15] gh-86726: Fix the documented return type of tkinter info_patchlevel() (GH...
Miss Islington (bot) [Thu, 18 Jun 2026 14:44:51 +0000 (16:44 +0200)] 
[3.15] gh-86726: Fix the documented return type of tkinter info_patchlevel() (GH-151655) (GH-151658)

It returns a sys.version_info-like named tuple, not a string.
(cherry picked from commit 3cd02a1c2da023974464fd1155982a16474f331b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
12 days ago[3.15] gh-86726: Fix "deprecated" directive for wm_attributes (GH-151652) (GH-151654)
Miss Islington (bot) [Thu, 18 Jun 2026 13:44:12 +0000 (15:44 +0200)] 
[3.15] gh-86726: Fix "deprecated" directive for wm_attributes (GH-151652) (GH-151654)

(cherry picked from commit d47c27e47a6c6969737616f2f58036a5f536e60a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 days ago[3.15] gh-86726: Document the full public API of tkinter (GH-151579) (GH-151649)
Miss Islington (bot) [Thu, 18 Jun 2026 12:47:36 +0000 (14:47 +0200)] 
[3.15] gh-86726: Document the full public API of tkinter (GH-151579) (GH-151649)

Replace the previously sparse reference documentation with full coverage of
the public API of the tkinter package, written from the Tcl/Tk manual pages,
the existing documentation and the module docstrings.

* Doc/library/tkinter.rst gains a "Reference" section documenting every public
  class, method, function and constant of the core module -- the widgets, the
  Misc, Wm, Pack, Place, Grid, XView and YView mix-ins, the Variable and image
  classes, the module-level functions and the symbolic constants.
* Doc/library/tkinter.ttk.rst, dialog.rst, tkinter.font.rst and the other
  module pages document their remaining classes, methods and functions.

The descriptions are Python-oriented (correct return types -- tuples rather
than Tcl lists, booleans, integers, None on cancellation, and so on) and were
checked against the Tcl/Tk 9.1 manual pages and the implementation.

versionadded, versionchanged and deprecated directives are added for the
public API, determined from the git history relative to Python 3.0: the
tkinter.ttk module (3.1); the Text, Wm, Menu and Misc methods exposing Tk 8.5
features (3.3); and the many later additions and behavior changes up to 3.15.
The Tk version required by features added after Tk 8.6 is noted as well.  The
bundled Tcl/Tk version is updated to 9.0 and the manual-page links point at
the tcl9.0 reference.

--------
(cherry picked from commit 8b270b72a2d20bf4b7fb457141cd68a38808f7d9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
12 days ago[3.15] gh-151229: Finalize JIT tracer in test eval-frame stub (gh-151609) (gh-151648)
Miss Islington (bot) [Thu, 18 Jun 2026 12:45:25 +0000 (14:45 +0200)] 
[3.15] gh-151229: Finalize JIT tracer in test eval-frame stub (gh-151609) (gh-151648)

gh-151229: Finalize JIT tracer in test eval-frame stub (gh-151609)
(cherry picked from commit 3fa92e7c55d74aea062c4b32d895e84d7aaa3bce)

Co-authored-by: Donghee Na <donghee.na@python.org>
12 days ago[3.15] gh-151623: Add missing curses docstrings and document intrflush() (GH-151632...
Miss Islington (bot) [Thu, 18 Jun 2026 11:23:06 +0000 (13:23 +0200)] 
[3.15] gh-151623: Add missing curses docstrings and document intrflush() (GH-151632) (GH-151641)

(cherry picked from commit 12add3822f458a3e107dff4176b4c4b991764ea7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 days ago[3.15] gh-151623: Improve curses documentation style (GH-151635) (#151636)
Miss Islington (bot) [Thu, 18 Jun 2026 09:57:03 +0000 (11:57 +0200)] 
[3.15] gh-151623: Improve curses documentation style (GH-151635) (#151636)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
12 days ago[3.15] gh-151623: Improve curses documentation and docstrings (GH-151625) (GH-151628)
Miss Islington (bot) [Thu, 18 Jun 2026 08:48:56 +0000 (10:48 +0200)] 
[3.15] gh-151623: Improve curses documentation and docstrings (GH-151625) (GH-151628)

Fix errors and clarify the curses, curses.panel and curses.ascii docs
against X/Open Curses and ncurses, and sync the affected docstrings.
(cherry picked from commit 65afcdd8dfb3621ac696fce076e6282c76a04b2b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 days ago[3.15] gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases ...
Miss Islington (bot) [Thu, 18 Jun 2026 08:17:15 +0000 (10:17 +0200)] 
[3.15] gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases (GH-151252) (GH-151606)

gh-149044: Improve Py_tp_base[s] docs & error message for non-type bases (GH-151252)

The initial implementation of PEP 820 worsened the error message
when non-types are given as base types in Py_tp_bases & Py_tp_base.
Bring back the 'bases must be types' wording and add a 'got' note for
easier debugging.

Improve slot ID documentation, and soft-deprecate Py_tp_base
(as per the PEP).
(cherry picked from commit 16185e9fe2037d2171626f79c3d099bd7772b53e)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
12 days ago[3.15] gh-151510: Fix __lazy_import__ without frame (GH-151511) (#151610)
Miss Islington (bot) [Wed, 17 Jun 2026 18:40:33 +0000 (20:40 +0200)] 
[3.15] gh-151510: Fix __lazy_import__ without frame (GH-151511) (#151610)

gh-151510: Fix __lazy_import__ without frame (GH-151511)
(cherry picked from commit eff805b7a7a9678639bbcebe804864406cc4eab2)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
13 days ago[3.15] gh-120665: make unittest loaders avoid loading test cases that are abstract...
Miss Islington (bot) [Wed, 17 Jun 2026 15:47:27 +0000 (17:47 +0200)] 
[3.15] gh-120665: make unittest loaders avoid loading test cases that are abstract base classes (GH-120666) (#151601)

gh-120665: make unittest loaders avoid loading test cases that are abstract base classes (GH-120666)
(cherry picked from commit 5ad3c6dfbfe60a7f232e9604866c77ced24c4bfe)

Co-authored-by: blhsing <blhsing@gmail.com>
13 days ago[3.15] gh-151544: Fixes CVE-2026-12003 by removing the fallback to %VPATH%/Modules...
Miss Islington (bot) [Wed, 17 Jun 2026 15:42:35 +0000 (17:42 +0200)] 
[3.15] gh-151544: Fixes CVE-2026-12003 by removing the fallback to %VPATH%/Modules/Setup.local for discovering sources in getpath.py (GH-151545)

(cherry picked from commit 9e863fab283eddca9c2a8f9d1ee30f4dc243e314)

Co-authored-by: Steve Dower <steve.dower@python.org>
13 days ago[3.15] gh-150966: Fix live profiling error tests (GH-151020) (#151604)
Miss Islington (bot) [Wed, 17 Jun 2026 14:58:42 +0000 (16:58 +0200)] 
[3.15] gh-150966: Fix live profiling error tests (GH-151020) (#151604)

gh-150966: Fix live profiling error tests (GH-151020)
(cherry picked from commit 6b142ab9a0007d37c68c74f81e2c8638330003e2)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
13 days ago[3.15] gh-151584: Remove `PyUnstable_Module_SetGIL` call in `_remote_debugging` ...
Miss Islington (bot) [Wed, 17 Jun 2026 14:10:31 +0000 (16:10 +0200)] 
[3.15] gh-151584: Remove `PyUnstable_Module_SetGIL` call in `_remote_debugging` (GH-151585) (#151603)

gh-151584: Remove `PyUnstable_Module_SetGIL` call in `_remote_debugging` (GH-151585)
(cherry picked from commit a173a6d65ba0eb77776ca4f7f1cb277877a43f9b)

Co-authored-by: sobolevn <mail@sobolevn.me>
13 days ago[3.15] gh-151593: Use timeout on GitHub Action TSan jobs (GH-151594) (#151597)
Miss Islington (bot) [Wed, 17 Jun 2026 11:28:42 +0000 (13:28 +0200)] 
[3.15] gh-151593: Use timeout on GitHub Action TSan jobs (GH-151594) (#151597)

gh-151593: Use timeout on GitHub Action TSan jobs (GH-151594)

Use a timeout of 15 minutes for --tsan command and a timeout of 10
minutes for --tsan-parallel command. Display also the slowest tests
to help adjusting these timeouts later if needed.
(cherry picked from commit 460dec26518df5aa262ded5a2ee4e94b8854b569)

Co-authored-by: Victor Stinner <vstinner@python.org>
13 days ago[3.15] gh-151496: Use process groups in test_dtrace (GH-151512) (#151589)
Miss Islington (bot) [Wed, 17 Jun 2026 09:28:34 +0000 (11:28 +0200)] 
[3.15] gh-151496: Use process groups in test_dtrace (GH-151512) (#151589)

gh-151496: Use process groups in test_dtrace (GH-151512)

Create a new process group to run bpftrace commands, so it's possible
to kill also child processes on timeout.
(cherry picked from commit a064b323f4350305e7486c7b1090cf12b19e7738)

Co-authored-by: Victor Stinner <vstinner@python.org>
13 days ago[3.15] gh-151546: Fix stack limits on musl (#151548) (#151583)
Victor Stinner [Wed, 17 Jun 2026 09:13:40 +0000 (11:13 +0200)] 
[3.15] gh-151546: Fix stack limits on musl (#151548) (#151583)

gh-151546: Fix stack limits on musl (#151548)

If the thread stack size is set by linker flags, pass the stack size
to Python/ceval.c via the new _Py_LINKER_THREAD_STACK_SIZE variable
to set Py_C_STACK_SIZE macro.

(cherry picked from commit 9a61d1c0c8ebe21277c0a84abf6000049540464f)

13 days ago[3.15] gh-151218: Replace sys.flags in PyConfig_Set() (GH-151402) (#151552)
Miss Islington (bot) [Tue, 16 Jun 2026 16:48:56 +0000 (18:48 +0200)] 
[3.15] gh-151218: Replace sys.flags in PyConfig_Set() (GH-151402) (#151552)

gh-151218: Replace sys.flags in PyConfig_Set() (GH-151402)

PyConfig_Set() and sys.set_int_max_str_digits() now replace
sys.flags (create a new object), instead of modifying sys.flags in-place.

Modifying sys.flags in-place can lead to data races when multiple
threads are reading or writing sys.flags in parallel.

Use _Py_atomic functions to get and set max_str_digits members.
(cherry picked from commit b16d23fc9fe9cb72fa15c8a3036753e5437b5b8c)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
13 days ago[3.15] gh-151519: Check effective gid in `_test_all_chown_common` group-0 guard ...
Miss Islington (bot) [Tue, 16 Jun 2026 16:42:24 +0000 (18:42 +0200)] 
[3.15] gh-151519: Check effective gid in `_test_all_chown_common` group-0 guard (GH-151521) (#151549)

gh-151519: Check effective gid in `_test_all_chown_common` group-0 guard (GH-151521)

The guard that skips the "chown to gid 0 should fail" assertion used
only `os.getgroups()` (supplementary groups). The kernel also accepts
the effective/filesystem gid for chown, so when a process runs with
egid 0 and a non-zero uid (common in containers and user namespaces),
chown(-1, 0) succeeds and the assertion spuriously fails.

Add an `os.getegid() != 0` check alongside the existing
`0 not in os.getgroups()` guard.
(cherry picked from commit 2ce260033b457a0ad2c9767a1d9902bef5a30b0e)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
2 weeks ago[3.15] gh-150771: Fix email serialization for shift_jis and euc-jp (GH-151120) (GH...
Miss Islington (bot) [Tue, 16 Jun 2026 12:18:56 +0000 (14:18 +0200)] 
[3.15] gh-150771: Fix email serialization for shift_jis and euc-jp (GH-151120) (GH-151541)

Encode the payload with output_charset instead of input_charset.
(cherry picked from commit 0777a58d8012bbdd0d72654b56f9112686ae6ff0)

Co-authored-by: dev <b.chouksey27@gmail.com>
2 weeks ago[3.15] gh-149716: Document PySlot_DATA for Py_mod_gil and Py_mod_multiple_interpreter...
Miss Islington (bot) [Tue, 16 Jun 2026 11:52:39 +0000 (13:52 +0200)] 
[3.15] gh-149716: Document PySlot_DATA for Py_mod_gil and Py_mod_multiple_interpreters (GH-150053) (#151322)

Co-authored-by: Taeknology <20297177+Taeknology@users.noreply.github.com>
2 weeks ago[3.15] gh-151522: Guard against None transport in slow-socket SSL test (GH-151523...
Miss Islington (bot) [Tue, 16 Jun 2026 05:54:42 +0000 (07:54 +0200)] 
[3.15] gh-151522: Guard against None transport in slow-socket SSL test (GH-151523) (#151528)

gh-151522: Guard against None transport in slow-socket SSL test (GH-151523)
(cherry picked from commit 11f032f904c8019b332a3c367f335e05cde63628)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
2 weeks ago[3.15] gh-151422: Don't link libffi into _ctypes_test.so (GH-151423) (#151516)
Miss Islington (bot) [Mon, 15 Jun 2026 22:45:45 +0000 (00:45 +0200)] 
[3.15] gh-151422: Don't link libffi into _ctypes_test.so (GH-151423) (#151516)

_ctypes_test doesn't use libffi directly, and linking it into the module
causes emscripten tests to fail.
(cherry picked from commit 8646385076ea4f6ef08682d8ef07a544d3b4ef30)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2 weeks ago[3.15] gh-151223: fix tsan data races in load global specializations (GH-151393)...
Miss Islington (bot) [Mon, 15 Jun 2026 17:22:52 +0000 (19:22 +0200)] 
[3.15] gh-151223: fix tsan data races in load global specializations (GH-151393) (#151513)

gh-151223: fix tsan data races in load global specializations (GH-151393)
(cherry picked from commit e9d5280f6c040f859907eb3c04ec308f4918db9f)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks ago[3.15] gh-148853: Catch PermissionError in test in_systemd_nspawn_sync_suppressed...
Miss Islington (bot) [Mon, 15 Jun 2026 14:55:27 +0000 (16:55 +0200)] 
[3.15] gh-148853: Catch PermissionError in test in_systemd_nspawn_sync_suppressed() (GH-148854) (#151506)

gh-148853: Catch PermissionError in test in_systemd_nspawn_sync_suppressed() (GH-148854)

/run/ on my FreeBSD install is not readable causing failing test.
(cherry picked from commit 35ce2e5f98c04cb8d1e442de5439d3151362e21b)

Co-authored-by: Nick Begg <nick@stunttruck.net>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 weeks ago[3.15] Add `.toml` to `.editorconfig` (GH-151481) (#151491)
Miss Islington (bot) [Mon, 15 Jun 2026 09:42:09 +0000 (11:42 +0200)] 
[3.15] Add `.toml` to `.editorconfig` (GH-151481) (#151491)

Add `.toml` to `.editorconfig` (GH-151481)
(cherry picked from commit 7a70afa199a9bdd5bf65b2b396b9fa76c8842ac2)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-149671: Restore compatibility with setuptools -nspkg.pth files in site...
Miss Islington (bot) [Mon, 15 Jun 2026 09:01:30 +0000 (11:01 +0200)] 
[3.15] gh-149671: Restore compatibility with setuptools -nspkg.pth files in site module (GH-151319) (#151489)

gh-149671: Restore compatibility with setuptools -nspkg.pth files in site module (GH-151319)

Inject the "sitedir" variable in the frame which executes ".pth" code.
(cherry picked from commit 18f3ffec43b98db34c6d378cfc012814a901bb41)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] Skip test_highly_nested_objects_decoding during the PGO profile task. (GH...
Miss Islington (bot) [Sun, 14 Jun 2026 18:37:23 +0000 (20:37 +0200)] 
[3.15] Skip test_highly_nested_objects_decoding during the PGO profile task. (GH-151460) (#151468)

Skip test_highly_nested_objects_decoding during the PGO profile task. (GH-151460)

Since the recursion guard tracks real C-stack bounds (gh-91079), this test
asserts that 500k nesting levels overflow the stack margin. On a 64 MiB stack
(some Nix build envs use one that large), the optimized interpreter uses ~160
bytes/level (raises at ~420k levels) so the assertion holds with only ~16%
margin; the PGO *instrumented* stage inlines less, its per-level scanner frames
are smaller, and the 500k-deep decode completes -- "RecursionError not raised"
fails the profile run and aborts `make profile-opt`. Upstream's
skip_if_unlimited_stack_size (gh-143460) only covers RLIM_INFINITY, not
large-finite stacks like ours.

We could also keep playing whack a mole and raise the 500k to a much larger
number... but there's little value in PGO training on this test anyways.
(cherry picked from commit e91f68ab40e25dc964afb872eb75873c8b1838d6)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
2 weeks ago[3.15] gh-151390: Colorize `match +` and `match -` in the REPL (GH-151391) (#151476)
Bartosz Sławecki [Sun, 14 Jun 2026 16:38:07 +0000 (18:38 +0200)] 
[3.15] gh-151390: Colorize `match +` and `match -` in the REPL (GH-151391) (#151476)

(cherry picked from commit a7007322c2a70b01e7c2a9e6b3f8f222d241c7d7)

2 weeks ago[3.15] gh-151461: Fix encoding-related exception handling in file tokenizer (GH-15146...
Miss Islington (bot) [Sun, 14 Jun 2026 12:58:37 +0000 (14:58 +0200)] 
[3.15] gh-151461: Fix encoding-related exception handling in file tokenizer (GH-151462) (GH-151470)

(cherry picked from commit f1a5f68e3761e010ccd4dda1342500c5ae40bbc4)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks ago[3.15] gh-139837: Document attributes of objects recorded by warnings.catch_warnings...
Miss Islington (bot) [Sun, 14 Jun 2026 12:47:39 +0000 (14:47 +0200)] 
[3.15] gh-139837: Document attributes of objects recorded by warnings.catch_warnings (GH-139893) (GH-151472)

(cherry picked from commit 47b7dc788c9bcf3d5ea69a2ea0aed3d5883647a8)

Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-151424: Fix impossible stack traces in `RemoteUnwinder(..., cache_frames...
Miss Islington (bot) [Sat, 13 Jun 2026 23:40:19 +0000 (01:40 +0200)] 
[3.15] gh-151424: Fix impossible stack traces in `RemoteUnwinder(..., cache_frames=True)` by copying chunks on cache miss (GH-151426) (#151459)

gh-151424: Fix impossible stack traces in `RemoteUnwinder(..., cache_frames=True)` by copying chunks on cache miss (GH-151426)
(cherry picked from commit 6ce088e20a13ac25320d94c5775bb1a4edc75ba4)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
2 weeks ago[3.15] gh-151403: Fix use-after-free when an argv item's __fspath__ mutates args...
Miss Islington (bot) [Sat, 13 Jun 2026 21:32:48 +0000 (23:32 +0200)] 
[3.15] gh-151403: Fix use-after-free when an argv item's __fspath__ mutates args (GH-151404) (#151445)

gh-151403: Fix use-after-free when an argv item's __fspath__ mutates args (GH-151404)

---------
(cherry picked from commit 6679ac07d881f6e0ce30b7cc28b5671eafa20d9d)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: tonghuaroot <23011166+tonghuaroot@users.noreply.github.com>
2 weeks ago[3.15] gh-151443: Fix documented default of `unittest.mock.mock_open`'s `read_data...
Miss Islington (bot) [Sat, 13 Jun 2026 18:39:44 +0000 (20:39 +0200)] 
[3.15] gh-151443: Fix documented default of  `unittest.mock.mock_open`'s `read_data` parameter (GH-151444) (#151450)

(cherry picked from commit 9ad6ba0324a71ae5b51ded6e59b1ea3b653814a5)

Co-authored-by: Shardul Deshpande <iamsharduld@users.noreply.github.com>
2 weeks ago[3.15] gh-77328: Update `base64` module RFC references to RFC 4648 (GH-151275) (...
Miss Islington (bot) [Sat, 13 Jun 2026 13:00:54 +0000 (15:00 +0200)] 
[3.15] gh-77328: Update `base64` module RFC references to RFC 4648 (GH-151275) (#151438)

(cherry picked from commit e9339876883f96af2e406a92a05be647b7fbe5d5)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-101267: ProcessPoolExecutor no longer shares 1 BrokenProcessPool exception...
Miss Islington (bot) [Sat, 13 Jun 2026 09:06:55 +0000 (11:06 +0200)] 
[3.15] gh-101267: ProcessPoolExecutor no longer shares 1 BrokenProcessPool exception among all failed futures (GH-101268) (#151430)

gh-101267: ProcessPoolExecutor no longer shares 1 BrokenProcessPool exception among all failed futures (GH-101268)
(cherry picked from commit 3c00ebc2bbd902495b163def850bc931420209fc)

Co-authored-by: Daniel Shields <daniel.shields@twosigma.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 weeks ago[3.15] Docs: Fix method directive signatures in `enum` docs (GH-151429) (#151434)
Miss Islington (bot) [Sat, 13 Jun 2026 08:55:30 +0000 (10:55 +0200)] 
[3.15] Docs: Fix method directive signatures in `enum` docs (GH-151429) (#151434)

(cherry picked from commit 5b385197625e669473859c63bee6f14c983d2be6)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
2 weeks ago[3.15] Fix typos in the `curses.ascii` module documentation (GH-129300) (#151413)
Miss Islington (bot) [Fri, 12 Jun 2026 16:11:06 +0000 (18:11 +0200)] 
[3.15] Fix typos in the `curses.ascii` module documentation (GH-129300) (#151413)

(cherry picked from commit f4f102027a9b0edc72a048f17b696aa92d2e6893)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] Docs: avoid repetitions of class references in functions.rst (GH-150891) ...
Miss Islington (bot) [Fri, 12 Jun 2026 15:01:30 +0000 (17:01 +0200)] 
[3.15] Docs: avoid repetitions of class references in functions.rst (GH-150891) (#151405)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2 weeks ago[3.15] gh-151284: Fix test_capi on UBSan (GH-151286) (#151323)
Miss Islington (bot) [Fri, 12 Jun 2026 13:10:41 +0000 (15:10 +0200)] 
[3.15] gh-151284: Fix test_capi on UBSan (GH-151286) (#151323)

gh-151284: Fix test_capi on UBSan (GH-151286)

Comment two checks relying on undefined behavior in
test_fromwidechar() of test_capi.

Enable test_capi in GitHub Action "Reusable Sanitizer".
(cherry picked from commit d87d77287392b78d36a06660228f6a5ca88888d7)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-151126: Fix crash on unset memory error in `ctypes.get_errno` (GH-151382...
Miss Islington (bot) [Fri, 12 Jun 2026 11:31:51 +0000 (13:31 +0200)] 
[3.15] gh-151126: Fix crash on unset memory error in `ctypes.get_errno` (GH-151382) (#151398)

gh-151126: Fix crash on unset memory error in `ctypes.get_errno` (GH-151382)
(cherry picked from commit 6b217ea90b9cd694fded6308bc796e324bbacd19)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-151297: Fix undefined behavior in `_PyObject_MiRealloc` (GH-151358) (GH...
Miss Islington (bot) [Fri, 12 Jun 2026 01:47:01 +0000 (03:47 +0200)] 
[3.15] gh-151297: Fix undefined behavior in `_PyObject_MiRealloc` (GH-151358) (GH-151388)

The standard says that a call to `memcpy` must pass a valid source and
destination pointer even if the size is 0, so we must avoid calling
`memcpy` when our source pointer is NULL. If we don't, an optimizing
compiler can decide that the pointer must be non-NULL based on the
presence of UB, and optimize out checks for null pointers.

Specifically, note that the standard says:

    Where an argument declared as size_t n specifies the length of the
    array for a function, n can have the value zero on a call to that
    function. Unless explicitly stated otherwise in the description of
    a particular function in this subclause, pointer arguments on such
    a call shall still have valid values, as described in 7.1.4.

And section 7.1.4 says:

    If an argument to a function has an invalid value (such as a value
    outside the domain of the function, or a pointer outside the address
    space of the program, or a null pointer, or a pointer to
    non-modifiable storage when the corresponding parameter is not
    const-qualified) or a type (after default argument promotion) not
    expected by a function with a variable number of arguments, the
    behavior is undefined.

The specification for `memcpy` doesn't state that it's allowed to be
called with null pointers, and Linux's `/usr/include/string.h` declares
`memcpy` as `__nonnull ((1, 2))`.
(cherry picked from commit c37599200f688538efa34a49f262a9a4a899a953)

Co-authored-by: Matt Wozniski <mwozniski@bloomberg.net>
2 weeks ago[3.15] gh-151065: Copy fix for memory leak from mimalloc upstream (GH-151066) (GH...
Miss Islington (bot) [Thu, 11 Jun 2026 22:39:37 +0000 (00:39 +0200)] 
[3.15] gh-151065: Copy fix for memory leak from mimalloc upstream (GH-151066) (GH-151383)

Applies https://github.com/microsoft/mimalloc/commit/d7a72c4912943e8aaf135e465ca5ea229ea96646 to our copy of mimalloc.
(cherry picked from commit 80f9467434cecbc4e97b853b3876de13e75aec38)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2 weeks ago[3.15] gh-151337: Avoid possible memory leak in `_tkinter.c` on Windows. (GH-151340...
Miss Islington (bot) [Thu, 11 Jun 2026 20:25:05 +0000 (22:25 +0200)] 
[3.15] gh-151337: Avoid possible memory leak in `_tkinter.c` on Windows. (GH-151340) (GH-151379)

(cherry picked from commit 71805db4294de9495954571c82a835d94ba67594)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
2 weeks ago[3.15] gh-138991: Update dataclass documentation for new eq behavior in Python 3...
Miss Islington (bot) [Thu, 11 Jun 2026 17:45:30 +0000 (19:45 +0200)] 
[3.15] gh-138991: Update dataclass documentation for new eq behavior in Python 3.13 (GH-139007) (#151372)

gh-138991: Update dataclass documentation for new eq behavior in Python 3.13 (GH-139007)

And add tests.
(cherry picked from commit 402668b2b1a63a2b3cfd7a2ede07f6786f9beb8e)

Co-authored-by: Aniket <148300120+Aniketsy@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-150285: Fix too long docstrings in GenericAlias and __class_getitem__ ...
Miss Islington (bot) [Thu, 11 Jun 2026 17:22:52 +0000 (19:22 +0200)] 
[3.15] gh-150285: Fix too long docstrings in GenericAlias and __class_getitem__ (GH-151354) (GH-151367)

(cherry picked from commit 65047f2e2fb80e4ad36df56a343d75963a20c110)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.15] gh-151126: Fix missing memory error in `os._path_splitroot` (GH-151339) (...
Miss Islington (bot) [Thu, 11 Jun 2026 16:55:19 +0000 (18:55 +0200)] 
[3.15] gh-151126: Fix missing memory error in `os._path_splitroot` (GH-151339) (#151360)

gh-151126: Fix missing memory error in `os._path_splitroot` (GH-151339)
(cherry picked from commit 10595b1cb7ac04ba9a3ef3f7da4fa31c9966300d)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-151228: fix data race on clearing embedded dict values (GH-151330) (#151359)
Miss Islington (bot) [Thu, 11 Jun 2026 16:34:26 +0000 (18:34 +0200)] 
[3.15] gh-151228: fix data race on clearing embedded dict values (GH-151330) (#151359)

gh-151228: fix data race on clearing embedded dict values (GH-151330)
(cherry picked from commit 6112d70abee2455bfa44a76a49a5a80472e21134)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks ago[3.15] gh-101100: Fix Sphinx nitpick in `unittest.mock.rst` (GH-151302) (#151355)
Miss Islington (bot) [Thu, 11 Jun 2026 15:42:23 +0000 (17:42 +0200)] 
[3.15] gh-101100: Fix Sphinx nitpick in `unittest.mock.rst` (GH-151302) (#151355)

(cherry picked from commit b18168cb32d545ed976b760983478cbd5dde5bdf)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
2 weeks ago[3.15] gh-151112: Fix crash in `compiler_mod()` when entering the current compilation...
Miss Islington (bot) [Thu, 11 Jun 2026 15:22:31 +0000 (17:22 +0200)] 
[3.15] gh-151112: Fix crash in `compiler_mod()` when entering the current compilation unit fails (GH-151234) (#151350)

(cherry picked from commit 937d89c4d9b7c5fda6730a1127db118d881d13cb)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-139588: Fix nondeterministic `make latex` doc build under parallel make...
Miss Islington (bot) [Thu, 11 Jun 2026 15:21:26 +0000 (17:21 +0200)] 
[3.15] gh-139588: Fix nondeterministic `make latex` doc build under parallel make (GH-151343) (#151352)

(cherry picked from commit b9bffc09a6e47959cb5c306040fd0bfd77ae2786)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2 weeks ago[3.15] gh-150397: Fix pyexpat bigmem test (GH-151329) (#151348)
Miss Islington (bot) [Thu, 11 Jun 2026 15:15:10 +0000 (17:15 +0200)] 
[3.15] gh-150397: Fix pyexpat bigmem test (GH-151329) (#151348)

gh-150397: Fix pyexpat bigmem test (GH-151329)

Add missing parameter (size).
(cherry picked from commit 0bbde07a0bbad3c79073fd133d6df70837e4cfee)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-150285: Suppress showing the __getstate__() comment in the help for datacla...
Miss Islington (bot) [Thu, 11 Jun 2026 15:01:11 +0000 (17:01 +0200)] 
[3.15] gh-150285: Suppress showing the __getstate__() comment in the help for dataclasses (GH-151328) (GH-151331)

(cherry picked from commit 0066fd73a20950dc790d219f4e3cfb07e816df47)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.15] gh-151238: Check for `_get_resized_exprs` failure in `_PyPegen_{joined,templat...
Miss Islington (bot) [Thu, 11 Jun 2026 14:58:13 +0000 (16:58 +0200)] 
[3.15] gh-151238: Check for `_get_resized_exprs` failure in `_PyPegen_{joined,template}_str` (GH-151259) (#151344)

(cherry picked from commit 4b44b1e1fd654f3a3fefb02ae7fb26456fe33dc3)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-123619: Fix PyUnstable_Object_EnableDeferredRefcount() (GH-151260) (#151326)
Miss Islington (bot) [Thu, 11 Jun 2026 11:21:26 +0000 (13:21 +0200)] 
[3.15] gh-123619: Fix PyUnstable_Object_EnableDeferredRefcount() (GH-151260) (#151326)

gh-123619: Fix PyUnstable_Object_EnableDeferredRefcount() (GH-151260)

Return 0 if the object is not tracked by the GC.
(cherry picked from commit 72e7eddce6c7137cef06b6eba15641597919e3d4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-151177: Fix race condition in `_testembed` (GH-151293) (GH-151312)
Miss Islington (bot) [Thu, 11 Jun 2026 10:10:55 +0000 (12:10 +0200)] 
[3.15] gh-151177: Fix race condition in `_testembed` (GH-151293) (GH-151312)

gh-151177: Fix race condition in `_testembed` (GH-151293)
(cherry picked from commit f9ffca39351b77197e4dc2775a0d1e4ad64bf0e5)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2 weeks ago[3.15] gh-151112: Move an `assert` that may fail in `cfg_builder_check` (GH-151153...
Miss Islington (bot) [Thu, 11 Jun 2026 09:46:04 +0000 (11:46 +0200)] 
[3.15] gh-151112: Move an `assert` that may fail in `cfg_builder_check` (GH-151153) (#151313)

(cherry picked from commit 2d3381035df24fbf512d897daa19a1040f7af3fd)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] Drop historical `:author:`s from HOWTOs (GH-151091) (#151310)
Miss Islington (bot) [Thu, 11 Jun 2026 08:55:01 +0000 (10:55 +0200)] 
[3.15] Drop historical `:author:`s from HOWTOs (GH-151091) (#151310)

(cherry picked from commit 9620f69cd4cd0b3691bc9feb279ddf45f71a9e7d)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-151295: Fix use-after-free in bytes.join()/bytearray.join() via re-entrant...
Miss Islington (bot) [Thu, 11 Jun 2026 08:30:24 +0000 (10:30 +0200)] 
[3.15] gh-151295: Fix use-after-free in bytes.join()/bytearray.join() via re-entrant __buffer__ (GH-151296) (GH-151304)

(cherry picked from commit 84a322aa1555df745a2c115df03bfb7a4ed8c594)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
2 weeks ago[3.15] gh-136880: Add warning about PYTHONPATH (GH-151098) (GH-151299)
Miss Islington (bot) [Thu, 11 Jun 2026 06:38:03 +0000 (08:38 +0200)] 
[3.15] gh-136880: Add warning about PYTHONPATH (GH-151098) (GH-151299)

(cherry picked from commit 84630e2cb90ef334e41eb9bccd860b3b0a7ff51b)

2 weeks ago[3.15] gh-151278: Fix test_faulthandler on UBSan (GH-151279) (#151281)
Miss Islington (bot) [Wed, 10 Jun 2026 20:07:07 +0000 (22:07 +0200)] 
[3.15] gh-151278: Fix test_faulthandler on UBSan (GH-151279) (#151281)

gh-151278: Fix test_faulthandler on UBSan (GH-151279)

* Py_FatalError() no longer calls _PyFaulthandler_Fini() if it
  doesn't hold the GIL.
* Skip test_faulthandler tests raising signals if run with UBSan.
* Enable test_faulthandler in GitHub Action "Reusable Sanitizer".
(cherry picked from commit e60c42dc3f5a8dd9b10bc9a8a028ef2765469650)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failu...
Victor Stinner [Wed, 10 Jun 2026 20:03:27 +0000 (22:03 +0200)] 
[3.15] gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure (#151250) (#151269)

gh-151253: Dump the Python path configuration on _PyCodec_InitRegistry() failure (#151250)

If "import encodings" fails at Python startup, dump the Python path
configuration to help users debugging their configuration. The
encodings module is the first module imported during Python startup.

(cherry picked from commit 7b6e98911e1485be13817f2aedbbfadb1c4ea876)

2 weeks ago[3.15] GHA: Display output when a sanitizer test fails (GH-151268) (#151272)
Miss Islington (bot) [Wed, 10 Jun 2026 17:37:52 +0000 (19:37 +0200)] 
[3.15] GHA: Display output when a sanitizer test fails (GH-151268) (#151272)

GHA: Display output when a sanitizer test fails (GH-151268)

Modify GitHub Action "Reusable Sanitizer" to display output when a
test fails: pass -W option.
(cherry picked from commit 3a8bebd86f36be05442fa2f3adcc83c2a4b00ef2)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (GH-151215)...
Miss Islington (bot) [Wed, 10 Jun 2026 16:48:10 +0000 (18:48 +0200)] 
[3.15] gh-109940: Respect VIRTUAL_ENV_DISABLE_PROMPT in activate.bat (GH-151215) (GH-151225)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
2 weeks ago[3.15] gh-151126: Fix missing memory errors in `_interpchannelsmodule.c` (GH-151239...
Miss Islington (bot) [Wed, 10 Jun 2026 16:26:38 +0000 (18:26 +0200)] 
[3.15] gh-151126: Fix missing memory errors in `_interpchannelsmodule.c` (GH-151239) (#151265)

gh-151126: Fix missing memory errors in `_interpchannelsmodule.c` (GH-151239)
(cherry picked from commit 9fd1a125bc0ebdc26eae684da6e48ef24ee23b34)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-141984: Reword the Generator expressions section (GH-150518) (GH-151261)
Miss Islington (bot) [Wed, 10 Jun 2026 16:04:48 +0000 (18:04 +0200)] 
[3.15] gh-141984: Reword the Generator expressions section (GH-150518) (GH-151261)

(cherry picked from commit 7bbb9607a2e7d1f8a7de11ce02f0a2402d6e7262)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Blaise Pabon <blaise@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-143988: Fix re-entrant mutation crashes in socket sendmsg/recvmsg_into...
Miss Islington (bot) [Wed, 10 Jun 2026 14:25:33 +0000 (16:25 +0200)] 
[3.15] gh-143988: Fix re-entrant mutation crashes in socket sendmsg/recvmsg_into (GH-143987) (#151246)

gh-143988: Fix re-entrant mutation crashes in socket sendmsg/recvmsg_into (GH-143987)

Fix crashes in socket.sendmsg() and socket.recvmsg_into() that could
occur if buffer sequences are mutated re-entrantly during argument
parsing via __buffer__ protocol callbacks.

The bug occurs because:

1. PySequence_Fast() returns the original list object when the input
   is already a list (not a copy).
2. During iteration, PyObject_GetBuffer() triggers __buffer__
   callbacks which may clear the list.
3. Subsequent iterations access invalid memory (heap OOB read).

The fix replaces PySequence_Fast() with PySequence_Tuple() which
always creates a new tuple, ensuring the sequence cannot be mutated
during iteration.
(cherry picked from commit 896f7fdc7d0ba6d4ace06935b9d67c4da0f9ecbe)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: tonghuaroot <23011166+tonghuaroot@users.noreply.github.com>
2 weeks ago[3.15] add asyncio guide for Free-Threaded Python (GH-150456) (#151257)
Miss Islington (bot) [Wed, 10 Jun 2026 14:11:26 +0000 (16:11 +0200)] 
[3.15] add asyncio guide for Free-Threaded Python (GH-150456) (#151257)

add asyncio guide for Free-Threaded Python (GH-150456)
(cherry picked from commit e2bd50d2e1cfe474f3b1f88a3d2b7e26cfda1295)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks ago[3.15] Add yet one assertion in test_set_text_charset_cp949 (GH-151224) (GH-151237)
Miss Islington (bot) [Wed, 10 Jun 2026 13:36:58 +0000 (15:36 +0200)] 
[3.15] Add yet one assertion in test_set_text_charset_cp949 (GH-151224) (GH-151237)

Add yet one assertion in test_set_text_charset_cp949 (GH-151224)

Check bytes(m), not only str(m).
(cherry picked from commit 3ca93ab198497da9451101019b67c52e7873377d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.15] Docs: Fix typos in the "Memory Management" section (GH-151243) (GH-151247)
Miss Islington (bot) [Wed, 10 Jun 2026 13:21:48 +0000 (15:21 +0200)] 
[3.15] Docs: Fix typos in the "Memory Management" section (GH-151243) (GH-151247)

Docs: Fix typos in the "Memory Management" section (GH-151243)
(cherry picked from commit 8c0e2515bb0059b75e264cc5baeb27bb17337c83)

Co-authored-by: Manoj K M <manojkm24dev@gmail.com>
2 weeks ago[3.15] gh-89554: Document socket.SocketType as a class (GH-150683) (#151244)
Miss Islington (bot) [Wed, 10 Jun 2026 13:09:28 +0000 (15:09 +0200)] 
[3.15] gh-89554: Document socket.SocketType as a class (GH-150683) (#151244)

gh-89554: Document socket.SocketType as a class (GH-150683)

socket.SocketType is a class (re-exported from _socket as an alias of
_socket.socket, the base class of socket.socket), but was documented with
the ".. data::" directive, so ":class:" cross-references to it cannot
resolve against a py:class target.

Switch the entry to ".. class::", correct the misleading description
(SocketType is the base class of the socket type, not "type(socket(...))"
which is socket.socket; addresses gh-88427), move it into the Socket
Objects section, and document the socket object methods and attributes
nested under the socket class, dropping the redundant "socket." prefix.
(cherry picked from commit a621e8ad811e7d51d69b0969a2bd07888a02db1e)

Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
2 weeks ago[3.15] gh-150988: Fix refleak in `OSError` when attrs are set before `super().__init_...
Miss Islington (bot) [Wed, 10 Jun 2026 12:56:54 +0000 (14:56 +0200)] 
[3.15] gh-150988: Fix refleak in `OSError` when attrs are set before `super().__init__()` (GH-150990) (#151240)

gh-150988: Fix refleak in `OSError` when attrs are set before `super().__init__()` (GH-150990)
(cherry picked from commit f2a0f82282d6307f7fd2d4ccf52a8fd95ac3922f)

Co-authored-by: Lukas Geiger <lukas.geiger94@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-98894: Fix DTrace test_check_probes for shared builds (GH-151122) (#151235)
Miss Islington (bot) [Wed, 10 Jun 2026 11:35:01 +0000 (13:35 +0200)] 
[3.15] gh-98894: Fix DTrace test_check_probes for shared builds (GH-151122) (#151235)

gh-98894: Fix DTrace test_check_probes for shared builds (GH-151122)

When building with --enable-shared, the SystemTap/DTrace notes
live in libpython. Add detection logic to be used by readelf.

Force the C locale on readelf output.
(cherry picked from commit 3a08e9373977788e7691ec0a973fbe1abe170c91)

Co-authored-by: stratakis <cstratak@redhat.com>
2 weeks ago[3.15] gh-80384: Fix docs for PyWeakref_NewRef() and PyWeakref_NewProxy() (GH-151146)
Serhiy Storchaka [Wed, 10 Jun 2026 10:41:19 +0000 (13:41 +0300)] 
[3.15] gh-80384: Fix docs for PyWeakref_NewRef() and PyWeakref_NewProxy() (GH-151146)

The type of the callback argument is not checked.

2 weeks ago[3.15] gh-143008: Fix race re-initializing TextIOWrapper (#151203)
Cody Maloney [Wed, 10 Jun 2026 09:13:46 +0000 (02:13 -0700)] 
[3.15] gh-143008: Fix race re-initializing TextIOWrapper (#151203)

__init__() changes multiple variables and may be called more than once
from multiple threads.

2 weeks ago[3.15] gh-150700: Fix class-scope inline comprehensions when nested scopes reference...
Miss Islington (bot) [Tue, 9 Jun 2026 23:33:04 +0000 (01:33 +0200)] 
[3.15] gh-150700: Fix class-scope inline comprehensions when nested scopes reference `__class__` and friends (GH-150735) (#151211)

gh-150700: Fix class-scope inline comprehensions when nested scopes reference `__class__` and friends (GH-150735)

* Fix class-scope inline comprehensions when nested scopes reference `__class__` and friends

In `inline_comprehension()`, when `__class__` / `__classdict__` /
`__conditional_annotations__` appears as `FREE` in a comprehension's
symbol table because a nested scope captured it (e.g. nested lambdas),
this name is still discarded from `comp_free` unconditionally.

This prevents `drop_class_free()` from seeing it, so the appropriate
`ste_needs_(...)` flag is never set on the enclosing class.
That leads to `codegen_make_closure()` throwing `SystemError` when it
couldn't find `__class__` / `__classdict__` /
`__conditional_annotations__` in the class's cellvars.

From now on we just discard from `comp_free` when no child scope
(e.g. a lambda) still needs the name as `FREE`. When a child scope does
need it, keep it in `comp_free` so `drop_class_free()` can set the
appropriate flag and the class creates the implicit cell.

* Fix tests

* Fix typo

* Fix formatting

* Add test checking validity of `__class__` returned

* Prefer 'used' to 'deferred'
(cherry picked from commit ce916dc50644bb1de940f5fb580bd9907cceb959)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks ago[3.15] gh-151112: Fix double free in `assemble_init` when out of memory (GH-151142...
Miss Islington (bot) [Tue, 9 Jun 2026 20:16:42 +0000 (22:16 +0200)] 
[3.15] gh-151112: Fix double free in `assemble_init` when out of memory (GH-151142) (#151205)

gh-151112: Fix double free in `assemble_init` when out of memory (GH-151142)
(cherry picked from commit 580499177ca91477b53b4a40afcec7d3370265b0)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-151163: Update Android, macOS installer, and Windows builds to SQLite 3...
Miss Islington (bot) [Tue, 9 Jun 2026 18:56:57 +0000 (20:56 +0200)] 
[3.15] gh-151163: Update Android, macOS installer, and Windows builds to SQLite 3.53.2 (GH-151204)

(cherry picked from commit ab8ebe9034a85c441d1bb4208fa2d667fd38cc4d)

Co-authored-by: Zachary Ware <zach@python.org>
2 weeks ago[3.15] gh-151159: Update CI to use latest SSL library versions (GH-151199)
Miss Islington (bot) [Tue, 9 Jun 2026 17:57:09 +0000 (19:57 +0200)] 
[3.15] gh-151159: Update CI to use latest SSL library versions (GH-151199)

(cherry picked from commit 7053bbd7fd4967b8782bf0c8f6ad00248f0b0c5b)

Co-authored-by: Zachary Ware <zach@python.org>
2 weeks ago[3.15] gh-151159: Bump OpenSSL versions for iOS and Android (GH-151197)
Miss Islington (bot) [Tue, 9 Jun 2026 17:54:25 +0000 (19:54 +0200)] 
[3.15] gh-151159: Bump OpenSSL versions for iOS and Android (GH-151197)

(cherry picked from commit 627dd14346b4c4c13d9203430c32556467b7fbd3)

Co-authored-by: Zachary Ware <zach@python.org>
2 weeks ago[3.15] gh-151159: Update Windows builds to use OpenSSL 3.5.7 (GH-151189)
Miss Islington (bot) [Tue, 9 Jun 2026 17:44:44 +0000 (19:44 +0200)] 
[3.15] gh-151159: Update Windows builds to use OpenSSL 3.5.7 (GH-151189)

(cherry picked from commit 6688b0c71536ac99ed629fbd5ea4b226245ffac6)

Co-authored-by: Zachary Ware <zach@python.org>
2 weeks ago[3.15] gh-151159: Update macOS installer to use OpenSSL 3.5.7. (GH-151171) (#151192)
Miss Islington (bot) [Tue, 9 Jun 2026 17:33:23 +0000 (19:33 +0200)] 
[3.15] gh-151159: Update macOS installer to use OpenSSL 3.5.7. (GH-151171) (#151192)

(cherry picked from commit 720fb82603a3c93b5941144feac1f25eacf74c03)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
2 weeks ago[3.15] GH-59633: Clarify dest collisions in argparse docs (GH-150987) (#151188)
Miss Islington (bot) [Tue, 9 Jun 2026 17:15:41 +0000 (19:15 +0200)] 
[3.15] GH-59633: Clarify dest collisions in argparse docs (GH-150987) (#151188)

GH-59633: Clarify dest collisions in argparse docs (GH-150987)
(cherry picked from commit 82cb7d4bf62041b75a08628baa1f9fe761fd6a79)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
2 weeks ago[3.15] gh-151126: Add missing `PyErr_NoMemory` in `_winapi` module (GH-151154) (...
Miss Islington (bot) [Tue, 9 Jun 2026 17:10:18 +0000 (19:10 +0200)] 
[3.15] gh-151126: Add missing `PyErr_NoMemory` in `_winapi` module (GH-151154) (#151180)

gh-151126: Add missing `PyErr_NoMemory` in `_winapi` module (GH-151154)
(cherry picked from commit 8d94fa7b8696db6a7942f8a4b930289e69e9b174)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-150285: Fix too long docstrings in the asyncio package (GH-151074) (GH...
Miss Islington (bot) [Tue, 9 Jun 2026 16:41:54 +0000 (18:41 +0200)] 
[3.15] gh-150285: Fix too long docstrings in the asyncio package (GH-151074) (GH-151172)

(cherry picked from commit ed2b04248aa1f608099e03437aa280d1be6e80c3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.15] gh-150285: Fix too long docstrings in the concurrent package (GH-151076) ...
Miss Islington (bot) [Tue, 9 Jun 2026 16:41:26 +0000 (18:41 +0200)] 
[3.15] gh-150285: Fix too long docstrings in the concurrent package (GH-151076) (GH-151173)

(cherry picked from commit 0fa06f4d7fb3494a62ba2631362ce8b98a7eec25)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.15] GH-61082: Clarify nargs='*' positional default behavior (GH-150989) (#151168)
Miss Islington (bot) [Tue, 9 Jun 2026 15:46:39 +0000 (17:46 +0200)] 
[3.15] GH-61082: Clarify nargs='*' positional default behavior (GH-150989) (#151168)

GH-61082: Clarify nargs='*' positional default behavior (GH-150989)
(cherry picked from commit bc37a227b2f481d0f260f9beae5229e8d432a0cc)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
3 weeks ago[3.15] GH-54732: Tweak wording around empty lines in argument files (GH-150980) ...
Miss Islington (bot) [Tue, 9 Jun 2026 15:45:23 +0000 (17:45 +0200)] 
[3.15] GH-54732: Tweak wording around empty lines in argument files (GH-150980) (#151165)

GH-54732: Tweak wording around empty lines in argument files (GH-150980)
(cherry picked from commit 528550e0e753d64714f65a02d567bdc1d63ae3f1)

Co-authored-by: Savannah Ostrowski <savannah@python.org>
3 weeks ago[3.15] Docs: Only add `profiling-sampling-visualization.{css,js}` to files when neces...
Miss Islington (bot) [Tue, 9 Jun 2026 13:24:28 +0000 (15:24 +0200)] 
[3.15] Docs: Only add `profiling-sampling-visualization.{css,js}` to files when necessary (GH-151150)

(cherry picked from commit 0a179e748bcf158bdcdd47f0e57a1983993f4610)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.15] gh-109503: Fix document for shutil.move() on usage of os.rename() since it...
Miss Islington (bot) [Tue, 9 Jun 2026 13:06:30 +0000 (15:06 +0200)] 
[3.15] gh-109503: Fix document for shutil.move() on usage of os.rename() since it's inaccurate (GH-109507) (GH-150611)

Nonatomic move might be used even if the files are
on the same filesystem in some cases.
(cherry picked from commit 6ecd197c03c43412fc400235949fd8297f142e89)

Co-authored-by: Fang Li <fangli@users.noreply.github.com>