]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 weeks ago[3.15] gh-144067: Document terminal leak when initscr() follows setupterm() (GH-15262...
Serhiy Storchaka [Thu, 2 Jul 2026 15:01:41 +0000 (18:01 +0300)] 
[3.15] gh-144067: Document terminal leak when initscr() follows setupterm() (GH-152624) (GH-152894)

(cherry picked from commit e471712958515b65b737ac742b294acf7de9220c)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-98894: Check readelf failures in test_dtrace (GH-152345) (#152891)
Miss Islington (bot) [Thu, 2 Jul 2026 14:58:12 +0000 (16:58 +0200)] 
[3.15] gh-98894: Check readelf failures in test_dtrace (GH-152345) (#152891)

gh-98894: Check readelf failures in test_dtrace (GH-152345)

Report readelf command failures directly instead of later failing with
missing-probe assertions.
(cherry picked from commit d60a6779e8dd5fbf1f2f84b34bb5a20f3e8cd7fd)

Co-authored-by: stratakis <cstratak@redhat.com>
3 weeks ago[3.15] gh-152680: Detect virtualization on Windows in pythoninfo (GH-152824) (#152890)
Miss Islington (bot) [Thu, 2 Jul 2026 13:27:35 +0000 (15:27 +0200)] 
[3.15] gh-152680: Detect virtualization on Windows in pythoninfo (GH-152824) (#152890)

gh-152680: Detect virtualization on Windows in pythoninfo (GH-152824)

Use WMI to detect virtualization on Windows.

Replace wmic command with _wmi module to get the operating system caption and
version.

The wmic tool is deprecated since January 2024:
https://techcommunity.microsoft.com/blog/windows-itpro-blog/wmi-command-line-wmic-utility-deprecation-next-steps/4039242

For example, it's no longer installed in Windows images on GitHub
Action.

Fix also run_command(): no longer try to spawn a subprocess if the
platform doesn't support subprocess. It avoids logging run_command()
errors.
(cherry picked from commit 4e4869b62fa91e26117b1d9136f60b58c9f505a5)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks ago[3.15] gh-88574: Skip a spurious blank line after a literal in imaplib (GH-152751...
Miss Islington (bot) [Thu, 2 Jul 2026 13:25:34 +0000 (15:25 +0200)] 
[3.15] gh-88574: Skip a spurious blank line after a literal in imaplib (GH-152751) (GH-152884)

Some IMAP servers send an extra blank line after the data of a literal.
imaplib mistook it for the response trailer and failed on the next
command.  Such a blank line is now skipped.
(cherry picked from commit 53ff1a28ccfa69925c3c452cfc003970640fa65b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks ago[3.15] gh-150069: Test frozen dataclass and properties interaction (GH-150070) (...
Miss Islington (bot) [Thu, 2 Jul 2026 13:20:55 +0000 (15:20 +0200)] 
[3.15] gh-150069: Test frozen dataclass and properties interaction (GH-150070) (#152882)

gh-150069: Test frozen dataclass and properties interaction (GH-150070)
(cherry picked from commit 753f82db2fed38bf725ded2b333ea3749c81fe82)

Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks ago[3.15] gh-49680: Test imaplib.IMAP4.append line-ending normalization (GH-152877)
Serhiy Storchaka [Thu, 2 Jul 2026 11:57:58 +0000 (14:57 +0300)] 
[3.15] gh-49680: Test imaplib.IMAP4.append line-ending normalization (GH-152877)

gh-49680: Test imaplib.IMAP4.append line-ending normalization

(cherry picked from commit ddb6539c4976b18895bb5c5cd37d197c60fb459d)

Co-authored-by: harjoth <harjoth.khara@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks ago[3.15] gh-66335: Add tests for imaplib command methods (GH-152872) (GH-152873)
Miss Islington (bot) [Thu, 2 Jul 2026 10:40:07 +0000 (12:40 +0200)] 
[3.15] gh-66335: Add tests for imaplib command methods (GH-152872) (GH-152873)

Add coverage tests for the IMAP4 command methods and their UID variants
(SELECT, CREATE, COPY, STORE, FETCH, SEARCH, SORT, THREAD, DELETE,
RENAME, SUBSCRIBE, UNSUBSCRIBE, LIST, STATUS, the ACL and quota
commands, ANNOTATION, PROXYAUTH and ENABLE), plus test helpers
(splitargs, parse_sequence_set, make_simple_handler) and per-command
argument capture in the test server.
(cherry picked from commit a50b089b7c46e3068d9177b5f18ac767a31a18cd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks ago[3.15] gh-151763: Fix OOM-0013 crash when the parser or compiler fails to allocate...
Miss Islington (bot) [Thu, 2 Jul 2026 08:23:23 +0000 (10:23 +0200)] 
[3.15] gh-151763: Fix OOM-0013 crash when the parser or compiler fails to allocate (GH-151968) (#152836)

3 weeks ago[3.15] gh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived future...
Miss Islington (bot) [Thu, 2 Jul 2026 08:20:14 +0000 (10:20 +0200)] 
[3.15] gh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures (GH-152585) (#152868)

gh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures (GH-152585)
(cherry picked from commit f8514dccaca4acb84ba02188c3e433a9d6989c13)

Co-authored-by: Simon Knott <info@simonknott.de>
3 weeks ago[3.15] gh-144473: Add "steal" term to glossary; clarify "stealing" on error (GH-14450...
Miss Islington (bot) [Thu, 2 Jul 2026 08:07:57 +0000 (10:07 +0200)] 
[3.15] gh-144473: Add "steal" term to glossary; clarify "stealing" on error (GH-144502) (GH-152771)

With one exception, all "stealing" functions also steal on error,
but it makes sense to note this in each case.
(cherry picked from commit 34503f39532279efb12653754bb3a7e535fb66cc)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
3 weeks ago[3.15] gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768...
Miss Islington (bot) [Thu, 2 Jul 2026 07:46:30 +0000 (09:46 +0200)] 
[3.15] gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768) (GH-152856)

Connecting to a server that does not send a valid IMAP4 greeting, such as
a POP3 server answering on the IMAP port, failed with the unhelpful
"imaplib.IMAP4.error: None".  A meaningful message is now raised instead.
(cherry picked from commit 262b6a0df5a325e788928ab0cd514fa4786571b4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks ago[3.15] gh-63121: Refresh imaplib capabilities on state changes (GH-152752) (GH-152854)
Miss Islington (bot) [Thu, 2 Jul 2026 07:40:43 +0000 (09:40 +0200)] 
[3.15] gh-63121: Refresh imaplib capabilities on state changes (GH-152752) (GH-152854)

imaplib fetched the server capabilities only once, at connection time.
They are now also refreshed after a successful LOGIN or AUTHENTICATE,
from the CAPABILITY response the server sent or, if it sent none, by
querying it.  This lets methods such as enable() see capabilities added
after login, for example ENABLE on Gmail (gh-103451).

Capabilities advertised in the server greeting are now used too, saving
a redundant CAPABILITY command.
(cherry picked from commit c89b72abed7393d9d428f1e336e3aa02e7ef6ce8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks ago[3.15] gh-72507: Document that imaplib does not verify TLS certificates by default...
Miss Islington (bot) [Thu, 2 Jul 2026 07:28:02 +0000 (09:28 +0200)] 
[3.15] gh-72507: Document that imaplib does not verify TLS certificates by default (GH-152778) (GH-152862)

IMAP4_SSL() and IMAP4.starttls() do not verify the server certificate or
hostname unless a suitable ssl_context is passed.
(cherry picked from commit f3bf8abb8c0f4cb20bed3dc7d98eca4a2d668709)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks ago[3.15] gh-79964: Clarify the imaplib fetch example in the docs (GH-152780) (GH-152859)
Miss Islington (bot) [Thu, 2 Jul 2026 07:26:50 +0000 (09:26 +0200)] 
[3.15] gh-79964: Clarify the imaplib fetch example in the docs (GH-152780) (GH-152859)

A FETCH response may contain additional or unsolicited data, so the
message is not always data[0][1].
(cherry picked from commit 50ae0be74988564fb09746a49eb4b8f8e740f3c3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 weeks ago[3.15] gh-135142: update idlelib News3.txt for 9 issues (GH-152839) (#152842)
Miss Islington (bot) [Thu, 2 Jul 2026 03:20:31 +0000 (05:20 +0200)] 
[3.15] gh-135142: update idlelib News3.txt for 9 issues (GH-152839) (#152842)

gh-135142: update idlelib News3.txt for 9 issues (GH-152839)

13 posted 2026 June 30 for various issues.
Edited one other by me.
(cherry picked from commit 384abb71445a5a37dfb4dbc5e3020ea6c0c307f7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 weeks ago[3.15] gh-82183: Do not restart the busy IDLE shell when running without restart...
Miss Islington (bot) [Wed, 1 Jul 2026 23:30:08 +0000 (01:30 +0200)] 
[3.15] gh-82183: Do not restart the busy IDLE shell when running without restart (GH-152745) (#152832)

gh-82183: Do not restart the busy IDLE shell when running without restart (GH-152745)

"Run... Customized" with "Restart shell" unchecked restarted the shell
anyway when it was busy executing code, killing any pending input.  It now
reports that the shell is executing just once, not twice, and does not run.
(cherry picked from commit be449b1c6ad739a40a7da35a81317bb49f1f54ff)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.15] gh-75595: Do not save a blank int entry in IDLE Settings (GH-152743) (#152827)
Miss Islington (bot) [Wed, 1 Jul 2026 22:27:52 +0000 (00:27 +0200)] 
[3.15] gh-75595: Do not save a blank int entry in IDLE Settings (GH-152743) (#152827)

gh-75595: Do not save a blank int entry in IDLE Settings (GH-152743)

gh-83653: Do not save a blank int entry in IDLE Settings

Blanking an integer entry wrote an empty string to the config file, which
caused an "invalid int value" warning when it was read back.
(cherry picked from commit 3428762f33c6c064998f5b0c385cdfd0f0c2e198)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
3 weeks ago[3.15] gh-65339: Save IDLE Shell and Output windows as text by default (GH-152742...
Miss Islington (bot) [Wed, 1 Jul 2026 21:03:58 +0000 (23:03 +0200)] 
[3.15] gh-65339: Save IDLE Shell and Output windows as text by default (GH-152742) (#152821)

gh-65339: Save IDLE Shell and Output windows as text by default (GH-152742)

Their content is not Python source, so the Save As dialog now lists text
files first and defaults to a ".txt" extension.
(cherry picked from commit efcfb1a4e0f4d0d0e33aefccd8373e116e98e3de)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.15] gh-151040: Fix `test_c_stack_unwind` on RISC-V (GH-152370) (#152819)
Stan Ulbrych [Wed, 1 Jul 2026 19:20:27 +0000 (21:20 +0200)] 
[3.15] gh-151040: Fix `test_c_stack_unwind` on RISC-V (GH-152370) (#152819)

(cherry picked from commit 1b0c05f14807a43d070127b3d8eac1af8de27f28)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
3 weeks ago[3.15] gh-80504: Always show the full search path in IDLE Find in Files (GH-152740...
Miss Islington (bot) [Wed, 1 Jul 2026 17:35:41 +0000 (19:35 +0200)] 
[3.15] gh-80504: Always show the full search path in IDLE Find in Files (GH-152740) (#152810)

gh-80504: Always show the full search path in IDLE Find in Files (GH-152740)

The "In files:" field of the Find in Files dialog now always contains a
full directory path, so the grep output shows which directory was searched.
(cherry picked from commit f21f338f1f88352d50362271a7f38c01745a65da)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.15] gh-134300: Remove idlelib from the path of the IDLE user process (GH-152739...
Miss Islington (bot) [Wed, 1 Jul 2026 17:03:14 +0000 (19:03 +0200)] 
[3.15] gh-134300: Remove idlelib from the path of the IDLE user process (GH-152739) (#152807)

gh-134300: Remove idlelib from the path of the IDLE user process (GH-152739)

The idlelib directory ends up on sys.path when idle.py is run as a script,
and it was passed to the user process, where it let user code import
idlelib submodules as top-level modules, such as "import help".
(cherry picked from commit 3f5491a09223f7371b4b4c92225e8dfdf1c989b7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.15] gh-89360: Fix ValueError in IDLE MultiCall event_delete (GH-152738) (#152802)
Miss Islington (bot) [Wed, 1 Jul 2026 16:49:12 +0000 (18:49 +0200)] 
[3.15] gh-89360: Fix ValueError in IDLE MultiCall event_delete (GH-152738) (#152802)

gh-89360: Fix ValueError in IDLE MultiCall event_delete (GH-152738)

Deleting a key binding for a sequence not bound to the virtual event no
longer raises a ValueError; the discrepancy is now ignored.
(cherry picked from commit ea7619faeacf310ba1b2ef41ad07966ce2aae11f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.15] gh-71956: Fix IDLE Replace All searching up without wrap around (GH-152737...
Miss Islington (bot) [Wed, 1 Jul 2026 16:22:25 +0000 (18:22 +0200)] 
[3.15] gh-71956: Fix IDLE Replace All searching up without wrap around (GH-152737) (#152799)

gh-71956: Fix IDLE Replace All searching up without wrap around (GH-152737)

When the search direction is "Up" and "Wrap around" is off, Replace All
replaced only the first match above the current position (and all matches
below it).  It now replaces all matches from the start of the text down to
the current position, consistently with the "Up" direction.
(cherry picked from commit ef27e5b310feebb6068f9e798eee7069e1966fc9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.15] Fix copy paste error with Py_mod_state_traverse (GH-152776) (#152777)
Miss Islington (bot) [Wed, 1 Jul 2026 16:05:39 +0000 (18:05 +0200)] 
[3.15] Fix copy paste error with Py_mod_state_traverse (GH-152776) (#152777)

(cherry picked from commit b52bc564513d720fb0c6470871c1f5c24c7ce1d8)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: hydrogen-mvm <hydrogen-mvm@users.noreply.github.com>
3 weeks ago[3.15] gh-66331: Set correct WM_CLASS on X11 for IDLE windows (GH-152733) (#152794)
Miss Islington (bot) [Wed, 1 Jul 2026 15:44:06 +0000 (17:44 +0200)] 
[3.15] gh-66331: Set correct WM_CLASS on X11 for IDLE windows (GH-152733) (#152794)

gh-66331: Set correct WM_CLASS on X11 for IDLE windows (GH-152733)

Set the WM_CLASS of IDLE's long-lived windows (window-list windows and
the stack viewers) to "Idle" instead of the default "Toplevel", so that
window managers group and label them correctly.
(cherry picked from commit 4e16b8d4eef162082c3d409f171802ceccb36521)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 weeks ago[3.15] gh-152157: Reject empty fractions in `_datetime.{date}time.fromisoformat`...
Miss Islington (bot) [Wed, 1 Jul 2026 10:23:08 +0000 (12:23 +0200)] 
[3.15] gh-152157: Reject empty fractions in `_datetime.{date}time.fromisoformat` (GH-152161) (#152761)

(cherry picked from commit 112c69a0514902af2d2f7d0503de6690ca59a10f)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.15] gh-152728: IDLE - move 3 toplevel fix_xyz functions to idlelb.util (GH-152729...
Miss Islington (bot) [Wed, 1 Jul 2026 06:08:44 +0000 (08:08 +0200)] 
[3.15] gh-152728: IDLE - move 3 toplevel fix_xyz functions to idlelb.util (GH-152729) (#152730)

gh-152728: IDLE - move 3 toplevel fix_xyz functions to idlelb.util (GH-152729)

IDLE - move 3 toplevel fix_xyz functions to idlelb.util

Move idlelib functions run.fix_scaling, editor.fixwordbreaks
(as fix_word_breaks).  All are used in at least 3 modules.
(cherry picked from commit 53ca52ddb0c2725a1c34e4eb2245339cd3dcaa84)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 weeks ago[3.15] gh-151626: Fix tests that fail when PYTHONPYCACHEPREFIX is set (GH-151952...
Miss Islington (bot) [Wed, 1 Jul 2026 05:57:17 +0000 (07:57 +0200)] 
[3.15] gh-151626: Fix tests that fail when PYTHONPYCACHEPREFIX is set (GH-151952) (#152736)

gh-151626: Fix tests that fail when PYTHONPYCACHEPREFIX is set (GH-151952)

Fix tests in test_compileall, test_import, test_importlib, test_py_compile, and test_inspect to neutralize PYTHONPYCACHEPREFIX
(cherry picked from commit 564c58c718bc3de9cf3d9bc20cdc06317411c1cd)

Co-authored-by: Jiucheng(Oliver) <git.jiucheng@gmail.com>
3 weeks ago[3.15] gh-152715: Add pythoninfo-build command to Platforms/Apple (GH-152716) (#152723)
Miss Islington (bot) [Wed, 1 Jul 2026 03:29:44 +0000 (05:29 +0200)] 
[3.15] gh-152715: Add pythoninfo-build command to Platforms/Apple (GH-152716) (#152723)

Add a pythoninfo-build command to Platforms/Apple to display build
info of the build Python. The command runs "make pythoninfo".

The "ci" and "build" commands now also run "pythoninfo-build".
(cherry picked from commit 746c535a8e4cbf32af3d3ceba204c01d91614217)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks ago[3.15] gh-152711: Add pythoninfo-build command to Platforms/Android (GH-152713) ...
Miss Islington (bot) [Wed, 1 Jul 2026 03:29:26 +0000 (05:29 +0200)] 
[3.15] gh-152711: Add pythoninfo-build command to Platforms/Android (GH-152713) (#152725)

Add a pythoninfo-build command to Platforms/Android to display build
info of the build Python. The command runs "make pythoninfo".

ci and build commands now also run pythoninfo-build
(cherry picked from commit fdcee4f5bd8d0dd852518ec9f092ac35ce9fd5d8)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks ago[3.15] gh-152502: Detect the curses mouse interface portably (GH-152705) (GH-152707)
Serhiy Storchaka [Tue, 30 Jun 2026 20:59:28 +0000 (23:59 +0300)] 
[3.15] gh-152502: Detect the curses mouse interface portably (GH-152705) (GH-152707)

The mouse interface (getmouse(), the BUTTON* constants, ...) was gated on the
ncurses-specific NCURSES_MOUSE_VERSION macro, so it was dropped on other curses
implementations that provide it, such as NetBSD curses and PDCurses.

Gate it instead on a configure capability probe or the PDCURSES macro.  Probe
for getmouse() with its X/Open getmouse(MEVENT *) signature, since PDCurses
declares an incompatible getmouse(void) unless built for the ncurses mouse API,
which PDC_NCMOUSE now always selects.

(cherry picked from commit 7bbea4f4868ef89b07b986d7a0d4b585e8271f27)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-152680: Detect container/VM in test.pythoninfo (GH-152668) (#152699)
Miss Islington (bot) [Tue, 30 Jun 2026 15:47:12 +0000 (17:47 +0200)] 
[3.15] gh-152680: Detect container/VM in test.pythoninfo (GH-152668) (#152699)

gh-152680: Detect container/VM in test.pythoninfo (GH-152668)

On Apple, log the hardware model as "system.hardware".

* Log the "CI", "IMAGE_OS_VERSION" and "container"
  environment variables.
* Add run_command() and first_line() functions.
(cherry picked from commit f1c536372199cfb9c2e7b360b7bf04208c9eee82)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks ago[3.15] gh-151126: Fix a possible crash during the startup with no memory under `Py_ST...
Miss Islington (bot) [Tue, 30 Jun 2026 11:56:43 +0000 (13:56 +0200)] 
[3.15] gh-151126: Fix a possible crash during the startup with no memory under `Py_STACKREF_DEBUG` (GH-152478) (#152677)

gh-151126: Fix a possible crash during the startup with no memory under `Py_STACKREF_DEBUG` (GH-152478)
(cherry picked from commit ecdef1773006529b0fea6639d0effeecbb41679c)

Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks ago[3.15] gh-151029: Fix `test_remote_exec_deleted_static_executable` on static installe...
Miss Islington (bot) [Tue, 30 Jun 2026 11:25:27 +0000 (13:25 +0200)] 
[3.15] gh-151029: Fix `test_remote_exec_deleted_static_executable` on static installed builds (GH-152653) (#152670)

(cherry picked from commit 03efeef226b774f937056e95e0cdb8f7d37c6532)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.15] gh-152635: Raise MemoryError when the lock allocation fails in `_interpchannel...
Miss Islington (bot) [Tue, 30 Jun 2026 11:24:17 +0000 (13:24 +0200)] 
[3.15] gh-152635: Raise MemoryError when the lock allocation fails in `_interpchannels.create()` (GH-152642) (#152671)

gh-152635: Raise MemoryError when the lock allocation fails in `_interpchannels.create()` (GH-152642)

Previously, an allocation failure when creating
the lock for a channel in `_interpchannels` would trigger an assert.
Caused by `handle_channel_error` being passed an error code of -1
which is only allowed if an exception has been set.
(in this case, no exception was set)

`channelsmod_create` now forwards the error code from `channel_create`
which `handle_channel_error` already handled.
(cherry picked from commit b383aa6e1a8ea53fdeed88c71fbc34d8b2d1fde9)

Co-authored-by: Steve Stagg <stestagg@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks ago[3.15] Don't require the `_test{internal}capi` modules in `test_monitoring.py` (GH...
Miss Islington (bot) [Tue, 30 Jun 2026 10:16:15 +0000 (12:16 +0200)] 
[3.15] Don't require the `_test{internal}capi` modules in `test_monitoring.py` (GH-152311) (#152660)

(cherry picked from commit 189ab8388762c8102b2d72ad3a1a921f7f2aef10)

Co-authored-by: Shahar Naveh <50263213+ShaharNaveh@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.15] gh-50966: Fix unbounded recursion in turtle drag handlers (GH-152626) (GH...
Miss Islington (bot) [Tue, 30 Jun 2026 10:14:56 +0000 (12:14 +0200)] 
[3.15] gh-50966: Fix unbounded recursion in turtle drag handlers (GH-152626) (GH-152657)

TurtleScreenBase._update() redraws with cv.update(), which also reprocesses
input events, so a handler that moves the turtle (such as
screen.ondrag(turtle.goto)) reenters _update() for every queued event until
the interpreter crashes.  A reentrant _update() now only flushes drawing with
update_idletasks().
(cherry picked from commit 6f103fab178c07cbb5f701b8ad97e275b6eb6c4c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-133510: Add links to more info for the match statement in FAQ anwser (GH...
Miss Islington (bot) [Tue, 30 Jun 2026 09:16:59 +0000 (11:16 +0200)] 
[3.15] gh-133510: Add links to more info for the match statement in FAQ anwser (GH-133511) (#152656)

(cherry picked from commit 77181570da2d6d8f7bfca39f438ef0a893a30567)

Co-authored-by: xzkdeng <xzkdeng@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.15] gh-152248: Reject a POSIX TZ abbreviation with non-ASCII-letters in pure-Pytho...
Miss Islington (bot) [Tue, 30 Jun 2026 08:57:58 +0000 (10:57 +0200)] 
[3.15] gh-152248: Reject a POSIX TZ abbreviation with non-ASCII-letters in pure-Python `zoneinfo` (GH-152249) (#152650)

(cherry picked from commit 449122ed0dbdb6a545af4927c59f4c80ee15c515)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.15] gh-149689: add missing error checks in Parser/action_helpers.c (GH-149710...
Miss Islington (bot) [Tue, 30 Jun 2026 08:11:09 +0000 (10:11 +0200)] 
[3.15] gh-149689: add missing error checks in Parser/action_helpers.c (GH-149710) (#152640)

3 weeks ago[3.15] Use tkinter wrapper methods instead of raw Tcl calls in turtle and IDLE (GH...
Miss Islington (bot) [Tue, 30 Jun 2026 06:34:26 +0000 (08:34 +0200)] 
[3.15] Use tkinter wrapper methods instead of raw Tcl calls in turtle and IDLE (GH-152414) (GH-152648)

Use tkinter wrapper methods instead of raw Tcl calls in turtle and IDLE (GH-152414)

* turtle: wm_attributes(topmost=...);
* idlelib.macosx: winfo_server();
* idlelib tests: after_info().
(cherry picked from commit fc866dc84ec430ab22d60609520f7ab27267baef)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-146219: Document reusing a thread state across repeated foreign-thread...
Miss Islington (bot) [Tue, 30 Jun 2026 00:12:59 +0000 (02:12 +0200)] 
[3.15] gh-146219: Document reusing a thread state across repeated foreign-thread calls (GH-146221) (#152644)

gh-146219: Document reusing a thread state across repeated foreign-thread calls (GH-146221)

* Document reusing a thread state across repeated foreign-thread calls

Add a subsection under "Non-Python created threads" explaining the
performance cost of creating/destroying a PyThreadState on every
Ensure/Release cycle and showing how to keep one alive for the
thread's lifetime instead.

* add a comma

---------
(cherry picked from commit 5717518fb3ed6f34716683e08ec372267d871d21)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
3 weeks ago[3.15] gh-152492 Allow `OrderedDict.update` to work with `frozendict` (GH-152494...
Miss Islington (bot) [Mon, 29 Jun 2026 20:20:08 +0000 (22:20 +0200)] 
[3.15] gh-152492 Allow `OrderedDict.update` to work with `frozendict` (GH-152494) (#152630)

gh-152492 Allow `OrderedDict.update` to work with `frozendict` (GH-152494)
(cherry picked from commit 0a29d8408cfdd9a66f2b65745a3ae1cda022775c)

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>
Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks ago[3.15] gh-103878: Document that the cancelled file dialog value is only falsy (GH...
Miss Islington (bot) [Mon, 29 Jun 2026 20:03:01 +0000 (22:03 +0200)] 
[3.15] gh-103878: Document that the cancelled file dialog value is only falsy (GH-152429) (GH-152629)

Its exact type (empty string, tuple, list or None) varies between
platforms and Tk versions, so advise testing the result for truth.
(cherry picked from commit 9dd3340a623093b5d0ff054d5d42c370bb09221c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-151987: Pass `filter_function` to `TarFile._extract_one()` during `.extract...
Miss Islington (bot) [Mon, 29 Jun 2026 19:10:59 +0000 (21:10 +0200)] 
[3.15] gh-151987: Pass `filter_function` to `TarFile._extract_one()` during `.extract()` (GH-151988) (#152608)

(cherry picked from commit 7ccdbaba2c54250a70d7f25632152df7655a5e0a)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Seth Michael Larson <seth@python.org>
3 weeks ago[3.15] gh-152228: Fix an assertion failure in `str.replace` under a limited memory...
Miss Islington (bot) [Mon, 29 Jun 2026 16:52:04 +0000 (18:52 +0200)] 
[3.15] gh-152228: Fix an assertion failure in `str.replace` under a limited memory case (GH-152229) (#152615)

gh-152228: Fix an assertion failure in `str.replace` under a limited memory case (GH-152229)
(cherry picked from commit c5043dce1c6743682d93c71e937b95e7d27e0b35)

Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks ago[3.15] gh-69134: Wait until mapped in keyboard virtual-event tests (GH-152599) (GH...
Miss Islington (bot) [Mon, 29 Jun 2026 16:00:20 +0000 (18:00 +0200)] 
[3.15] gh-69134: Wait until mapped in keyboard virtual-event tests (GH-152599) (GH-152605)

test_virtual_events and test_selection_event generate key events after
focus_force().  On Windows these are only delivered once the toplevel is
mapped, so they could be dropped and the test fail.  Wait until the
widget is mapped, as the other GUI tests already do.
(cherry picked from commit be4eebb8386d07f360dd835a0ecb4a1eb6385736)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499...
Miss Islington (bot) [Mon, 29 Jun 2026 14:23:06 +0000 (16:23 +0200)] 
[3.15] gh-69134: Harden tkinter GUI tests that depend on a mapped widget (GH-152499) (GH-152516)

Add wait_until_mapped() and AbstractTkTest.require_mapped() to
test_tkinter.support and use them to guard the assertions that need a
widget to be actually mapped (winfo_width(), identify(), coords(), ...).
This avoids intermittent failures under window managers that do not map
the widget promptly, without skipping the unrelated checks.
(cherry picked from commit 0fff6bd86cf0224152c509e295d3cbbd209098f3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-152502: Detect optional curses functions with configure probes (GH-152504...
Serhiy Storchaka [Mon, 29 Jun 2026 14:20:14 +0000 (17:20 +0300)] 
[3.15] gh-152502: Detect optional curses functions with configure probes (GH-152504) (GH-152589)

set_escdelay(), set_tabsize() and the ESCDELAY and TABSIZE variables were
gated only by the ncurses-specific NCURSES_EXT_FUNCS macro, which excluded
them when building against other curses implementations such as NetBSD curses
even when they provided them.  Detect each with a configure capability probe
and gate on HAVE_CURSES_*.
(cherry picked from commit 0635e55b47e306aa6cc0610105775849b0699e2c)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-152587: Stop documenting bogus default values in tkinter variable methods...
Miss Islington (bot) [Mon, 29 Jun 2026 14:09:17 +0000 (16:09 +0200)] 
[3.15] gh-152587: Stop documenting bogus default values in tkinter variable methods (GH-152594) (GH-152596)

The name parameter of Misc.wait_variable(), setvar() and getvar() and the
value parameter of setvar() should not be optional.  Their default values
('PY_VAR' and '1') are not meaningful and should not be advertised.
(cherry picked from commit e134a1aa36027fb3c8bd9493028072365b19479b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-151096: Fix test_embed with split exec prefix (GH-151288) (#152590)
Miss Islington (bot) [Mon, 29 Jun 2026 13:56:05 +0000 (15:56 +0200)] 
[3.15] gh-151096: Fix test_embed with split exec prefix (GH-151288) (#152590)

gh-151096: Fix test_embed with split exec prefix (GH-151288)
(cherry picked from commit b19839b40c771904b87ea35127f9fa1b8058597e)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
3 weeks ago[3.15] gh-133031: Support non-ASCII characters in curses.textpad.Textbox (GH-152451...
Miss Islington (bot) [Mon, 29 Jun 2026 11:40:49 +0000 (13:40 +0200)] 
[3.15] gh-133031: Support non-ASCII characters in curses.textpad.Textbox (GH-152451) (GH-152467)

Textbox mangled non-ASCII characters of an 8-bit locale encoding: it masked
reads with curses.ascii.ascii(), which clears the 8th bit, and tested input
with curses.ascii.isprint(), which rejects bytes above 127.

Decode cells and input bytes with the window's encoding instead.  Cells are
read with instr() and the lower-right cell is written as text, since inch() and
insch() with an int byte mishandle a non-ASCII character on a wide build.  This
uses only the byte-oriented curses API, so it works without wide-character
support.
(cherry picked from commit c253f0c14b046cf79881d0602620a3b2a15c2316)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-152359: Update numbers.rst to reference numeric-hash docs (GH-152549) ...
Miss Islington (bot) [Mon, 29 Jun 2026 10:04:51 +0000 (12:04 +0200)] 
[3.15] gh-152359: Update numbers.rst to reference numeric-hash docs (GH-152549) (#152579)

gh-152359: Update numbers.rst to reference numeric-hash docs (GH-152549)
(cherry picked from commit 8ec36f14a552136d54072e3e5bb595ec1f4f0b5f)

Co-authored-by: Paper Moon <tangyuan0821@email.cn>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
3 weeks ago[3.15] gh-71450: Document that Tcl sets the HOME variable on Windows (GH-152568)...
Miss Islington (bot) [Mon, 29 Jun 2026 10:04:11 +0000 (12:04 +0200)] 
[3.15] gh-71450: Document that Tcl sets the HOME variable on Windows (GH-152568) (GH-152574)

Also fix the ntpath.expanduser() docstring, which no longer uses $HOME.
(cherry picked from commit 1540584d5d0b6483b78256194825e76d2e52ad21)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-152375: Fix undefined behaviour in the `INSTRUMENTED_JUMP` macro (GH-152376...
Miss Islington (bot) [Mon, 29 Jun 2026 09:54:27 +0000 (11:54 +0200)] 
[3.15] gh-152375: Fix undefined behaviour in the `INSTRUMENTED_JUMP` macro (GH-152376) (#152566)

(cherry picked from commit cdec9acd63c33d9b822700de8f63eb94d86e1c93)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.15] gh-148909: Fix broken author attribution URL in 'The Python 2.3 Method Resolut...
Miss Islington (bot) [Mon, 29 Jun 2026 09:35:46 +0000 (11:35 +0200)] 
[3.15] gh-148909: Fix broken author attribution URL in 'The Python 2.3 Method Resolution Order' doc (GH-149092) (#152571)

(cherry picked from commit 7aae0e58b7c02cefd3e13b0d1b65b4ef5cb2b57e)

Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com>
3 weeks ago[3.15] GH-151672: `__lazy_import__` always resolves to the module being imported...
Miss Islington (bot) [Mon, 29 Jun 2026 09:23:25 +0000 (11:23 +0200)] 
[3.15] GH-151672: `__lazy_import__` always resolves to the module being imported (GH-151827) (#152534)

GH-151672: `__lazy_import__` always resolves to the module being imported (GH-151827)
(cherry picked from commit 2d0003c0b28dca86197f4b74810966856a27dc60)

Co-authored-by: Brandt Bucher <brandt@python.org>
3 weeks ago[3.15] gh-140146: Fix for stdin redirection to a pipe with interactive tkinter on...
Miss Islington (bot) [Mon, 29 Jun 2026 09:13:05 +0000 (11:13 +0200)] 
[3.15] gh-140146: Fix for stdin redirection to a pipe with interactive tkinter on Windows (GH-148819) (GH-152560)

(cherry picked from commit 6d209cbb93d0871ad4a5883637a8f0aebc053f76)

Co-authored-by: mdehoon <mjldehoon@yahoo.com>
3 weeks ago[3.15] gh-85320: Use UTF-8 for IDLE configuration and breakpoint files (GH-152475...
Miss Islington (bot) [Mon, 29 Jun 2026 08:44:24 +0000 (10:44 +0200)] 
[3.15] gh-85320: Use UTF-8 for IDLE configuration and breakpoint files (GH-152475) (GH-152555)

They were read and written using the locale encoding, which could corrupt
non-ASCII paths and made them non-portable.
(cherry picked from commit f6e904e1a666cb1e5664750b1c3d8f89cba3a769)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-110357: hashlib no longer logs at import when a guaranteed hash is unavaila...
Miss Islington (bot) [Mon, 29 Jun 2026 08:39:32 +0000 (10:39 +0200)] 
[3.15] gh-110357: hashlib no longer logs at import when a guaranteed hash is unavailable (GH-152538) (#152554)

gh-110357: hashlib no longer logs at import when a guaranteed hash is unavailable (GH-152538)

When a normally-guaranteed hash algorithm cannot be constructed at import time
(e.g. an OpenSSL FIPS configuration excludes it from the default provider, or
the build used --without-builtin-hashlib-hashes), importing hashlib emitted an
"ERROR:root:hash algorithm ... will not be supported at runtime" message to
stderr.  For the many programs that never use the missing algorithm this is
pure noise.  Worse, logging.error() lazily calls logging.basicConfig(), which
mutates the root logger's handlers -- a global side effect that the test suite
flags as an altered execution environment.

Stop logging in that path.  Code that actually uses a missing algorithm still
gets a clear ValueError from the stub constructor installed in its place.

The stray output has shown up incidentally in FIPS / "No Builtin Hashes"
buildbot reports for years (e.g. gh-110357, gh-76902) without being the
reported subject.
(cherry picked from commit 8ae1a236fd334a590e90028f615cd4a822ae6f97)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
3 weeks ago[3.15] gh-87577: Document that wm_manage does not accept ttk widgets (GH-152532)...
Miss Islington (bot) [Mon, 29 Jun 2026 06:38:47 +0000 (08:38 +0200)] 
[3.15] gh-87577: Document that wm_manage does not accept ttk widgets (GH-152532) (GH-152543)

wm_manage() works only with the classic tkinter Frame, LabelFrame and
Toplevel widgets, not their tkinter.ttk counterparts.
(cherry picked from commit 2670cb062c9ec31cd6df7be645f929a8398601c7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-148660: Fix use-after-free in OrderedDict.copy() on reentrant mutation...
Miss Islington (bot) [Mon, 29 Jun 2026 02:34:20 +0000 (04:34 +0200)] 
[3.15] gh-148660: Fix use-after-free in OrderedDict.copy() on reentrant mutation (GH-151573) (#152540)

gh-148660: Fix use-after-free in OrderedDict.copy() on reentrant mutation (GH-151573)

* gh-148660: Fix use-after-free in OrderedDict.copy() on reentrant mutation

OrderedDict.copy() walks the internal linked list while building the new
dict. The loop body can run arbitrary Python (a key's __eq__/__hash__, or
a subclass __getitem__/__setitem__) which can clear the source dict and
free the nodes being iterated.

Detect this the same way OrderedDict.__eq__ already does (gh-119004):
snapshot od_state before the loop, hold a strong reference to the key and
read the hash before any reentrant call, and raise RuntimeError if the
state changed before advancing to the next node.

* gh-148660: fix NEWS nit, suppress undocumented OrderedDict.copy xref
(cherry picked from commit 7d128e319f3730e776a9161a4b5e9de95c802eaf)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
3 weeks ago[3.15] gh-151416: fix a borrowed ref potential use after free via fspath in os.spawnv...
Miss Islington (bot) [Mon, 29 Jun 2026 00:56:40 +0000 (02:56 +0200)] 
[3.15] gh-151416: fix a borrowed ref potential use after free via fspath in os.spawnv/spawnve (GH-151417) (#152535)

gh-151416: fix a borrowed ref potential use after free via fspath in os.spawnv/spawnve (GH-151417)

* gh-151416: Fix use-after-free in os.spawnv/spawnve when __fspath__ mutates argv

The argv conversion loops passed references borrowed from the argv list
into fsconvert_strdup().  An item's __fspath__() can mutate the list and
release its reference to the item, leaving the converter operating on a
freed object.  A shrunk list could also make PyList_GetItem() return
NULL, which PyUnicode_FS{Converter,Decoder}() treat as a request to
release an uninitialized output variable.

Hold a strong reference to each item across the conversion, matching
parse_arglist() and parse_envlist().

* gh-151416: Don't mask non-TypeError argv conversion errors in os.spawnv

os.spawnv() replaced any error raised during argv item conversion,
such as MemoryError, codec errors, or the embedded-null ValueError,
with a generic TypeError.  Only add the contextual message when the
conversion actually raised TypeError, matching how os.spawnve() and
the exec functions propagate these errors.

The test is gated to the native C spawnv: the Python fallback used
elsewhere reports conversion failures from the forked child as exit
status 127 instead of raising.
(cherry picked from commit f57d3d6db39ea0bd39743f1a614b46cbefbfdab6)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
3 weeks ago[3.15] GH-151619: Ensure non-module global/builtin namespaces are watched for lazy...
Miss Islington (bot) [Sun, 28 Jun 2026 22:53:20 +0000 (00:53 +0200)] 
[3.15] GH-151619: Ensure non-module global/builtin namespaces are watched for lazy imports (GH-151762) (#152533)

GH-151619: Ensure non-module global/builtin namespaces are watched for lazy imports (GH-151762)
(cherry picked from commit 7ed9062dd05e735505f75e9caac56ccd64913371)

Co-authored-by: Brandt Bucher <brandt@python.org>
3 weeks ago[3.15] gh-150743: Limit trailer lines and interim responses read by http.client ...
Miss Islington (bot) [Sun, 28 Jun 2026 19:35:27 +0000 (21:35 +0200)] 
[3.15] gh-150743: Limit trailer lines and interim responses read by http.client (GH-150741) (#152523)

gh-150743: Limit trailer lines and interim responses read by http.client (GH-150741)

http.client read chunked-response trailer lines and skipped interim (1xx)
responses in unbounded loops, so a server streaming either forever would
hang the client even with a socket timeout set (data keeps arriving, so
the timeout never fires).

Trailer lines are now limited to max_response_headers (100 by default)
and interim responses to 100; HTTPException is raised past either limit.

Follow-up to gh-88188 for CVE-2021-3737, which bounded header lines
within an interim response but not these two sibling loops.
(cherry picked from commit 41cc78a7a47fe584e2c2899737fec877d61ae331)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
---

This issue was reported to us via [GHSA-w4q2-g22w-6fr4](https://github.com/python/cpython/security/advisories/GHSA-w4q2-g22w-6fr4) and was determined not to be high enough severity to handle privately.

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
3 weeks ago[3.15] Docs: link to language reference instead of PEP (GH-152462) (#152522)
Miss Islington (bot) [Sun, 28 Jun 2026 19:13:06 +0000 (21:13 +0200)] 
[3.15] Docs: link to language reference instead of PEP (GH-152462) (#152522)

Docs: link to language reference instead of PEP (GH-152462)
(cherry picked from commit 54524ab669a566623336c36994e1b3f2a6711c77)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
3 weeks ago[3.15] gh-152356: Fix Windows blocking sampling after target process exit (GH-152471...
Miss Islington (bot) [Sun, 28 Jun 2026 17:27:42 +0000 (19:27 +0200)] 
[3.15] gh-152356: Fix Windows blocking sampling after target process exit (GH-152471) (#152512)

3 weeks ago[3.15] gh-87881: Document the result of curses inch() and getbkgd() (GH-152488) ...
Serhiy Storchaka [Sun, 28 Jun 2026 17:06:55 +0000 (20:06 +0300)] 
[3.15] gh-87881: Document the result of curses inch() and getbkgd() (GH-152488) (GH-152511)

Explain the character/attribute bit layout and how to extract the parts
(A_CHARTEXT and A_ATTRIBUTES bit-masks, pair_number() for the color pair).
(cherry picked from commit d831a690766e92b3be5e40134f64407bd041bcbf)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-78335: Complete the widget option lists in tkinter docstrings (GH-152485...
Miss Islington (bot) [Sun, 28 Jun 2026 16:53:52 +0000 (18:53 +0200)] 
[3.15] gh-78335: Complete the widget option lists in tkinter docstrings (GH-152485) (GH-152500)

Several widget __init__ docstrings omitted valid options, and Menubutton and
Message had no option list at all.  List every option supported by the widget,
tagging those added in Tk 9.0 and 9.1.

Add test_options_in_docstring, asserting that every option in OPTIONS is named
in the widget's __init__ docstring.  Options reported by keys() but not in the
docstring are only printed in verbose mode, as some depend on the Tk version.
(cherry picked from commit ba0c0e6be18ea56d00b4534cc9e32d1acaba96d6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-110904: Recommend windows-curses in the curses HOWTO (GH-152491) (GH-152506)
Miss Islington (bot) [Sun, 28 Jun 2026 16:38:19 +0000 (18:38 +0200)] 
[3.15] gh-110904: Recommend windows-curses in the curses HOWTO (GH-152491) (GH-152506)

The HOWTO pointed at UniCurses, which is unmaintained and exposes its own
API.  windows-curses provides the standard curses interface on Windows, so
existing code runs unchanged.
(cherry picked from commit 7b0dff7d16ce59df44847ab04567eb97bfbc3576)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-152434: Avoid Gecko export in async-aware test (GH-152496) (#152498)
Miss Islington (bot) [Sun, 28 Jun 2026 16:19:01 +0000 (18:19 +0200)] 
[3.15] gh-152434: Avoid Gecko export in async-aware test (GH-152496) (#152498)

3 weeks ago[3.15] gh-152397: Provide a cross-reference to PEP 798 unpacking syntax (GH-152454...
Miss Islington (bot) [Sun, 28 Jun 2026 03:55:04 +0000 (05:55 +0200)] 
[3.15] gh-152397: Provide a cross-reference to PEP 798 unpacking syntax (GH-152454) (#152460)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Co-authored-by: Rishit Agnihotri <Twix1288@users.noreply.github.com>
3 weeks ago[3.15] gh-152415: Exercise curses non-ASCII tests under 8-bit locale encodings (GH...
Serhiy Storchaka [Sat, 27 Jun 2026 20:40:13 +0000 (23:40 +0300)] 
[3.15] gh-152415: Exercise curses non-ASCII tests under 8-bit locale encodings (GH-152416) (#152453)

The non-ASCII tests only exercised what the runner's locale could encode (in
practice UTF-8).  Add 8-bit-encoding cases to the character and string I/O
tests, each guarded by the existing encodability check: ASCII, a character
common to the Latin encodings ('é'), and ones distinctive to a single encoding
(byte 0xA4 is '¤' in ISO-8859-1, '€' in ISO-8859-15, 'є' in KOI8-U).  Run the
whole suite under different locales to cover them; unrepresentable cases skip.

* gh-152415: Verify character output round-trips in test_output_character

Read each written character back with in_wch() or instr() rather than
inch(), which on a wide build returns the low byte of the code point
instead of the locale-encoded byte and so mangles a non-ASCII character
of an 8-bit locale.  This lets the int-argument cases cover '€'/'є', and
adds matching coverage for the str argument.

insch() with an int byte > 127 is checked only for Latin-1: on a wide
build ncurses winsch stores a printable byte directly as a code point
instead of decoding it through the locale.
(cherry picked from commit 003d3620cc0f44caca7bf26c3e6964f5f379645f)

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-152434: Fix async-aware Gecko collection (GH-152442) (#152450)
Miss Islington (bot) [Sat, 27 Jun 2026 18:00:28 +0000 (20:00 +0200)] 
[3.15] gh-152434: Fix async-aware Gecko collection (GH-152442) (#152450)

gh-152434: Fix async-aware Gecko collection (GH-152442)
(cherry picked from commit 87ac0bc66a298b040c4b4c6c2eb83628bf10abf9)

Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
3 weeks ago[3.15] gh-151613: Fix remote debugging frame cache ABA (#152448)
Pablo Galindo Salgado [Sat, 27 Jun 2026 17:42:31 +0000 (19:42 +0200)] 
[3.15] gh-151613: Fix remote debugging frame cache ABA (#152448)

gh-151613: Fix remote debugging frame cache ABA (#151614)

The remote debugging frame cache previously used only the last_profiled_frame address as its cache anchor. If a frame returned and a later frame reused the same _PyInterpreterFrame address, the profiler could accept a stale cache entry and splice parent frames from a different call chain into the current stack.

This adds a last_profiled_frame_seq counter next to last_profiled_frame, increments it when the anchor advances, stores it in frame cache entries, and validates cache hits against both the frame address and the sequence. Cache miss walks now copy stack chunks before storing new cache entries so stored continuations come from a stable snapshot. The new regression test exercises alternating call chains and checks that cached stacks never contain frames from both branches.

(cherry picked from commit 8cda6ae2f1f86f2d26c29586ffc9687b410abfcf)

3 weeks ago[3.15] gh-145306: Fix browser open after empty export (GH-150017) (#152447)
Miss Islington (bot) [Sat, 27 Jun 2026 17:36:38 +0000 (19:36 +0200)] 
[3.15] gh-145306: Fix browser open after empty export (GH-150017) (#152447)

gh-145306: Fix browser open after empty export (GH-150017)
(cherry picked from commit 860f8a5addcb556c251b8b9caa95d80518928067)

Co-authored-by: ivonastojanovic <80911834+ivonastojanovic@users.noreply.github.com>
3 weeks ago[3.15] gh-152434: Block --async-aware with --binary (GH-152444) (#152446)
Miss Islington (bot) [Sat, 27 Jun 2026 17:24:53 +0000 (19:24 +0200)] 
[3.15] gh-152434: Block --async-aware with --binary (GH-152444) (#152446)

gh-152434: Block --async-aware with --binary (GH-152444)

The binary writer does not currently handle AwaitedInfo samples and
crashes when running in --async-aware mode.
(cherry picked from commit 876c06cab9e824747d708a031c6b81b1f8a4f8dc)

Co-authored-by: László Kiss Kollár <kiss.kollar.laszlo@gmail.com>
3 weeks ago[3.15] gh-151029: Fix sys.remote_exec() unable to find writable memory when libpython...
Miss Islington (bot) [Sat, 27 Jun 2026 16:49:40 +0000 (18:49 +0200)] 
[3.15] gh-151029: Fix sys.remote_exec() unable to find writable memory when libpython replaced on disk (GH-151032) (#152443)

gh-151029: Fix sys.remote_exec() unable to find writable memory when libpython replaced on disk (GH-151032)
(cherry picked from commit a69d0fc41ef339378022f1c0190a9692cb276a7f)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
3 weeks ago[3.15] gh-152391: Improve `test_interpreters.test_stress` test (GH-152396) (#152427)
Miss Islington (bot) [Sat, 27 Jun 2026 15:37:40 +0000 (17:37 +0200)] 
[3.15] gh-152391: Improve `test_interpreters.test_stress` test (GH-152396) (#152427)

gh-152391: Improve `test_interpreters.test_stress` test (GH-152396)
(cherry picked from commit 219f7a9453a2a89266f6e65d75df1606b4816043)

Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks ago[3.15] gh-152305: Fix `_pydatetime.time.strftime()` raising on year directives (GH...
Miss Islington (bot) [Sat, 27 Jun 2026 15:36:31 +0000 (17:36 +0200)] 
[3.15] gh-152305: Fix `_pydatetime.time.strftime()` raising on year directives (GH-152306) (#152425)

(cherry picked from commit 5733361fdd85519c931e67fd7cab0ff3a11b8ec0)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.15] gh-151126: Sets missing exceptions in `tkinter` and `socket` modules initializ...
Miss Islington (bot) [Sat, 27 Jun 2026 15:28:27 +0000 (17:28 +0200)] 
[3.15] gh-151126: Sets missing exceptions in `tkinter` and `socket` modules initializations (GH-152418) (#152420)

gh-151126: Sets missing exceptions in `tkinter` and `socket` modules initializations (GH-152418)
(cherry picked from commit a9fa8560143098168e0380386acbf4846c37472b)

Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks ago[3.15] gh-152402: Use `support.nomemtest` in `test_pyexpat` (GH-152403) (#152411)
Miss Islington (bot) [Sat, 27 Jun 2026 13:58:20 +0000 (15:58 +0200)] 
[3.15] gh-152402: Use `support.nomemtest` in `test_pyexpat` (GH-152403) (#152411)

gh-152402: Use `support.nomemtest` in `test_pyexpat` (GH-152403)
(cherry picked from commit 109c59e25f558732bfde8b65bbbf305a6a8a05d8)

Co-authored-by: sobolevn <mail@sobolevn.me>
3 weeks ago[3.15] Docs: Fix incomplete sentence in `tp_itemsize` documentation (GH-152381) ...
Miss Islington (bot) [Sat, 27 Jun 2026 13:52:57 +0000 (15:52 +0200)] 
[3.15] Docs: Fix incomplete sentence in `tp_itemsize` documentation (GH-152381) (GH-152417)

(cherry picked from commit 0a21a248cc97eba3d75c7bd07c849ec645aea87b)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
3 weeks ago[3.15] gh-70273: Document default class bindings in tkinter (GH-152389) (GH-152393)
Miss Islington (bot) [Sat, 27 Jun 2026 11:47:07 +0000 (13:47 +0200)] 
[3.15] gh-70273: Document default class bindings in tkinter (GH-152389) (GH-152393)

Note in the Bindings and events section that every widget inherits Tk
class bindings for its standard behavior, where they are documented, and
how to suppress an unwanted one by returning "break" from a callback.
(cherry picked from commit 4fd69ef97a67fc935e0d4f30662f2a1985ba6be9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-82830: Improve tkinter messagebox docstrings and cursor documentation ...
Miss Islington (bot) [Sat, 27 Jun 2026 11:30:15 +0000 (13:30 +0200)] 
[3.15] gh-82830: Improve tkinter messagebox docstrings and cursor documentation (GH-152380) (GH-152386)

Document Windows cursor files (gh-99089).
(cherry picked from commit ea7f64a65cb52b8b720cbf5d590c2cf89de8d407)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-152212: Reject a POSIX TZ footer with a missing std offset in pure-Python...
Miss Islington (bot) [Sat, 27 Jun 2026 09:45:43 +0000 (11:45 +0200)] 
[3.15] gh-152212: Reject a POSIX TZ footer with a missing std offset in pure-Python `zoneinfo` (GH-152213) (#152379)

(cherry picked from commit 93454fe0daa2b29e8fefbe76aed7af4fa1eb8623)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
3 weeks ago[3.15] gh-71880: Allow editing the last cell in curses.textpad.Textbox (GH-152363...
Miss Islington (bot) [Sat, 27 Jun 2026 07:50:59 +0000 (09:50 +0200)] 
[3.15] gh-71880: Allow editing the last cell in curses.textpad.Textbox (GH-152363) (GH-152364)

Textbox.edit() ignored typing in the lower-right cell of the window.  It is
now written with insch(), which fills the cell without moving the cursor out
of the window (addch() there raises an error and scrolls a scrollable window).
(cherry picked from commit 11b394381f30815a8ad0123afb0a55e7a0369f79)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-151678: Add more tests for tkinter.dnd (GH-152362) (GH-152367)
Miss Islington (bot) [Sat, 27 Jun 2026 07:41:21 +0000 (09:41 +0200)] 
[3.15] gh-151678: Add more tests for tkinter.dnd (GH-152362) (GH-152367)

Cover the drag cursor, the Motion and ButtonRelease bindings, switching
between targets, the target search up the master chain, dnd_accept()
returning None, and restarting after a drag has finished.
(cherry picked from commit 389e00f13fb5b20b424980b08678753441db7529)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-38464: Make tkinter nametowidget() work with cloned menus (GH-152336) ...
Miss Islington (bot) [Fri, 26 Jun 2026 23:31:46 +0000 (01:31 +0200)] 
[3.15] gh-38464: Make tkinter nametowidget() work with cloned menus (GH-152336) (GH-152349)

Map the auto-generated name of a cloned menu (a menu used as a menubar
or a cascade) back to the original widget instead of raising KeyError.
(cherry picked from commit 5c3555bdc56a8e110a7d366f8ac0a93cd082e90f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-88758: Handle non-tkinter widgets in tkinter focus methods (GH-152337)...
Miss Islington (bot) [Fri, 26 Jun 2026 23:30:32 +0000 (01:30 +0200)] 
[3.15] gh-88758: Handle non-tkinter widgets in tkinter focus methods (GH-152337) (GH-152346)

focus_get(), focus_displayof(), focus_lastfor() and winfo_containing()
now return None instead of raising KeyError when the focused widget was
not created by tkinter (for example a torn-off menu).
(cherry picked from commit 5fed5ce85d9c862673cc68294f757f345bbcc9b1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] IDLE: fix dedent() usage in htest (GH-152256) (#152342)
Miss Islington (bot) [Fri, 26 Jun 2026 23:13:47 +0000 (01:13 +0200)] 
[3.15] IDLE: fix dedent() usage in htest (GH-152256) (#152342)

IDLE: fix dedent() usage in htest (GH-152256)

Fix typos: in GH-112642, initial string concatenation quotes were left when switching to textwrap.dedent().
(cherry picked from commit 74272d4f0b8478c1d879671ba35ec4ddaae50178)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
3 weeks ago[3.15] gh-98894: Skip test_dtrace when building without dtrace (GH-152239) (#152300)
Miss Islington (bot) [Fri, 26 Jun 2026 20:59:17 +0000 (22:59 +0200)] 
[3.15] gh-98894: Skip test_dtrace when building without dtrace (GH-152239) (#152300)

gh-98894: Skip test_dtrace when building without dtrace (GH-152239)
(cherry picked from commit 671357691f84820d4a4799012e937ab9dcbfdaca)

Co-authored-by: stratakis <cstratak@redhat.com>
3 weeks ago[3.15] gh-80937: Fix memory leak in tkinter createcommand (GH-152294) (GH-152327)
Miss Islington (bot) [Fri, 26 Jun 2026 19:22:21 +0000 (21:22 +0200)] 
[3.15] gh-80937: Fix memory leak in tkinter createcommand (GH-152294) (GH-152327)

A command created with createcommand() held a strong reference to the
interpreter, forming an uncollectable cycle (interpreter -> command ->
interpreter) that kept the interpreter and the callback alive until the
command was removed with deletecommand() or destroy().  The command now
borrows the reference; it cannot outlive the interpreter, which deletes its
commands when finalized.
(cherry picked from commit bbf7786a904e558a15d01475356167e29b2e3708)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.15] gh-152235: Defer GC tracking in set.union and set.difference (gh-152290) ...
Donghee Na [Fri, 26 Jun 2026 17:54:25 +0000 (02:54 +0900)] 
[3.15] gh-152235: Defer GC tracking in set.union and set.difference (gh-152290) (gh-152316)

(cherry picked from commit 5a549e82b81378cb294904dab49cbee853bddd64)

4 weeks ago[3.15] gh-139145: Fix tkinter event loop in interactive mode (GH-152257) (GH-152291)
Miss Islington (bot) [Fri, 26 Jun 2026 15:00:56 +0000 (17:00 +0200)] 
[3.15] gh-139145: Fix tkinter event loop in interactive mode (GH-152257) (GH-152291)

When a Tcl command running its own event loop (such as vwait or
wait_variable) was active and the user typed input on stdin, the event
loop kept spinning at 100% CPU.  The stdin file handler is now removed as
soon as input becomes available.

Also fix gh-139816: an exception raised in a callback no longer stops the
event loop to wait for Enter on a Python built without readline; pending
callbacks keep running until input is actually available on stdin.
(cherry picked from commit 3ffda34f5cd3809a8755c9596948e4e477661d5f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: mdehoon <mjldehoon@yahoo.com>
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
4 weeks ago[3.15] gh-121249: Soft deprecate F and D struct format types (#149346) (#152274)
Victor Stinner [Fri, 26 Jun 2026 14:26:52 +0000 (16:26 +0200)] 
[3.15] gh-121249: Soft deprecate F and D struct format types (#149346) (#152274)

gh-121249: Soft deprecate F and D struct format types (#149346)

Remove F/D type codes from table in the struct module documentation.

(cherry picked from commit 5f17434a1ec9a121eb38f71dc3d5809020b5fbb4)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
4 weeks ago[3.15] gh-152052: Fix misleading `json` error for `\uXXXX` escape at the end of input...
Miss Islington (bot) [Fri, 26 Jun 2026 14:15:21 +0000 (16:15 +0200)] 
[3.15] gh-152052: Fix misleading `json` error for `\uXXXX` escape at the end of input (GH-152053) (#152283)

(cherry picked from commit 588be7af08c04d63c1a920539c64885fbc4c6d38)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
4 weeks ago[3.15] gh-152236: Fix skips on `_testcapi.set_nomemory` tests (GH-152253) (#152281)
Miss Islington (bot) [Fri, 26 Jun 2026 14:03:29 +0000 (16:03 +0200)] 
[3.15] gh-152236: Fix skips on `_testcapi.set_nomemory` tests (GH-152253) (#152281)

gh-152236: Fix skips on `_testcapi.set_nomemory` tests (GH-152253)
(cherry picked from commit 1cbe460eb6c5f40980463f381b3096c92320ff84)

Co-authored-by: sobolevn <mail@sobolevn.me>
4 weeks ago[3.15] gh-152235: Defer GC tracking in more set operations (gh-152273) (gh-152278)
Miss Islington (bot) [Fri, 26 Jun 2026 14:02:58 +0000 (16:02 +0200)] 
[3.15] gh-152235: Defer GC tracking in more set operations (gh-152273) (gh-152278)

gh-152235: Defer GC tracking in more set operations (gh-152273)
(cherry picked from commit a87d24a69d1e97a1e9643c8951d180918ef36e4c)

Co-authored-by: Donghee Na <donghee.na@python.org>
4 weeks ago[3.15] gh-151722: Defer GC tracking in frozendict.copy() (GH-152230) (#152271)
Miss Islington (bot) [Fri, 26 Jun 2026 12:26:17 +0000 (14:26 +0200)] 
[3.15] gh-151722: Defer GC tracking in frozendict.copy() (GH-152230) (#152271)

gh-151722: Defer GC tracking in frozendict.copy() (GH-152230)

Fix _PyDict_Or() and frozendict.copy(): only track the frozendict by
the GC once the dictionary is fully initialized.

Functions modifying frozendict now ensures that the object is not
tracked by the GC (in debug mode).

* can_modify_dict() checks that _PyObject_GC_IS_TRACKED() is false
  for frozendicts.
* dict_merge_api() makes sure that the dictionary is tracked by the
  GC.
(cherry picked from commit 05679f3576ed3298c9b0f86e8a3462f0b92dff8f)

Co-authored-by: Victor Stinner <vstinner@python.org>