]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
11 days ago[3.15] gh-89696: Fix `loop.sock_connect` docs on address resolution (GH-153651) ...
Miss Islington (bot) [Mon, 13 Jul 2026 10:09:39 +0000 (12:09 +0200)] 
[3.15] gh-89696: Fix `loop.sock_connect` docs on address resolution (GH-153651) (#153652)

gh-89696: Fix `loop.sock_connect` docs on address resolution (GH-153651)
(cherry picked from commit 1fece4457032382947c7c2a5c9e95dc106ca7a7d)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
11 days ago[3.15] gh-148286: Fix UB in `ZstdDecompressor.unused_data` when a frame is decompress...
Miss Islington (bot) [Mon, 13 Jul 2026 08:01:30 +0000 (10:01 +0200)] 
[3.15] gh-148286: Fix UB in `ZstdDecompressor.unused_data` when a frame is decompressed in one call (GH-153258) (#153644)

(cherry picked from commit adebb68153346043c0671fa5725d269c32cc40e4)

Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Emma Smith <emma@emmatyping.dev>
11 days ago[3.15] gh-153037: Make ZstdFile.__next__ raise io.UnsupportedOperation on non-readabl...
Miss Islington (bot) [Mon, 13 Jul 2026 02:51:38 +0000 (04:51 +0200)] 
[3.15] gh-153037: Make ZstdFile.__next__ raise io.UnsupportedOperation on non-readable files (GH-153045) (#153638)

gh-153037: Make ZstdFile.__next__ raise io.UnsupportedOperation on non-readable files (GH-153045)

Make `ZstdFile.__next__` raise `io.UnsupportedOperation` on non-readable files, consistent with other compression modules.
(cherry picked from commit ed716551e13d1e46a5cd17955657d64b8824626a)

Co-authored-by: Łukasz <lukaszlapinski7@gmail.com>
12 days ago[3.15] gh-90431: Document cancellation behavior of asyncio.wait() and asyncio.as_comp...
Miss Islington (bot) [Sun, 12 Jul 2026 11:23:56 +0000 (13:23 +0200)] 
[3.15] gh-90431: Document cancellation behavior of asyncio.wait() and asyncio.as_completed() (GH-153616) (#153617)

gh-90431: Document cancellation behavior of asyncio.wait() and asyncio.as_completed() (GH-153616)
(cherry picked from commit dd2faeb33d5fa0d2635b91ece6eaebd34c61408c)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
13 days ago[3.15] gh-152132: Close stderr_copy in test_api.test_run (GH-153591) (#153595)
Miss Islington (bot) [Sat, 11 Jul 2026 22:26:16 +0000 (00:26 +0200)] 
[3.15] gh-152132: Close stderr_copy in test_api.test_run (GH-153591) (#153595)

gh-152132: Close stderr_copy in test_api.test_run (GH-153591)

Previously, the test was leaking a file descriptor.
(cherry picked from commit 0023d5b23df09f18425fea9b9c54a37ba050d5cf)

Co-authored-by: Victor Stinner <vstinner@python.org>
13 days ago[3.15] gh-102591: Document that urlcleanup resets the global opener (GH-153562) ...
Miss Islington (bot) [Sat, 11 Jul 2026 21:20:38 +0000 (23:20 +0200)] 
[3.15] gh-102591: Document that urlcleanup resets the global opener (GH-153562) (#153588)

gh-102591: Document that urlcleanup resets the global opener (GH-153562)
(cherry picked from commit bbd1f2f9e0354f91c5d3c4eb3eb53657265dcc77)

Co-authored-by: Taeknology <20297177+Taeknology@users.noreply.github.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>
13 days ago[3.15] gh-153293: Clear opcode statistics in the live profiler's reset_stats() (GH...
Miss Islington (bot) [Sat, 11 Jul 2026 18:19:00 +0000 (20:19 +0200)] 
[3.15] gh-153293: Clear opcode statistics in the live profiler's reset_stats() (GH-153295) (#153586)

gh-153293: Clear opcode statistics in the live profiler's reset_stats() (GH-153295)
(cherry picked from commit 43b0e01b5098c9e796957c10a992d8e6e95e0ae1)

Co-authored-by: Łukasz <lukaszlapinski7@gmail.com>
13 days ago[3.15] gh-151292: Change `total_samples:u32` in the binary format to `total_samples...
Miss Islington (bot) [Sat, 11 Jul 2026 13:41:09 +0000 (15:41 +0200)] 
[3.15] gh-151292: Change `total_samples:u32` in the binary format to `total_samples:u64` (GH-153425) (#153436)

gh-151292: Change `total_samples:u32` in the binary format to `total_samples:u64` (GH-153425)
(cherry picked from commit 1d196507e6496aab072e741e03d3565142a681ae)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>
13 days ago[3.15] gh-152614: Add raises to `QueueShutDown` in `asyncio.Queue.put_no_wait` and...
Miss Islington (bot) [Sat, 11 Jul 2026 12:46:14 +0000 (14:46 +0200)] 
[3.15] gh-152614: Add raises to `QueueShutDown` in `asyncio.Queue.put_no_wait` and `asyncio.Queue.get_nowait` documentation methods (GH-152681) (#153565)

gh-152614: Add raises to `QueueShutDown` in `asyncio.Queue.put_no_wait` and `asyncio.Queue.get_nowait` documentation methods (GH-152681)
(cherry picked from commit d1a5b54abaca2b443c7642ef3a7be8e1cd077ae3)

Co-authored-by: Duprat <yduprat@gmail.com>
13 days ago[3.15] gh-126877: Fix the configure check for Tcl/Tk with optimizing compilers (GH...
Miss Islington (bot) [Sat, 11 Jul 2026 10:22:02 +0000 (12:22 +0200)] 
[3.15] gh-126877: Fix the configure check for Tcl/Tk with optimizing compilers (GH-153543) (GH-153553)

The check assigned the addresses of Tcl_Init() and Tk_Init() to unused
variables, which optimizing compilers can eliminate, so it linked even
when the libraries were missing.  Call the functions instead.
(cherry picked from commit ff0a9ae269fa38c21f01bdea1a7ff5d439c4f681)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
13 days ago[3.15] gh-86726: Note that the ttk Treeview separator column option needs Tk 9.0...
Miss Islington (bot) [Sat, 11 Jul 2026 10:18:38 +0000 (12:18 +0200)] 
[3.15] gh-86726: Note that the ttk Treeview separator column option needs Tk 9.0 (GH-153556) (GH-153558)

(cherry picked from commit 9ca892717eaa66f3fba231f00dc5bce355f6f34c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
13 days ago[3.15] gh-86726: Fix and improve tkinter documentation and docstrings (GH-153549...
Miss Islington (bot) [Sat, 11 Jul 2026 10:17:25 +0000 (12:17 +0200)] 
[3.15] gh-86726: Fix and improve tkinter documentation and docstrings (GH-153549) (GH-153551)

Correct inaccurate return-type and option descriptions in the tkinter
reference, and add missing module and class docstrings.
(cherry picked from commit 77cb7560c07feed0d5b144c0c1735e1620c96f51)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
13 days ago[3.15] gh-88647: Fix tkinter config() docs for synonym options (GH-153544) (GH-153545)
Miss Islington (bot) [Sat, 11 Jul 2026 08:21:01 +0000 (10:21 +0200)] 
[3.15] gh-88647: Fix tkinter config() docs for synonym options (GH-153544) (GH-153545)

(cherry picked from commit d52cfd2a0ec4423ed94bda640deefdfcf053bd8e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
13 days ago[3.15] gh-153333: Read tkinter profile scripts with the source file's encoding (GH...
Serhiy Storchaka [Sat, 11 Jul 2026 05:22:20 +0000 (08:22 +0300)] 
[3.15] gh-153333: Read tkinter profile scripts with the source file's encoding (GH-153334) (GH-153541)

Tk.readprofile ran the user's ~/.CLASS.py and ~/.BASE.py scripts with
exec(open(path).read()), decoding them with the locale encoding.  Read
them in binary mode so exec() honors each script's own coding cookie.
(cherry picked from commit bac73b0f4ea475cbfb11f41579129c9d07075c34)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
2 weeks ago[3.15] gh-152216: Update bundled expat to 2.8.2 (GH-152234) (#153524)
Miss Islington (bot) [Fri, 10 Jul 2026 19:27:41 +0000 (21:27 +0200)] 
[3.15] gh-152216: Update bundled expat to 2.8.2 (GH-152234) (#153524)

gh-152216: Update bundled expat to 2.8.2 (GH-152234)

* Update bundled expat to 2.8.2
* `make regen-sbom`
* Update download URL
* Drop warnings (yay!)
(cherry picked from commit c22e9c9daef4d97a3fdf1d41a119947ed46ad937)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-151213: Fix asyncio tools permission requirements link (GH-153493) (GH...
Miss Islington (bot) [Fri, 10 Jul 2026 16:55:15 +0000 (18:55 +0200)] 
[3.15] gh-151213: Fix asyncio tools permission requirements link (GH-153493) (GH-153518)

(cherry picked from commit b276b88e385d7785bfc11d87fa56163e984ba699)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks ago[3.15] gh-153062: Fix a crash iterating itertools.tee on the free-threaded build...
Miss Islington (bot) [Fri, 10 Jul 2026 16:46:45 +0000 (18:46 +0200)] 
[3.15] gh-153062: Fix a crash iterating itertools.tee on the free-threaded build (gh-153063) (gh-153475)

itertools.tee branches share a linked list of teedataobject cells.  On the free-threaded build, iterating one branch from multiple threads, or iterating sibling branches concurrently, raced on the shared cells and each branch's position, corrupting refcounts and crashing.

Lock each teedataobject while reading, extending, or clearing it, and snapshot each branch's position under the tee object's own lock, revalidating before advancing, so the two locks are never nested.  Concurrent iteration of one tee is undefined and may raise RuntimeError as documented, but no longer crashes.

The free-threading snapshot and revalidation add per-element overhead on the default build, where the GIL already serializes access. Guard that path under Py_GIL_DISABLED so the default build keeps the original iteration and the free-threaded path is unchanged.

(cherry picked from commit 6c389c446e487bcb9d09e85de30aa42052990f1c)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2 weeks ago[3.15] gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717)...
Victor Stinner [Fri, 10 Jul 2026 15:18:14 +0000 (17:18 +0200)] 
[3.15] gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717) (#153416)

gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717)

* Replace "ubuntu-24.04" with "ubuntu-26.04".
* Replace "ubuntu-latest" with "ubuntu-26.04" for Cross build Linux.
* Replace "ubuntu-latest" with "ubuntu-slim" for small workloads.
* Update ".github/actionlint.yaml" to allow "ubuntu-26.04"
  and "ubuntu-26.04-arm" images.
* Install Ubuntu libmpdec-dev package, rather than installing libmpdec
  from source (tarball).
* No longer run https://apt.llvm.org/llvm.sh, since ubuntu-26.04 provides
  clang-21 by default.

(cherry picked from commit 4c79929705eb31959a6f4071cc34583de0737a28)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.15] gh-153438: Update NuGet download URL (GH-153482) (GH-153509)
Miss Islington (bot) [Fri, 10 Jul 2026 12:36:44 +0000 (14:36 +0200)] 
[3.15] gh-153438: Update NuGet download URL (GH-153482) (GH-153509)

gh-153438: Update NuGet download URL (GH-153482)
(cherry picked from commit 106eb532ea3b243423e62a702719e9d3c0e40c16)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
2 weeks ago[3.15] gh-153444: Fix compile warning in `Modules/_interpchannelsmodule.c` (GH-153445...
Miss Islington (bot) [Fri, 10 Jul 2026 11:37:10 +0000 (13:37 +0200)] 
[3.15] gh-153444: Fix compile warning in `Modules/_interpchannelsmodule.c` (GH-153445) (#153447)

gh-153444: Fix compile warning in `Modules/_interpchannelsmodule.c` (GH-153445)
(cherry picked from commit 33678dc79f00059aff09ac88f188ef2192031a85)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-151942: Fix all Sphinx nitpicks in the Python 2.4 What's New (GH-153116...
Miss Islington (bot) [Fri, 10 Jul 2026 10:44:28 +0000 (12:44 +0200)] 
[3.15] gh-151942: Fix all Sphinx nitpicks in the Python 2.4 What's New (GH-153116) (#153503)

(cherry picked from commit fc9fe142f8af744870d3535ce8ab561e8a390edd)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-151942: Fix all Sphinx nitpicks in the 2.5 What's New (GH-153120) (#153499)
Miss Islington (bot) [Fri, 10 Jul 2026 10:35:53 +0000 (12:35 +0200)] 
[3.15] gh-151942: Fix all Sphinx nitpicks in the 2.5 What's New (GH-153120) (#153499)

(cherry picked from commit fb00514a1a3ab0eda80dce493a3cc3eeaaefe032)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-153201: Make TSan CI mandatory (GH-153491) (#153497)
Miss Islington (bot) [Fri, 10 Jul 2026 10:19:24 +0000 (12:19 +0200)] 
[3.15] gh-153201: Make TSan CI mandatory (GH-153491) (#153497)

gh-153201: Make TSan CI mandatory (GH-153491)
(cherry picked from commit d0714388278510c6807ef6d5af03609a525f6063)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks ago[3.15] gh-145633: Allow PyFloat_Pack8 & PyFloat_UnPack* to fail in future CPython...
Miss Islington (bot) [Fri, 10 Jul 2026 09:51:58 +0000 (11:51 +0200)] 
[3.15] gh-145633: Allow PyFloat_Pack8 & PyFloat_UnPack* to fail in future CPython versions (GH-153440) (#153490)

gh-145633: Allow PyFloat_Pack8 & PyFloat_UnPack* to fail in future CPython versions (GH-153440)
(cherry picked from commit 9324f84b0f5722d165456b5858a683a2c82eefd2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2 weeks ago[3.15] gh-121608: Fix test_samply_profiler: only check samply once (GH-153424) (...
Miss Islington (bot) [Fri, 10 Jul 2026 02:49:38 +0000 (04:49 +0200)] 
[3.15] gh-121608: Fix test_samply_profiler: only check samply once (GH-153424) (#153457)

gh-121608: Fix test_samply_profiler: only check samply once (GH-153424)

Only run samply_command_works() once. Remove also dead code.
(cherry picked from commit 311444998140240c164092640897013500b05963)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-152132: Test Py_CompileString() in test_capi.test_run (GH-153470) (#153472)
Miss Islington (bot) [Fri, 10 Jul 2026 02:07:38 +0000 (04:07 +0200)] 
[3.15] gh-152132: Test Py_CompileString() in test_capi.test_run (GH-153470) (#153472)

gh-152132: Test Py_CompileString() in test_capi.test_run (GH-153470)

PyRun functions now raises ValueError if the start argument is
invalid.

* Add Modules/_testlimitedcapi/run.c.
* Rename _Py_CompileStringObjectWithModule() to
  _Py_CompileStringObject().
(cherry picked from commit d83d26724b8c3be5f535e56ded88593cc6803b86)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-152132: Fix bugs in Py_RunMain() (#153461) (#153466)
Victor Stinner [Fri, 10 Jul 2026 00:18:41 +0000 (02:18 +0200)] 
[3.15] gh-152132: Fix bugs in Py_RunMain() (#153461) (#153466)

* Check for signals more often. Previously, a pending exception could
  be removed by PyErr_Clear().
* Only call _PyInterpreterState_SetNotRunningMain() if
  _PyInterpreterState_SetRunningMain() has been called.
* Convert _PyPathConfig_UpdateGlobal() PyStatus error to an
  exception.

2 weeks ago[3.15] gh-98894: Quote test_dtrace tracer subcommands (GH-152901) (#153459)
Miss Islington (bot) [Thu, 9 Jul 2026 21:15:51 +0000 (23:15 +0200)] 
[3.15] gh-98894: Quote test_dtrace tracer subcommands (GH-152901) (#153459)

gh-98894: Quote test_dtrace tracer subcommands (GH-152901)

Use shlex.join() when building tracer -c command strings
for avoiding issues with spaces.
(cherry picked from commit a159c6851f47549d2bc0cd37a0f555951bb11d7b)

Co-authored-by: stratakis <cstratak@redhat.com>
2 weeks ago[3.15] gh-153406: Raise ValueError, not OverflowError, for out-of-range dates in...
Miss Islington (bot) [Thu, 9 Jul 2026 19:53:04 +0000 (21:53 +0200)] 
[3.15] gh-153406: Raise ValueError, not OverflowError, for out-of-range dates in email.utils.parsedate_to_datetime (GH-153407) (#153435)

email.utils.parsedate_to_datetime documented that it raises ValueError for an invalid date, but it leaked OverflowError when the parsed year or timezone offset was too large for the datetime and timedelta constructors, and that OverflowError also escaped the modern header parsing path since DateHeader.parse only caught ValueError. Wrap the datetime and timezone construction so an OverflowError is re-raised as a ValueError with the original chained as the cause, which restores the documented contract and lets the existing header handler record an InvalidDateDefect instead of raising.
(cherry picked from commit 37a26b9b94b147b5d683bfce0ef5a4c2fbc21085)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
2 weeks ago[3.15] gh-152769: Enable perf trampoline on musl (Alpine Linux) (#152774) (#153456)
Victor Stinner [Thu, 9 Jul 2026 19:51:19 +0000 (21:51 +0200)] 
[3.15] gh-152769: Enable perf trampoline on musl (Alpine Linux) (#152774) (#153456)

gh-152769: Enable perf trampoline on musl (Alpine Linux) (#152774)

(cherry picked from commit b9e8979dcd563ee913c66802c8544aa050fda2d5)

Co-authored-by: Xiaowei Lu <weixlu420302@gmail.com>
2 weeks ago[3.15] gh-152132: Fix Py_RunMain() to return an exit code (GH-153446) (#153454)
Miss Islington (bot) [Thu, 9 Jul 2026 19:00:28 +0000 (21:00 +0200)] 
[3.15] gh-152132: Fix Py_RunMain() to return an exit code (GH-153446) (#153454)

gh-152132: Fix Py_RunMain() to return an exit code (GH-153446)

* Fix Py_RunMain() to return an exit code, rather than calling
  Py_Exit(), when running a script, a command, or the REPL.
* _PyRun_SimpleFile() now logs errors to stderr, for example if setting
  __main__.__file__ fails.
* Add tests on Py_RunMain() exitcode.
* Rename functions:

  * _PyRun_SimpleStringFlagsWithName() => _PyRun_SimpleString()
  * _PyRun_SimpleFileObject() => _PyRun_SimpleFile()
  * _PyRun_AnyFileObject() => _PyRun_AnyFile()
  * _PyRun_InteractiveLoopObject() => _PyRun_InteractiveLoop()

* Change _PyRun_SimpleString(), _PyRun_SimpleFile(), _PyRun_AnyFile() and
  _PyRun_InteractiveLoop() return type to PyObject*.
* pymain_repl() now displays the error if PySys_Audit() or
  import _pyrepl failed.
* PyRun_SimpleFileExFlags() and PyRun_AnyFileExFlags() now log
  PyUnicode_DecodeFSDefault() error. So these functions can no longer
  return -1 with an exception set.
(cherry picked from commit fac72f1ee91fb380640a4c4be6df07a8f02d3110)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-146531: Broaden `wm_iconbitmap` skip on macOS 26 Intel (GH-153348) (#153450)
Miss Islington (bot) [Thu, 9 Jul 2026 18:55:52 +0000 (20:55 +0200)] 
[3.15] gh-146531: Broaden `wm_iconbitmap` skip on macOS 26 Intel (GH-153348) (#153450)

gh-146531: Broaden `wm_iconbitmap` skip on macOS 26 Intel (GH-153348)
(cherry picked from commit 6ba3ad55bd922f164acf8f20b884730b718ee433)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.15] gh-153422: Assert bool return type in tkinter tests (GH-153429) (GH-153439)
Serhiy Storchaka [Thu, 9 Jul 2026 15:16:50 +0000 (18:16 +0300)] 
[3.15] gh-153422: Assert bool return type in tkinter tests (GH-153429) (GH-153439)

The tests for PhotoImage.transparency_get(), Text.debug() and
Treeview.exists() now assert the exact bool type, and the documentation
and docstrings use "true"/"false" instead of "1"/"0".

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] gh-153417: Fix BytesWarning in imaplib error messages for bytes arguments...
Miss Islington (bot) [Thu, 9 Jul 2026 14:19:21 +0000 (16:19 +0200)] 
[3.15] gh-153417: Fix BytesWarning in imaplib error messages for bytes arguments (GH-153423) (GH-153430)

IMAP4.select() and IMAP4.uid() formatted the mailbox and command argument
with %s in their error messages, which raised BytesWarning under -bb when the
argument was bytes and masked the real error.  Use %r instead, which is safe
for bytes and also quotes the value.
(cherry picked from commit 11f1b70f4c981b781aaa94427dc1fceb637b2187)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] gh-152132: Test all PyRun functions in test_capi.test_run (GH-153352) (#153411)
Miss Islington (bot) [Thu, 9 Jul 2026 11:21:50 +0000 (13:21 +0200)] 
[3.15] gh-152132: Test all PyRun functions in test_capi.test_run (GH-153352) (#153411)

gh-152132: Test all PyRun functions in test_capi.test_run (GH-153352)

PyRun_InteractiveOneObjectEx() now raises TypeError if the second
parameter type is not str.
(cherry picked from commit cd9994e2831ea743e5423c1db56ca2ca42154e0a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-69134: Harden NotebookTest.test_traversal (GH-153403) (GH-153408)
Miss Islington (bot) [Thu, 9 Jul 2026 10:27:08 +0000 (12:27 +0200)] 
[3.15] gh-69134: Harden NotebookTest.test_traversal (GH-153403) (GH-153408)

identify(5, 5) could run before the notebook reached its requested size,
so the pixel fell outside the first tab and returned ''.  Guard it with a
new opt-in wait_until_mapped(full_size=True).
(cherry picked from commit 53b04980284b668c27fc6d5adb0de19d38efe95b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] gh-153380: Adapt ttk tests to Tk 9.1 changes (GH-153381) (GH-153386)
Miss Islington (bot) [Thu, 9 Jul 2026 06:43:55 +0000 (08:43 +0200)] 
[3.15] gh-153380: Adapt ttk tests to Tk 9.1 changes (GH-153381) (GH-153386)

- selectmode: new 'single' and 'multiple' modes
- set(): includes the tree column '#0'
- insert()/selection(): item ids keep the passed value's type
- heading_callback: avoid a double click on the second click
- theme_create_image: don't assert the exact (now scaled) width
(cherry picked from commit d6855c8ad00ffa2bee318b510d0e90573dddbbab)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] gh-151640: Track sharing of `BytesIO` buffer in free-threaded builds (GH-15165...
Peter Bierma [Thu, 9 Jul 2026 06:19:26 +0000 (02:19 -0400)] 
[3.15] gh-151640: Track sharing of `BytesIO` buffer in free-threaded builds (GH-151651) (gh-153151)

(cherry picked from commit 881a13a97c7a29b9de57913c773cd5f195270fbd)

Remove peek() call from backported test, not in Python 3.15.

Co-authored-by: Pedram Karimi <147748351+pedramkarimii@users.noreply.github.com>
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
2 weeks ago[3.15] gh-130578: clarify urllib.parse.quote parameter defaults behavior (GH-130598...
Miss Islington (bot) [Thu, 9 Jul 2026 05:19:45 +0000 (07:19 +0200)] 
[3.15] gh-130578: clarify urllib.parse.quote parameter defaults behavior (GH-130598) (#153383)

gh-130578: clarify urllib.parse.quote parameter defaults behavior (GH-130598)
(cherry picked from commit bc9bb7386597e22693662f489a7474998788e228)

Co-authored-by: Kanishk Pachauri <itskanishkp.py@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.15] gh-47005: fix do_open() to let regular headers override unredirected … (GH...
Miss Islington (bot) [Thu, 9 Jul 2026 04:15:30 +0000 (06:15 +0200)] 
[3.15] gh-47005: fix do_open() to let regular headers override unredirected … (GH-146506) (#153377)

gh-47005: fix do_open() to let regular headers override unredirected … (GH-146506)

AbstractHTTPHandler.do_open() was building the request header dict by
starting with unredirected_hdrs and only inserting regular headers that
were not already present, giving unredirected headers priority.  This
contradicts get_header() and header_items(), both of which give regular
headers the higher priority.

Fix by unconditionally updating with req.headers so that a header set
via add_header() always overrides one set via add_unredirected_header().

---------
(cherry picked from commit 6d386684ad69f42cb57c72fe0e0ffcec82ec7e12)

Co-authored-by: CHINMAY <89741289+Das-Chinmay@users.noreply.github.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>
2 weeks ago[3.15] gh-151213: Document asyncio debugging tools (GH-151392) (#153370)
Miss Islington (bot) [Wed, 8 Jul 2026 23:25:18 +0000 (01:25 +0200)] 
[3.15] gh-151213: Document asyncio debugging tools (GH-151392) (#153370)

gh-151213: Document asyncio debugging tools (GH-151392)
(cherry picked from commit b2d8db1ac818e74ffe666146335e9e6c7f1f3f56)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
2 weeks ago[3.15] gh-119592: gh-152967: Fix ProcessPoolExecutor stranding submitted work when...
Miss Islington (bot) [Wed, 8 Jul 2026 22:43:48 +0000 (00:43 +0200)] 
[3.15] gh-119592: gh-152967: Fix ProcessPoolExecutor stranding submitted work when a max_tasks_per_child worker exits (GH-152978) (#153363)

gh-119592: gh-152967: Fix ProcessPoolExecutor stranding submitted work when a max_tasks_per_child worker exits (GH-152978)

gh-119592: Fix ProcessPoolExecutor stranding submitted work when a max_tasks_per_child worker exits

Worker replacement went through the executor object: the manager thread
read executor attributes that shutdown(wait=False) clears concurrently,
and could not replace workers at all once the executor was garbage
collected. A worker exiting at its max_tasks_per_child limit in those
states left the remaining submitted work permanently unexecuted and hung
interpreter exit; the racing case could crash the manager thread.

Replace workers from the executor manager thread using its own state
plus configuration read through the live executor weakref, which
shutdown() never clears:

- After shutdown(wait=False) with the executor still referenced, a
  replacement is spawned and the remaining work is executed as
  documented.
- Once the executor has been garbage collected (gh-152967), or a
  replacement worker cannot be started and no workers remain, the
  remaining futures now fail with BrokenProcessPool instead of never
  resolving.
- A new _force_shutting_down flag stops both spawn paths from starting
  workers that would escape terminate_workers()/kill_workers().
(cherry picked from commit 0c6422ff6a13ae309493fb7a358cb35d7ea959c8)

Reviewed-multiple-times-by: Gregory P. Smith
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago[3.15] gh-153300: Set global configuration variables in PyConfig_Set() (GH-153301...
Miss Islington (bot) [Wed, 8 Jul 2026 18:21:20 +0000 (20:21 +0200)] 
[3.15] gh-153300: Set global configuration variables in PyConfig_Set() (GH-153301) (#153356)

gh-153300: Set global configuration variables in PyConfig_Set() (GH-153301)

PyConfig_Set() now also set global configuration variables. For
example, PyConfig_Set("inspect", value) now also sets Py_InspectFlag.

Use PyConfig_Set() in main.c to set the inspect flag. Python code can
now see the updated sys.flags.inspect value.
(cherry picked from commit 9fb713f1b8b774c789db007e3824c766a626ccff)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks ago[3.15] gh-143750: Compile OpenSSL with TSan for TSan CI (#153316) (#153353)
Kumar Aditya [Wed, 8 Jul 2026 17:31:34 +0000 (23:01 +0530)] 
[3.15] gh-143750: Compile OpenSSL with TSan for TSan CI (#153316) (#153353)

gh-143750: Compile OpenSSL with TSan for TSan CI (#153316)

(cherry picked from commit fc19ad7b8b08c43667c9087d89f32f08830544ce)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2 weeks ago[3.15] gh-150191: temporarily skip two openssl tests which have internal data races...
Miss Islington (bot) [Wed, 8 Jul 2026 16:04:13 +0000 (18:04 +0200)] 
[3.15] gh-150191: temporarily skip two openssl tests which have internal data races under TSAN (GH-153320) (#153350)

gh-150191: temporarily skip two openssl tests which have internal data races under TSAN (GH-153320)
(cherry picked from commit c11af48fddb1fd5b38e2f026c333e8487f3bcc53)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks ago[3.15] gh-153298: Fix data race in `GenericAlias` parameter initialization on FT...
Miss Islington (bot) [Wed, 8 Jul 2026 15:30:51 +0000 (17:30 +0200)] 
[3.15] gh-153298: Fix data race in `GenericAlias` parameter initialization on FT (GH-153318) (#153345)

gh-153298: Fix data race in `GenericAlias` parameter initialization on FT (GH-153318)
(cherry picked from commit 68abf17fa926db94dc17f01a7095bdcee2a52314)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-153339: Remove extra skip in `test_generators.py` (GH-153340) (#153343)
Miss Islington (bot) [Wed, 8 Jul 2026 15:10:56 +0000 (17:10 +0200)] 
[3.15] gh-153339: Remove extra skip in `test_generators.py` (GH-153340) (#153343)

gh-153339: Remove extra skip in `test_generators.py` (GH-153340)
(cherry picked from commit f932a741909da03edfac7ab537c093d2379599a4)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-145098: Use `macos-26[-intel]` instead of `macos-15[-intel]` in `{jit,tail...
Miss Islington (bot) [Wed, 8 Jul 2026 13:43:59 +0000 (15:43 +0200)] 
[3.15] gh-145098: Use `macos-26[-intel]` instead of `macos-15[-intel]` in `{jit,tail-call}.yml` (GH-153194) (#153328)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.15] gh-153083: Defer GC tracking of an array to the end of construction. (gh-15328...
Miss Islington (bot) [Wed, 8 Jul 2026 12:59:13 +0000 (14:59 +0200)] 
[3.15] gh-153083: Defer GC tracking of an array to the end of construction. (gh-153284) (gh-153336)

gh-153083: Defer GC tracking of an array to the end of construction. (gh-153284)
(cherry picked from commit 8615062fd580934fc431746f64b1ac7ee6ef8e88)

Co-authored-by: Donghee Na <donghee.na@python.org>
2 weeks ago[3.15] gh-143990: Preserve the size when creating a Font from a named font (GH-153267...
Serhiy Storchaka [Wed, 8 Jul 2026 12:58:19 +0000 (15:58 +0300)] 
[3.15] gh-143990: Preserve the size when creating a Font from a named font (GH-153267) (GH-153323)

tkinter.font.Font now copies the options of a named font (via "font
configure") instead of the options resolved by "font actual", which
would resolve a size specified in pixels (a negative size) to points.
A font description is still resolved, as it cannot be parsed otherwise.

Font.copy(), which has always been equivalent to constructing a Font
from the original font, is updated to match and now preserves the size
too.

(cherry picked from commit 45010f441d392558f1be8f3cea7d86954ed2217d)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] gh-88574: Do not swallow the line after a terminating literal in imaplib ...
Miss Islington (bot) [Wed, 8 Jul 2026 12:17:10 +0000 (14:17 +0200)] 
[3.15] gh-88574: Do not swallow the line after a terminating literal in imaplib (GH-153317) (GH-153324)

GH-152751 skipped a spurious blank line after a literal unconditionally,
corrupting a response that ends with a literal (such as a mailbox name
returned by LIST): its empty trailer was mistaken for the blank and the
following line was swallowed.

The blank is now skipped only inside an unclosed parenthesis.  After a
literal that ends the response it instead arrives before the next
response and is skipped there.
(cherry picked from commit 6b81784f57c6e7ddef61c8db26bb896b3633dcae)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] gh-86017: Document displayof for Font.actual() and clarify Font.copy() (GH...
Miss Islington (bot) [Wed, 8 Jul 2026 12:09:01 +0000 (14:09 +0200)] 
[3.15] gh-86017: Document displayof for Font.actual() and clarify Font.copy() (GH-153288) (GH-153329)

Explain the displayof argument of tkinter.font.Font.actual() and describe
what Font.copy() returns, including for a wrapped font description.
(cherry picked from commit fa5eafd19c3d395b4498e21b4e1b8faac2ebdb0a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] gh-153292: Fix data race in `threading.RLock.__repr__` in FT builds (GH-153299...
Miss Islington (bot) [Wed, 8 Jul 2026 10:13:44 +0000 (12:13 +0200)] 
[3.15] gh-153292: Fix data race in `threading.RLock.__repr__` in FT builds (GH-153299) (#153314)

gh-153292: Fix data race in `threading.RLock.__repr__` in FT builds (GH-153299)
(cherry picked from commit 1051384fcdfa88dd88d66dfc93b60aec9ca1ad2e)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-153056: Fix a data race compiling the string.Template pattern in free-threa...
Miss Islington (bot) [Wed, 8 Jul 2026 01:40:03 +0000 (03:40 +0200)] 
[3.15] gh-153056: Fix a data race compiling the string.Template pattern in free-threading builds (GH-153057) (#153302)

gh-153056: Fix a data race compiling the string.Template pattern in free-threading builds (GH-153057)

* gh-153056: Fix a data race compiling the string.Template pattern in free-threading builds

Template compiles its substitution pattern lazily and caches it on the class.  On the free-threaded build two concurrent first uses could race: a thread that observed the pattern another thread had just compiled would try to recompile it, and re.compile() rejects flags on an already-compiled pattern, raising a spurious ValueError.  Return the already-compiled pattern instead.

As a side effect, a subclass that supplies an already-compiled pattern now works too; previously it raised the same ValueError at class definition.

* Trim test comments and NEWS wording

* Document that the pattern attribute accepts a string or a compiled regex

* Comment the three states of pattern and note the documented-behavior fix in NEWS

* Update Doc/library/string.rst

---------
(cherry picked from commit 45729033bff28f8abc36c42e802cb2853c205737)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Barry Warsaw <barry@python.org>
2 weeks ago[3.15] gh-153252: Fix error handling in `_PyCompile_CodeGen` (GH-153253) (#153281)
Miss Islington (bot) [Tue, 7 Jul 2026 17:27:32 +0000 (19:27 +0200)] 
[3.15] gh-153252: Fix error handling in `_PyCompile_CodeGen` (GH-153253) (#153281)

gh-153252: Fix error handling in `_PyCompile_CodeGen` (GH-153253)
(cherry picked from commit a74280e6696125acb7628facc577d0f975c4d69e)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-153210: Restore accidental `array.ArrayType` removal (GH-153261) (#153274)
Miss Islington (bot) [Tue, 7 Jul 2026 17:26:05 +0000 (19:26 +0200)] 
[3.15] gh-153210: Restore accidental `array.ArrayType` removal (GH-153261) (#153274)

gh-153210: Restore accidental `array.ArrayType` removal (GH-153261)
(cherry picked from commit ac2e14b4e29b2d11a14d289969cfffc298ea75d9)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] gh-153205: Set `MemoryError` in stackref array conversion (GH-153206) (#153272)
Miss Islington (bot) [Tue, 7 Jul 2026 16:34:17 +0000 (18:34 +0200)] 
[3.15] gh-153205: Set `MemoryError` in stackref array conversion (GH-153206) (#153272)

gh-153205: Set `MemoryError` in stackref array conversion (GH-153206)
(cherry picked from commit 08759ff1015552d58c1f6ffa13ea08b0ae32e6c0)

Co-authored-by: An Long <aisk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] Temporarily allow the TSan (free-threading) job to fail (GH-152173) (#153268)
Miss Islington (bot) [Tue, 7 Jul 2026 16:30:41 +0000 (18:30 +0200)] 
[3.15] Temporarily allow the TSan (free-threading) job to fail (GH-152173) (#153268)

(cherry picked from commit 4f39efc47de9b1bc1cd9dfa88060efb4ff104d01)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-83274: Don't crash when a Tcl interpreter is deallocated in the wrong threa...
Serhiy Storchaka [Tue, 7 Jul 2026 16:26:50 +0000 (19:26 +0300)] 
[3.15] gh-83274: Don't crash when a Tcl interpreter is deallocated in the wrong thread (GH-152323) (GH-153271)

Deallocating the interpreter from a thread other than the one it was created
in ran Tcl_DeleteInterp() there, which makes Tcl abort the process
("Tcl_AsyncDelete: async handler deleted by the wrong thread").

Tkapp_Dealloc() now leaks the interpreter in that case and reports a
RuntimeWarning instead.

(cherry picked from commit 46d1809ccd4bc0e1439a4696b428d2a1c2edcfbf)

Co-authored-by: E. Paine <63801254+E-Paine@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] gh-150191: Avoid data race in test_sni_callback_race (GH-150193) (#153269)
Miss Islington (bot) [Tue, 7 Jul 2026 16:24:08 +0000 (18:24 +0200)] 
[3.15] gh-150191: Avoid data race in test_sni_callback_race (GH-150193) (#153269)

gh-150191: Avoid data race in test_sni_callback_race (GH-150193)
(cherry picked from commit fd9d8c3c66fc147cac6024c63b8c109d65e3aec8)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2 weeks ago[3.15] gh-153210: Fix `array` module import crash under a memory pressure (GH-153238...
Miss Islington (bot) [Tue, 7 Jul 2026 12:40:11 +0000 (14:40 +0200)] 
[3.15] gh-153210: Fix `array` module import crash under a memory pressure (GH-153238) (#153249)

gh-153210: Fix `array` module import crash under a memory pressure (GH-153238)
(cherry picked from commit 12ed8b16feb3502cea427ff846e9d0b3d7fef721)

Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks ago[3.15] Seed pip caches for docs on `main`/`3.x` branches (GH-153127) (#153231)
Miss Islington (bot) [Tue, 7 Jul 2026 09:30:34 +0000 (11:30 +0200)] 
[3.15] Seed pip caches for docs on `main`/`3.x` branches (GH-153127) (#153231)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.15] gh-153227: Use a development version of Pygments (GH-153228) (#153254)
Miss Islington (bot) [Tue, 7 Jul 2026 09:16:51 +0000 (11:16 +0200)] 
[3.15] gh-153227: Use a development version of Pygments (GH-153228) (#153254)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2 weeks ago[3.15] gh-82151: Update and improve urlsplit docstring (GH-152985) (#153154)
Miss Islington (bot) [Tue, 7 Jul 2026 00:24:44 +0000 (02:24 +0200)] 
[3.15] gh-82151: Update and improve urlsplit docstring (GH-152985) (#153154)

gh-82151: Update and improve urlsplit docstring (GH-152985)

(cherry picked from commit ad54b91b9fa4c5d12f155bb09138dff21a2bdec3)

Co-authored-by: Pranav Choudhary <chaudharyypranav@gmail.com>
Co-authored-by: idomic <michael.ido@gmail.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>
2 weeks ago[3.15] gh-153068: Preserve cprofile enable errors (GH-153070) (#153241)
Miss Islington (bot) [Tue, 7 Jul 2026 00:11:55 +0000 (02:11 +0200)] 
[3.15] gh-153068: Preserve cprofile enable errors (GH-153070) (#153241)

2 weeks ago[3.15] gh-140729: Fix the cProfile module when the executed script contains calls...
Miss Islington (bot) [Tue, 7 Jul 2026 00:10:18 +0000 (02:10 +0200)] 
[3.15] gh-140729: Fix the cProfile module when the executed script contains calls to multiprocessing.Process (GH-144715) (#153243)

2 weeks ago[3.15] gh-153200: Fix math.isqrt() for int subclasses with overridden comparison...
Miss Islington (bot) [Mon, 6 Jul 2026 19:17:26 +0000 (21:17 +0200)] 
[3.15] gh-153200: Fix math.isqrt() for int subclasses with overridden comparison operators (GH-153203) (GH-153223)

The final check-and-correct comparison in the arbitrary precision path
could call a comparison operator overridden in an int subclass.
Compare by value with int's tp_richcompare.
(cherry picked from commit 3a1b5473f217fc493f743c9ca8b877d2e76f8e6b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks ago[3.15] gh-150880: Clarify DirEntry.path construction semantics (GH-153218) (GH-153219)
Miss Islington (bot) [Mon, 6 Jul 2026 17:23:15 +0000 (19:23 +0200)] 
[3.15] gh-150880: Clarify DirEntry.path construction semantics (GH-153218) (GH-153219)

gh-150880: Clarify DirEntry.path construction semantics (GH-153218)
(cherry picked from commit 53661afabd2b4a9c92230ee7024dc42782164f8e)

Co-authored-by: Zain Nadeem <zainnadeemzainnadeem80@gmail.com>
2 weeks ago[3.15] gh-152682: Fix NULL dereference on OOM in `symtable_visit_type_param_bound_or_...
Miss Islington (bot) [Mon, 6 Jul 2026 16:36:32 +0000 (18:36 +0200)] 
[3.15] gh-152682: Fix NULL dereference on OOM in `symtable_visit_type_param_bound_or_default` (GH-152684) (#152695)

In `symtable_visit_type_param_bound_or_default()`, when a reserved name
(e.g. `__classdict__`) is used as a type parameter, `PyUnicode_FromFormat()`
is called to build the SyntaxError message. If the allocation fails and
returns NULL, the subsequent `PyErr_SetObject()` and `Py_DECREF()` calls
would dereference NULL, causing a segfault.

Fix by returning 0 immediately when `PyUnicode_FromFormat()` returns NULL.
This propagates the MemoryError set by `PyUnicode_FromFormat()`.

The bug was introduced in gh-128632 (commit 891c61c).
(cherry picked from commit 10ed03edf128ed1101ab8d04bcd715f2033fec55)

Co-authored-by: Petr Vaganov <petrvaganoff@gmail.com>
* Remove test

---------

Co-authored-by: Petr Vaganov <petrvaganoff@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] Docs: Link to the `contextlib.chdir` context manager in the `os.chdir` docs...
Miss Islington (bot) [Mon, 6 Jul 2026 15:49:33 +0000 (17:49 +0200)] 
[3.15] Docs: Link to the `contextlib.chdir` context manager in the `os.chdir` docs (GH-153152) (#153212)

(cherry picked from commit f155dbed4ef30dec5d00b8b09524b0d9f63965bc)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-152849: Fix `OverflowError` message for out-of-range timestamps in the...
Miss Islington (bot) [Mon, 6 Jul 2026 15:25:47 +0000 (17:25 +0200)] 
[3.15] gh-152849: Fix `OverflowError` message for out-of-range timestamps in the `time` module (GH-152850) (#153209)

(cherry picked from commit 2d7a74ece7884c9a5f52cc6ac38a6e7ee691b26c)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-148286: Remove invalid test in `test_decodeescape` (GH-153187) (#153204)
Miss Islington (bot) [Mon, 6 Jul 2026 15:22:23 +0000 (17:22 +0200)] 
[3.15] gh-148286: Remove invalid test in `test_decodeescape` (GH-153187) (#153204)

(cherry picked from commit 8477652cc122e744bcc70c1e133905bcbe2d8516)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] Add tests for syntax error messages that had no test coverage (GH-153192)...
Miss Islington (bot) [Mon, 6 Jul 2026 14:20:55 +0000 (16:20 +0200)] 
[3.15] Add tests for syntax error messages that had no test coverage (GH-153192) (GH-153196)

Add tests for syntax error messages that had no test coverage (GH-153192)

"illegal target for annotation" and "cannot use dict unpacking here"
were not tested at all, and "f-string: expecting '!', or ':', or '}'"
was only tested for its t-string variant.
(cherry picked from commit 836b2069c86e25cf9456e9210bb612e5166d0779)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago[3.15] gh-146531: Skip hanging `wm iconbitmap` test on macOS 26 Intel (GH-148032...
Miss Islington (bot) [Mon, 6 Jul 2026 12:56:14 +0000 (14:56 +0200)] 
[3.15] gh-146531: Skip hanging `wm iconbitmap` test on macOS 26 Intel (GH-148032) (#153190)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.15] gh-145098: Use `macos-26-intel` instead of `macos-15-intel` (GH-149991) (...
Miss Islington (bot) [Mon, 6 Jul 2026 09:50:26 +0000 (11:50 +0200)] 
[3.15] gh-145098: Use `macos-26-intel` instead of `macos-15-intel` (GH-149991) (#153179)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.15] gh-148765: Fix description of *include_hidden* parameter in `glob.glob()`...
Miss Islington (bot) [Mon, 6 Jul 2026 09:33:36 +0000 (11:33 +0200)] 
[3.15] gh-148765: Fix description of *include_hidden* parameter in `glob.glob()` docs (GH-148768) (#153173)

(cherry picked from commit db3a4773e1e5fc1a30597d9e08bcbe41d27e5bbb)

Co-authored-by: Eoin Shaughnessy <45000144+EoinTrial@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-153141: Fix mutable default argument in _SharedMemoryTracker.__init__ ...
Miss Islington (bot) [Sun, 5 Jul 2026 19:36:51 +0000 (21:36 +0200)] 
[3.15] gh-153141: Fix mutable default argument in _SharedMemoryTracker.__init__ (GH-153142) (#153145)

gh-153141: Fix mutable default argument in _SharedMemoryTracker.__init__ (GH-153142)

Fix default argument for segment_names in _SharedMemoryTracker constructor to not use a mutable list.
(cherry picked from commit d733b104d53e96584a6881d2772df65ad82573a0)

Co-authored-by: Vineet Kumar <108144301+whyvineet@users.noreply.github.com>
2 weeks ago[3.15] gh-105708: 'V' could be case insensitive for IPvFuture hostnames (GH-105709...
Miss Islington (bot) [Sun, 5 Jul 2026 17:52:46 +0000 (19:52 +0200)] 
[3.15] gh-105708: 'V' could be case insensitive for IPvFuture hostnames (GH-105709) (#153138)

gh-105708: 'V' could be case insensitive for IPvFuture hostnames (GH-105709)

* gh-105708: 'V' could be case insensitive for IPvFuture hostnames

* gh-105708: 'V' could be case insensitive for IPvFuture hostnames & checking empty hostnames

* 📜🤖 Added by blurb_it.

* Fix the Merge changing \z to \Z.

* Fixed the News Entry.

* Fix the lint.

---------
(cherry picked from commit a47a66ccef0f98fcf088bc260ca14b889efa9b04)

Co-authored-by: Chandra <csreddy1998@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>
2 weeks ago[3.15] gh-143921: Narrow the control character check in imaplib commands (GH-153067...
Miss Islington (bot) [Sun, 5 Jul 2026 15:58:48 +0000 (17:58 +0200)] 
[3.15] gh-143921: Narrow the control character check in imaplib commands (GH-153067) (GH-153135)

Only NUL, CR and LF are rejected now.  Other control characters are
valid in quoted strings and can occur in mailbox names returned by
the server, so they are now accepted and sent quoted.
(cherry picked from commit d0921efb665aff26b378f495e5ff84f7e3fe649d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago[3.15] gh-68147: Fix RFC references in imaplib (GH-153126) (GH-153130)
Miss Islington (bot) [Sun, 5 Jul 2026 14:41:39 +0000 (16:41 +0200)] 
[3.15] gh-68147: Fix RFC references in imaplib (GH-153126) (GH-153130)

Refer to RFC 3501, which obsoleted RFC 2060.  "]" is disallowed
in flags, not in tags.
(cherry picked from commit 74a2438bf783077cf49460ed0fed8853675fb103)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago[3.15] gh-149930: Clarify imaplib response helper types (GH-149963) (GH-153123)
Miss Islington (bot) [Sun, 5 Jul 2026 13:27:34 +0000 (15:27 +0200)] 
[3.15] gh-149930: Clarify imaplib response helper types (GH-149963) (GH-153123)

(cherry picked from commit d2d415b9761a539c37ea4f950df4e9aab0eca6ed)

Co-authored-by: Savage Mechanic <savagemechanic@github.com>
Co-authored-by: savagemechanic <20458938+savagemechanic@users.noreply.github.com>
2 weeks ago[3.15] gh-79638: Restore "Treat an unreachable robots.txt as disallow all" (GH-152525...
Miss Islington (bot) [Sun, 5 Jul 2026 11:44:44 +0000 (13:44 +0200)] 
[3.15] gh-79638: Restore "Treat an unreachable robots.txt as disallow all" (GH-152525) (GH-153107)

This change was accidentally reverted by f0daba1652c (gh-106693,
GH-149514), which only intended to revert the ob_sval change.
The tests were already restored by GH-149569.
(cherry picked from commit 70100b9ea0b43a95226eee45652a5735bb91e9c7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 weeks ago[3.15] gh-69134: Wait until mapped in SimpleDialog keyboard tests (GH-152690) (GH...
Serhiy Storchaka [Sun, 5 Jul 2026 11:42:24 +0000 (14:42 +0300)] 
[3.15] gh-69134: Wait until mapped in SimpleDialog keyboard tests (GH-152690) (GH-153104)

The SimpleDialog keyboard tests generate key events after focus_force(),
which on Windows are dropped until the toplevel is mapped, so they could
fail intermittently (seen on the Windows10 buildbot as
test_return_no_default).  Wait until the window is mapped in these tests,
as GH-152599 did for the other keyboard tests.

(cherry picked from commit 7d619c2fea131722d0bfdad150c081c44cc0abd7)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] Fix minor typos in 'Compound statements' docs (GH-149666) (#153113)
Miss Islington (bot) [Sun, 5 Jul 2026 11:31:55 +0000 (13:31 +0200)] 
[3.15] Fix minor typos in 'Compound statements' docs (GH-149666) (#153113)

(cherry picked from commit 856049a9d99119ad74cd991fa8f8a72ebc909122)

Co-authored-by: Jonathan Dung <jonathandung@yahoo.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.15] gh-76607: Improve documentation of the tkinter cursor option (GH-152481) ...
Miss Islington (bot) [Sun, 5 Jul 2026 11:24:25 +0000 (13:24 +0200)] 
[3.15] gh-76607: Improve documentation of the tkinter cursor option (GH-152481) (GH-153110)

Link to the cursors(3tk) manual page for the available cursor names and
note that they are platform-dependent.
(cherry picked from commit ea5703735f2ff4ba7bc3b0c7e746a44cb9b25081)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] gh-54930: Send a status line in error responses to malformed request lines...
Miss Islington (bot) [Sun, 5 Jul 2026 11:22:09 +0000 (13:22 +0200)] 
[3.15] gh-54930: Send a status line in error responses to malformed request lines (GH-152980) (GH-153092)

Previously such error responses were sent in the bare HTTP/0.9 style,
without a status line and headers.
(cherry picked from commit 2ab620b41af57e24c11c131bec02f682561ecfaa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago[3.15] gh-123193: Document tkinter Variable lifetime (GH-152625) (GH-153098)
Miss Islington (bot) [Sun, 5 Jul 2026 11:15:56 +0000 (13:15 +0200)] 
[3.15] gh-123193: Document tkinter Variable lifetime (GH-152625) (GH-153098)

A Tk variable wrapper unsets its Tcl variable when garbage collected, so a
reference must be kept while a widget uses it.  Otherwise Tk recreates the Tcl
variable but never unsets it again, leaking it.
(cherry picked from commit 820b6ca22d72482e2e68dd738cc370535c83655e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] gh-75952: Document negative offsets in tkinter geometry strings (GH-152531...
Miss Islington (bot) [Sun, 5 Jul 2026 11:15:42 +0000 (13:15 +0200)] 
[3.15] gh-75952: Document negative offsets in tkinter geometry strings (GH-152531) (GH-153101)

Tk geometry strings can contain a negative offset (e.g. 200x100+-9+-8)
when a window edge is positioned beyond the corresponding screen edge.
Note this in the geometry() and winfo_geometry() documentation.
(cherry picked from commit 19b5e8e1f510eb2fdd3f6261006b61f8cf441101)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] Fix various typos in the `http.server` docs (GH-153089) (#153096)
Miss Islington (bot) [Sun, 5 Jul 2026 11:07:29 +0000 (13:07 +0200)] 
[3.15] Fix various typos in the `http.server` docs (GH-153089) (#153096)

(cherry picked from commit 99b4cdbfa1619a3901f8cf87d3b5fe8d4894e3e7)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 weeks ago[3.15] gh-150459: Fix `SyntaxError` message for `from x lazy import y` (GH-150877...
sobolevn [Sun, 5 Jul 2026 10:41:56 +0000 (13:41 +0300)] 
[3.15] gh-150459: Fix `SyntaxError` message for `from x lazy import y` (GH-150877) (#153090)

(cherry picked from commit ec5f154e33f5d62257d041dd28aad1fe785fa3db)

2 weeks ago[3.15] gh-151945: fix Sphinx reference warnings in `http.server` docs (GH-153084...
Miss Islington (bot) [Sun, 5 Jul 2026 09:33:42 +0000 (11:33 +0200)] 
[3.15] gh-151945: fix Sphinx reference warnings in `http.server` docs (GH-153084) (#153085)

gh-151945: fix Sphinx reference warnings in `http.server` docs (GH-153084)
(cherry picked from commit 9f9787d83462f5b44cb59e3c69e7c1799612a33f)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2 weeks ago[3.15] gh-153030: Fix quadratic complexity in incremental parsing in HTMLParser ...
Miss Islington (bot) [Sun, 5 Jul 2026 08:57:20 +0000 (10:57 +0200)] 
[3.15] gh-153030: Fix quadratic complexity in incremental parsing in HTMLParser (GH-153031) (GH-153038)

When an unterminated construct (e.g. a tag or comment) spanned many
feed() calls, rescanning the growing buffer and concatenating new data
onto it were both quadratic.  New data is now accumulated in a list and
only joined and parsed once enough has piled up.
(cherry picked from commit bcf98ddbc40ec9b3ee87da0124a5660b19b7e606)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] gh-66335: Test uppercase IMAP4 command names (GH-152876) (GH-153080)
Miss Islington (bot) [Sun, 5 Jul 2026 08:40:12 +0000 (10:40 +0200)] 
[3.15] gh-66335: Test uppercase IMAP4 command names (GH-152876) (GH-153080)

(cherry picked from commit 3cd6b7406442ad976c6651b9fba6f078971cdf10)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Milan Oberkirch <zvyn@oberkirch.org>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 weeks ago[3.15] Remove PDF images (GH-145977) (#153064)
Miss Islington (bot) [Sun, 5 Jul 2026 08:26:29 +0000 (10:26 +0200)] 
[3.15] Remove PDF images (GH-145977) (#153064)

(cherry picked from commit 5616505b443b13d9f5766dedcf6c0b43167705b6)

Co-authored-by: Stan Ulbrych <stan@python.org>
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2 weeks ago[3.15] gh-151819: Clarify the conditional-pattern email example in re docs (GH-153072...
Miss Islington (bot) [Sun, 5 Jul 2026 08:23:10 +0000 (10:23 +0200)] 
[3.15] gh-151819: Clarify the conditional-pattern email example in re docs (GH-153072) (GH-153073)

The example pattern does not fail to match '<user@host.com' outright --
re.search finds 'user@host.com' in it; it only fails to match the
whole string.  Reword to say so.
(cherry picked from commit fe9c7213e6576e27ebff6ef039706cd463593310)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago[3.15] gh-67512: Document IMAP4.append() flags argument (GH-149907) (GH-153078)
Miss Islington (bot) [Sun, 5 Jul 2026 08:05:51 +0000 (10:05 +0200)] 
[3.15] gh-67512: Document IMAP4.append() flags argument (GH-149907) (GH-153078)

(cherry picked from commit 5f8d9d35753e22946880d4fefb123e8234706266)

Co-authored-by: Savage Mechanic <savagemechanic@github.com>
2 weeks ago[3.15] gh-40038: Quote imaplib command arguments when necessary (GH-152703) (GH-153066)
Serhiy Storchaka [Sun, 5 Jul 2026 06:55:59 +0000 (09:55 +0300)] 
[3.15] gh-40038: Quote imaplib command arguments when necessary (GH-152703) (GH-153066)

Argument quoting was inadvertently disabled when imaplib was ported to
Python 3 (bpo-1210 commented out the ``_checkquote()`` call, bpo-9638
then removed it), so since Python 3.0 commands failed for arguments
containing protocol-sensitive characters, such as a space in a mailbox
name.

Quoting is restored and reimplemented per the RFC 3501 grammar, so that
arguments that need quoting are escaped and quoted, while flags, sequence
sets and list wildcards are left intact.

For backward compatibility, an argument already enclosed in double quotes
is left unchanged, so code that quotes arguments itself keeps working.
(cherry picked from commit 600e86490fddf4732e8b993058ca011cc6387464)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 weeks ago[3.15] Add "new in 3.15" comments to idlelib (GH-153052) (#153054)
Miss Islington (bot) [Sun, 5 Jul 2026 02:28:53 +0000 (04:28 +0200)] 
[3.15] Add "new in 3.15" comments to idlelib (GH-153052) (#153054)

Add "new in 3.15" comments to idlelib (GH-153052)

Lazy keyword added to colorizer and test in PR-GH-142351.
Tested NameError hint expanded in PR-GH-144299.
(cherry picked from commit 0621639e8fc0084af15550651198c9e221b6619d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2 weeks ago[3.15] gh-152718: Reject oversized table counts in the profiling binary reader (GH...
Miss Islington (bot) [Sat, 4 Jul 2026 23:27:41 +0000 (01:27 +0200)] 
[3.15] gh-152718: Reject oversized table counts in the profiling binary reader (GH-152719) (#153050)

gh-152718: Reject oversized table counts in the profiling binary reader (GH-152719)
(cherry picked from commit 8e580b068500feec5d6cc5e5a3e6072e8996fb25)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
2 weeks ago[3.15] gh-151378: Fix unbounded memory growth when recording binary and the thread...
Miss Islington (bot) [Sat, 4 Jul 2026 19:34:15 +0000 (21:34 +0200)] 
[3.15] gh-151378: Fix unbounded memory growth when recording binary and the thread is sleeping (GH-152089) (#153047)

gh-151378: Fix unbounded memory growth when recording binary and the thread is sleeping (GH-152089)
(cherry picked from commit 639a5525fb1b54973dcf55a636efc10be4042239)

Co-authored-by: Maurycy Pawłowski-Wieroński <maurycy@maurycy.com>