]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 weeks ago[3.14] gh-153056: Fix a data race compiling the string.Template pattern in free-threa...
Miss Islington (bot) [Wed, 8 Jul 2026 21:43:54 +0000 (23:43 +0200)] 
[3.14] gh-153056: Fix a data race compiling the string.Template pattern in free-threading builds (GH-153057) (#153303)

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.14] gh-153300: Set global configuration variables in PyConfig_Set() (#153301)...
Victor Stinner [Wed, 8 Jul 2026 18:20:45 +0000 (20:20 +0200)] 
[3.14] gh-153300: Set global configuration variables in PyConfig_Set() (#153301) (#153359)

gh-153300: Set global configuration variables in PyConfig_Set() (#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)

2 weeks ago[3.14] gh-150191: temporarily skip two openssl tests which have internal data races...
Miss Islington (bot) [Wed, 8 Jul 2026 16:27:06 +0000 (18:27 +0200)] 
[3.14] gh-150191: temporarily skip two openssl tests which have internal data races under TSAN (GH-153320) (#153349)

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.14] gh-153298: Fix data race in `GenericAlias` parameter initialization on FT...
Miss Islington (bot) [Wed, 8 Jul 2026 15:21:55 +0000 (17:21 +0200)] 
[3.14] gh-153298: Fix data race in `GenericAlias` parameter initialization on FT (GH-153318) (#153346)

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.14] gh-153083: Defer GC tracking of an array to the end of construction. (gh-15328...
Donghee Na [Wed, 8 Jul 2026 13:59:03 +0000 (22:59 +0900)] 
[3.14] gh-153083: Defer GC tracking of an array to the end of construction. (gh-153284) (gh-153337)

(cherry picked from commit 8615062fd580934fc431746f64b1ac7ee6ef8e88)

2 weeks ago[3.14] gh-145098: Use `macos-26[-intel]` instead of `macos-15[-intel]` in `{jit,tail...
Miss Islington (bot) [Wed, 8 Jul 2026 13:44:17 +0000 (15:44 +0200)] 
[3.14] gh-145098: Use `macos-26[-intel]` instead of `macos-15[-intel]` in `{jit,tail-call}.yml` (GH-153194) (#153327)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.14] gh-143990: Preserve the size when creating a Font from a named font (GH-153267...
Miss Islington (bot) [Wed, 8 Jul 2026 13:29:05 +0000 (15:29 +0200)] 
[3.14] gh-143990: Preserve the size when creating a Font from a named font (GH-153267) (GH-153323) (GH-153341)

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)
(cherry picked from commit a9d4473232f86d6dfc234756f633b8dc5836ad32)

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

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.14] gh-86017: Document displayof for Font.actual() and clarify Font.copy() (GH...
Miss Islington (bot) [Wed, 8 Jul 2026 12:08:28 +0000 (14:08 +0200)] 
[3.14] gh-86017: Document displayof for Font.actual() and clarify Font.copy() (GH-153288) (GH-153330)

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.14] gh-152157: Reject empty fractions in `_datetime.{date}time.fromisoformat`...
tonghuaroot (童话) [Wed, 8 Jul 2026 10:37:11 +0000 (18:37 +0800)] 
[3.14] gh-152157: Reject empty fractions in `_datetime.{date}time.fromisoformat` (GH-152161) (#152765)

(cherry picked from commit 112c69a0514902af2d2f7d0503de6690ca59a10f)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.14] gh-153292: Fix data race in `threading.RLock.__repr__` in FT builds (GH-153299...
Miss Islington (bot) [Wed, 8 Jul 2026 10:10:36 +0000 (12:10 +0200)] 
[3.14] gh-153292: Fix data race in `threading.RLock.__repr__` in FT builds (GH-153299) (#153315)

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.14] gh-150191: Avoid data race in test_sni_callback_race (GH-150193) (#153270)
Miss Islington (bot) [Wed, 8 Jul 2026 09:11:33 +0000 (11:11 +0200)] 
[3.14] gh-150191: Avoid data race in test_sni_callback_race (GH-150193) (#153270)

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.14] gh-153252: Fix error handling in `_PyCompile_CodeGen` (GH-153253) (#153282)
Miss Islington (bot) [Tue, 7 Jul 2026 18:02:59 +0000 (20:02 +0200)] 
[3.14] gh-153252: Fix error handling in `_PyCompile_CodeGen` (GH-153253) (#153282)

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.14] gh-153210: Restore accidental `array.ArrayType` removal (GH-153261) (#153275)
Miss Islington (bot) [Tue, 7 Jul 2026 17:24:07 +0000 (19:24 +0200)] 
[3.14] gh-153210: Restore accidental `array.ArrayType` removal (GH-153261) (#153275)

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.14] gh-143921: Reject NUL, CR and LF in IMAP commands (GH-143922, GH-153067) ...
Serhiy Storchaka [Tue, 7 Jul 2026 17:13:02 +0000 (20:13 +0300)] 
[3.14] gh-143921: Reject NUL, CR and LF in IMAP commands (GH-143922, GH-153067) (GH-153137)

Combined backport of GH-143922, which rejected all control characters,
and GH-153067, which narrowed the check to NUL, CR and LF.  Other
control characters are valid in quoted strings and are sent quoted.

(cherry picked from commit 6262704b134db2a4ba12e85ecfbd968534f28b45)
(cherry picked from commit d0921efb665aff26b378f495e5ff84f7e3fe649d)

Co-authored-by: Seth Michael Larson <seth@python.org>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago[3.14] gh-83274: Don't crash when a Tcl interpreter is deallocated in the wrong threa...
Serhiy Storchaka [Tue, 7 Jul 2026 16:57:19 +0000 (19:57 +0300)] 
[3.14] gh-83274: Don't crash when a Tcl interpreter is deallocated in the wrong thread (GH-152323) (GH-153277)

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.14] gh-153205: Set `MemoryError` in stackref array conversion (GH-153206) (#153273)
Miss Islington (bot) [Tue, 7 Jul 2026 16:32:27 +0000 (18:32 +0200)] 
[3.14] gh-153205: Set `MemoryError` in stackref array conversion (GH-153206) (#153273)

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.14] gh-153210: Fix `array` module import crash under a memory pressure (GH-153238...
Miss Islington (bot) [Tue, 7 Jul 2026 12:36:50 +0000 (14:36 +0200)] 
[3.14] gh-153210: Fix `array` module import crash under a memory pressure (GH-153238) (#153250)

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.14] Use `soft-deprecated` in more places (GH-148769) (#152938)
Stan Ulbrych [Tue, 7 Jul 2026 12:01:13 +0000 (14:01 +0200)] 
[3.14] Use `soft-deprecated` in more places (GH-148769) (#152938)

(cherry picked from commit 3fd61b74de97b152ed424aaea1295292dcb181fd)

2 weeks ago[3.14] Seed pip caches for docs on `main`/`3.x` branches (GH-153127) (#153232)
Miss Islington (bot) [Tue, 7 Jul 2026 09:30:39 +0000 (11:30 +0200)] 
[3.14] Seed pip caches for docs on `main`/`3.x` branches (GH-153127) (#153232)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.14] gh-82151: Update and improve urlsplit docstring (#152985) (#153155)
Senthil Kumaran [Tue, 7 Jul 2026 00:24:20 +0000 (17:24 -0700)] 
[3.14] gh-82151: Update and improve urlsplit docstring (#152985) (#153155)

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

Slightly improved wording for % escapes. Consistent with rest of the doc.

---------

(cherry picked from commit ad54b91b9fa4c5d12f155bb09138dff21a2bdec3)

Co-authored-by: Pranav Choudhary <chaudharyypranav@gmail.com>
Co-authored-by: idomic <michael.ido@gmail.com>
2 weeks ago[3.14] gh-153068: Preserve cprofile enable errors (GH-153070) (#153242)
Miss Islington (bot) [Tue, 7 Jul 2026 00:03:12 +0000 (02:03 +0200)] 
[3.14] gh-153068: Preserve cprofile enable errors (GH-153070) (#153242)

2 weeks ago[3.14] gh-153200: Fix math.isqrt() for int subclasses with overridden comparison...
Serhiy Storchaka [Mon, 6 Jul 2026 18:46:04 +0000 (21:46 +0300)] 
[3.14] gh-153200: Fix math.isqrt() for int subclasses with overridden comparison operators (GH-153203) (GH-153225)

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: Claude Fable 5 <noreply@anthropic.com>
2 weeks ago[3.14] gh-150880: Clarify DirEntry.path construction semantics (GH-153218) (GH-153220)
Miss Islington (bot) [Mon, 6 Jul 2026 17:22:05 +0000 (19:22 +0200)] 
[3.14] gh-150880: Clarify DirEntry.path construction semantics (GH-153218) (GH-153220)

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.14] gh-150641: Fix evaluating forward references in STRING format can 'leak' inter...
Ivy Xu [Mon, 6 Jul 2026 17:07:12 +0000 (01:07 +0800)] 
[3.14] gh-150641: Fix evaluating forward references in STRING format can 'leak' internal names (GH-150648) (#153016)

(cherry picked from commit f75028f7ceebee4cbeb46bf040834e2005d57436)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 weeks ago[3.14] gh-152682: Fix NULL dereference on OOM in `symtable_visit_type_param_bound_or_...
Miss Islington (bot) [Mon, 6 Jul 2026 16:35:58 +0000 (18:35 +0200)] 
[3.14] gh-152682: Fix NULL dereference on OOM in `symtable_visit_type_param_bound_or_default` (GH-152684) (#152696)

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.14] Docs: Link to the `contextlib.chdir` context manager in the `os.chdir` docs...
Miss Islington (bot) [Mon, 6 Jul 2026 15:49:04 +0000 (17:49 +0200)] 
[3.14] Docs: Link to the `contextlib.chdir` context manager in the `os.chdir` docs (GH-153152) (#153213)

(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.14] gh-152849: Fix `OverflowError` message for out-of-range timestamps in the...
Miss Islington (bot) [Mon, 6 Jul 2026 15:16:34 +0000 (17:16 +0200)] 
[3.14] gh-152849: Fix `OverflowError` message for out-of-range timestamps in the `time` module (GH-152850) (#153208)

(cherry picked from commit 2d7a74ece7884c9a5f52cc6ac38a6e7ee691b26c)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.14] gh-146531: Skip hanging `wm iconbitmap` test on macOS 26 Intel (GH-148032...
Miss Islington (bot) [Mon, 6 Jul 2026 12:54:18 +0000 (14:54 +0200)] 
[3.14] gh-146531: Skip hanging `wm iconbitmap` test on macOS 26 Intel (GH-148032) (#153191)

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

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks ago[3.14] RTD Previews: Get correct base branch for backports (GH-150690) (#153163)
Hugo van Kemenade [Mon, 6 Jul 2026 10:04:35 +0000 (13:04 +0300)] 
[3.14] RTD Previews: Get correct base branch for backports (GH-150690) (#153163)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks ago[3.14] gh-148765: Fix description of *include_hidden* parameter in `glob.glob()`...
Miss Islington (bot) [Mon, 6 Jul 2026 08:10:05 +0000 (10:10 +0200)] 
[3.14] gh-148765: Fix description of *include_hidden* parameter in `glob.glob()` docs (GH-148768) (#153174)

(cherry picked from commit db3a4773e1e5fc1a30597d9e08bcbe41d27e5bbb)

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

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>
3 weeks ago[3.14] gh-105708: 'V' could be case insensitive for IPvFuture hostnames (GH-105709...
Miss Islington (bot) [Sun, 5 Jul 2026 17:52:50 +0000 (19:52 +0200)] 
[3.14] gh-105708: 'V' could be case insensitive for IPvFuture hostnames (GH-105709) (#153139)

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>
3 weeks ago[3.14] gh-68147: Fix RFC references in imaplib (GH-153126) (GH-153131)
Miss Islington (bot) [Sun, 5 Jul 2026 14:36:06 +0000 (16:36 +0200)] 
[3.14] gh-68147: Fix RFC references in imaplib (GH-153126) (GH-153131)

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>
3 weeks ago[3.14] gh-149930: Clarify imaplib response helper types (GH-149963) (GH-153124)
Miss Islington (bot) [Sun, 5 Jul 2026 13:27:49 +0000 (15:27 +0200)] 
[3.14] gh-149930: Clarify imaplib response helper types (GH-149963) (GH-153124)

(cherry picked from commit d2d415b9761a539c37ea4f950df4e9aab0eca6ed)

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

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>
3 weeks ago[3.14] gh-69134: Wait until mapped in SimpleDialog keyboard tests (GH-152690) (GH...
Serhiy Storchaka [Sun, 5 Jul 2026 11:37:41 +0000 (14:37 +0300)] 
[3.14] gh-69134: Wait until mapped in SimpleDialog keyboard tests (GH-152690) (GH-153105)

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>
3 weeks ago[3.14] Fix minor typos in 'Compound statements' docs (GH-149666) (#153114)
Miss Islington (bot) [Sun, 5 Jul 2026 11:31:35 +0000 (13:31 +0200)] 
[3.14] Fix minor typos in 'Compound statements' docs (GH-149666) (#153114)

(cherry picked from commit 856049a9d99119ad74cd991fa8f8a72ebc909122)

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

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>
3 weeks ago[3.14] gh-75952: Document negative offsets in tkinter geometry strings (GH-152531...
Miss Islington (bot) [Sun, 5 Jul 2026 11:15:44 +0000 (13:15 +0200)] 
[3.14] gh-75952: Document negative offsets in tkinter geometry strings (GH-152531) (GH-153102)

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>
3 weeks ago[3.14] gh-54930: Send a status line in error responses to malformed request lines...
Miss Islington (bot) [Sun, 5 Jul 2026 11:15:38 +0000 (13:15 +0200)] 
[3.14] gh-54930: Send a status line in error responses to malformed request lines (GH-152980) (GH-153093)

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>
3 weeks ago[3.14] gh-123193: Document tkinter Variable lifetime (GH-152625) (GH-153099)
Miss Islington (bot) [Sun, 5 Jul 2026 11:14:52 +0000 (13:14 +0200)] 
[3.14] gh-123193: Document tkinter Variable lifetime (GH-152625) (GH-153099)

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>
3 weeks ago[3.14] Fix various typos in the `http.server` docs (GH-153089) (#153097)
Stan Ulbrych [Sun, 5 Jul 2026 11:12:01 +0000 (13:12 +0200)] 
[3.14] Fix various typos in the `http.server` docs (GH-153089) (#153097)

(cherry picked from commit 99b4cdbfa1619a3901f8cf87d3b5fe8d4894e3e7)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
3 weeks ago[3.14] gh-151945: fix Sphinx reference warnings in `http.server` docs (GH-153084...
Bénédikt Tran [Sun, 5 Jul 2026 10:15:11 +0000 (12:15 +0200)] 
[3.14] gh-151945: fix Sphinx reference warnings in `http.server` docs  (GH-153084) (#153087)

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

3 weeks ago[3.14] gh-66335: Test uppercase IMAP4 command names (GH-152876) (GH-153081)
Serhiy Storchaka [Sun, 5 Jul 2026 08:42:33 +0000 (11:42 +0300)] 
[3.14] gh-66335: Test uppercase IMAP4 command names (GH-152876) (GH-153081)

(cherry picked from commit 3cd6b7406442ad976c6651b9fba6f078971cdf10)

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

(cherry picked from commit 5616505b443b13d9f5766dedcf6c0b43167705b6)

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

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>
3 weeks ago[3.14] gh-67512: Document IMAP4.append() flags argument (GH-149907) (GH-153076)
Miss Islington (bot) [Sun, 5 Jul 2026 08:05:25 +0000 (10:05 +0200)] 
[3.14] gh-67512: Document IMAP4.append() flags argument (GH-149907) (GH-153076)

(cherry picked from commit 5f8d9d35753e22946880d4fefb123e8234706266)

Co-authored-by: Savage Mechanic <savagemechanic@github.com>
3 weeks ago[3.14] gh-40038: Quote imaplib command arguments when necessary (GH-152703) (GH-153069)
Serhiy Storchaka [Sun, 5 Jul 2026 07:36:11 +0000 (10:36 +0300)] 
[3.14] gh-40038: Quote imaplib command arguments when necessary (GH-152703) (GH-153069)

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>
3 weeks ago[3.14] gh-153030: Fix quadratic complexity in incremental parsing in HTMLParser ...
Miss Islington (bot) [Sat, 4 Jul 2026 18:08:05 +0000 (20:08 +0200)] 
[3.14] gh-153030: Fix quadratic complexity in incremental parsing in HTMLParser (GH-153031) (GH-153039)

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>
3 weeks ago[3.14] gh-151945: Fix all reference warnings and various solecisms in the `http.cooki...
Miss Islington (bot) [Sat, 4 Jul 2026 15:10:43 +0000 (17:10 +0200)] 
[3.14] gh-151945: Fix all reference warnings and various solecisms in the `http.cookiejar` docs (GH-152816) (#153033)

(cherry picked from commit 66c76fa6737d497cd3c735f75e67a5ca52eceb15)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.14] gh-135661: Fix abrupt closing of empty comment in HTMLParser (GH-153007) ...
Miss Islington (bot) [Sat, 4 Jul 2026 12:32:20 +0000 (14:32 +0200)] 
[3.14] gh-135661: Fix abrupt closing of empty comment in HTMLParser (GH-153007) (GH-153025)

An abruptly closed empty comment ("<!-->" or "<!--->") no longer extends
up to a later "-->" in the same feed() call.

test_htmlparser now also feeds each string source as a single chunk, in
addition to one character at a time, to exercise different input buffering.
(cherry picked from commit ed370d3337c1ac4f7295b444a4807c0b72287608)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.14] gh-152851: fix a crash when copying a BLAKE-2s/2b object (GH-153008) (#153012)
Bénédikt Tran [Sat, 4 Jul 2026 10:46:47 +0000 (12:46 +0200)] 
[3.14] gh-152851: fix a crash when copying a BLAKE-2s/2b object (GH-153008) (#153012)

[3.14] gh-152851: fix a crash when copying a BLAKE-2s/2b object (GH-153008)
(cherry picked from commit 5a400ceafbbd4456ac65fbdbcf5d62ce9e8e4f9f)

3 weeks ago[3.14]gh-75666: idlelib backport of iomenu change (GH-151958) (#152995)
Terry Jan Reedy [Sat, 4 Jul 2026 05:01:51 +0000 (01:01 -0400)] 
[3.14]gh-75666: idlelib backport of iomenu change (GH-151958) (#152995)

3 weeks ago[3.14] gh-83386: Enable test_hang_gh83386 for ProcessPoolExecutor (GH-152976) (#152983)
Miss Islington (bot) [Sat, 4 Jul 2026 03:35:35 +0000 (05:35 +0200)] 
[3.14] gh-83386: Enable test_hang_gh83386 for ProcessPoolExecutor (GH-152976) (#152983)

gh-83386: Enable test_hang_gh83386 for ProcessPoolExecutor (GH-152976)

The hang this test guards against (interpreter exit after
shutdown(wait=False) with running futures) was fixed for
ProcessPoolExecutor by the executor management rewrite years ago, but
the test still skipped it citing the issue. The skip also hid a latent
NameError in the subprocess template, which only selects a start method
in the process pool variants; rewrite it to use the same
mp_context=get_context() shape as the sibling templates. Remove a stale
comment claiming ProcessPoolExecutor often hangs with wait=False.
(cherry picked from commit 548c7314138b85cab3b945a1ce05440dd836a2ea)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
3 weeks ago[3.14] gh-89520: Load extension settings and keybindings from user config (GH-28713...
Terry Jan Reedy [Sat, 4 Jul 2026 03:24:34 +0000 (23:24 -0400)] 
[3.14] gh-89520: Load extension settings and keybindings from user config (GH-28713) (#152992)

Extension keybindings defined in ~/.idlerc/config-extensions.cfg
were silently ignored because GetExtensionKeys, __GetRawExtensionKeys,
and GetExtensionBindings only checked default config.
Fix these to check user config as well, and update the extensions config
dialog to handle user-only extensions correctly.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
(cherry picked from commit 208195dff4cd19dfd4aeb0eed8a133f2b1a66ec1)

3 weeks ago[3.14] gh-139551: add support for BaseExceptionGroup in IDLE (GH-139563) (#152990)
Miss Islington (bot) [Sat, 4 Jul 2026 00:52:10 +0000 (02:52 +0200)] 
[3.14] gh-139551: add support for BaseExceptionGroup in IDLE (GH-139563) (#152990)

gh-139551: add support for BaseExceptionGroup in IDLE (GH-139563)

Meaningfully render ExceptionGroup tracebacks in the IDLE GUI REPL.

---------
(cherry picked from commit 1e79bf6c05d057c033c396e58d20618d80d392f2)

Co-authored-by: Locked-chess-official <13140752715@163.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 weeks ago[3.14] gh-94523: IDLE: Detect file if modified and prompt the user to refresh (GH...
Miss Islington (bot) [Sat, 4 Jul 2026 00:45:38 +0000 (02:45 +0200)] 
[3.14] gh-94523: IDLE: Detect file if modified and prompt the user to refresh (GH-145625) (#152989)

gh-94523: IDLE: Detect file if modified and prompt the user to refresh (GH-145625)
(cherry picked from commit 6e2272d0b199d1ab992fffac5fc8e356d7342aec)

Co-authored-by: Shixian Li <lsx7@sina.com>
3 weeks ago[3.14] Backport idlelib changes in PR 142294 (#152986)
Terry Jan Reedy [Sat, 4 Jul 2026 00:06:41 +0000 (20:06 -0400)] 
[3.14] Backport idlelib changes in PR 142294 (#152986)

PR-142294 (3.15) deleted 'button_ok in textview and 'was_executing' in pyshell.  Backport to 3.14 and 3.13.

3 weeks ago[3.14] gh-152951 - Fix double DECREF when `newblock` fails during deque.extend calls...
Miss Islington (bot) [Fri, 3 Jul 2026 18:08:51 +0000 (20:08 +0200)] 
[3.14] gh-152951 - Fix double DECREF when `newblock` fails during deque.extend calls (GH-152961) (#152972)

gh-152951 - Fix double DECREF when `newblock` fails during deque.extend calls (GH-152961)
(cherry picked from commit a90576d72c8a409f7c3ffcaefafb13945e3405ab)

Co-authored-by: Steve Stagg <stestagg@gmail.com>
3 weeks ago[3.14] gh-150880: Normalize paths on Windows before appending wildcard (GH-152906...
Miss Islington (bot) [Fri, 3 Jul 2026 15:59:05 +0000 (17:59 +0200)] 
[3.14] gh-150880: Normalize paths on Windows before appending wildcard (GH-152906) (GH-152964)

gh-150880: Normalize paths on Windows before appending wildcard (GH-152906)

This ensures that we don't turn a "valid" path with trailing spaces into an invalid path with embedded spaces.
(cherry picked from commit 1b4135a2c69f5320dbdcb37dcc295a5fd36580b5)

Co-authored-by: Zain Nadeem <zainnadeemzainnadeem80@gmail.com>
3 weeks ago[3.14] gh-152785: Upgrade GCC from 10 to 13 in GHA Address Sanitizer (GH-152782)...
Miss Islington (bot) [Fri, 3 Jul 2026 11:39:38 +0000 (13:39 +0200)] 
[3.14] gh-152785: Upgrade GCC from 10 to 13 in GHA Address Sanitizer (GH-152782) (#152948)

gh-152785: Upgrade GCC from 10 to 13 in GHA Address Sanitizer (GH-152782)

Remove the step which installs GCC 10. This step was needed when
Ubuntu only had GCC 9. We are now using Ubuntu 24.04 which has GCC
13.
(cherry picked from commit 31a0e0968e92c65019e4e0547475904e9b047d4a)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks ago[3.14] gh-152785: Upgrade Java from 17 to 21 in GHA Android (GH-152783) (#152921)
Russell Keith-Magee [Fri, 3 Jul 2026 11:10:25 +0000 (19:10 +0800)] 
[3.14] gh-152785: Upgrade Java from 17 to 21 in GHA Android (GH-152783) (#152921)

Upgrade Java from 17 to 21 in GHA Android, and document the Java version
requirement.
(cherry picked from commit 0a13efc3fb0bf0896612ed20decce3ce4eb5e05b)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 weeks ago[3.14] gh-152919: Ensure nuget.org source exist before python install (GH-152919)
Miss Islington (bot) [Fri, 3 Jul 2026 08:53:44 +0000 (10:53 +0200)] 
[3.14] gh-152919: Ensure nuget.org source exist before python install (GH-152919)

(cherry picked from commit 8c35afa221020f58d7d4f0237a999b2b989410fe)

Co-authored-by: Bart van der Braak <bartvdbraak@gmail.com>
3 weeks ago[3.14] gh-115634: Fix ProcessPoolExecutor deadlock with max_tasks_per_child (GH-14090...
Miss Islington (bot) [Fri, 3 Jul 2026 06:35:47 +0000 (08:35 +0200)] 
[3.14] gh-115634: Fix ProcessPoolExecutor deadlock with max_tasks_per_child (GH-140900) (#152927)

gh-115634: Fix ProcessPoolExecutor deadlock with max_tasks_per_child (GH-140900)

The idle worker semaphore counts task completions, not idle workers, so
it can hold a stale token released by a worker that later exited upon
reaching its max_tasks_per_child limit. The worker replacement path
consumed such tokens and skipped spawning a replacement, deadlocking
the remaining queued tasks once no workers were left.

Replace dead workers based on len(self._processes) without consulting
the semaphore. The submit() path is unchanged, preserving on-demand
spawning and idle worker reuse.

Replace the documentation note added in GH-140897 with a versionchanged
entry now that the bug is fixed.

Based on a fix proposed by Tabrez Mohammed.
(cherry picked from commit b706767d8fd7d21afc3f156fb9c173bc99855e0e)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
3 weeks ago[3.14] gh-151428: Remove unused imports in idlelib.idle_test (GH-151478) (GH-152916...
Miss Islington (bot) [Thu, 2 Jul 2026 21:51:38 +0000 (23:51 +0200)] 
[3.14] gh-151428: Remove unused imports in idlelib.idle_test (GH-151478) (GH-152916) (#152917)

[3.15] gh-151428: Remove unused imports in idlelib.idle_test (GH-151478) (GH-152916)
(cherry picked from commit 984ebbfeecaa8b614fd81ebac4460e301ffc8f08)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 weeks ago[3.14] gh-152847: Reject POSIX TZ rule with non-digit day-of-year in `_zoneinfo.py...
Miss Islington (bot) [Thu, 2 Jul 2026 18:34:55 +0000 (20:34 +0200)] 
[3.14] gh-152847: Reject POSIX TZ rule with non-digit day-of-year in `_zoneinfo.py` (GH-152848) (#152909)

(cherry picked from commit 31864bd9a683c93bd9b294fb5bcf6857493c15ff)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.14] gh-86165: Fix Time2Internaldate with datetime timetuple (GH-151844) (GH-152896)
Miss Islington (bot) [Thu, 2 Jul 2026 15:29:24 +0000 (17:29 +0200)] 
[3.14] gh-86165: Fix Time2Internaldate with datetime timetuple (GH-151844) (GH-152896)

(cherry picked from commit 460fe13601d1a71f4700f6685e0f4d01d1ef0d6b)

Co-authored-by: Xiao Yuan <yuanx749@gmail.com>
3 weeks ago[3.14] gh-144067: Document terminal leak when initscr() follows setupterm() (GH-15262...
Miss Islington (bot) [Thu, 2 Jul 2026 15:09:25 +0000 (17:09 +0200)] 
[3.14] gh-144067: Document terminal leak when initscr() follows setupterm() (GH-152624) (GH-152894) (GH-152899)

(cherry picked from commit e471712958515b65b737ac742b294acf7de9220c)
(cherry picked from commit 46b48ff09ac9b22d558cfd74274da3ca033c9bcd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks ago[3.14] gh-152680: Detect virtualization on Windows in pythoninfo (GH-152824) (#152889)
Miss Islington (bot) [Thu, 2 Jul 2026 13:28:13 +0000 (15:28 +0200)] 
[3.14] gh-152680: Detect virtualization on Windows in pythoninfo (GH-152824) (#152889)

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.14] gh-88574: Skip a spurious blank line after a literal in imaplib (GH-152751...
Miss Islington (bot) [Thu, 2 Jul 2026 13:20:36 +0000 (15:20 +0200)] 
[3.14] gh-88574: Skip a spurious blank line after a literal in imaplib (GH-152751) (GH-152885)

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.14] gh-150069: Test frozen dataclass and properties interaction (GH-150070) (...
Miss Islington (bot) [Thu, 2 Jul 2026 13:16:30 +0000 (15:16 +0200)] 
[3.14] gh-150069: Test frozen dataclass and properties interaction (GH-150070) (#152883)

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.14] gh-49680: Test imaplib.IMAP4.append line-ending normalization (GH-152877)...
Miss Islington (bot) [Thu, 2 Jul 2026 12:25:08 +0000 (14:25 +0200)] 
[3.14] gh-49680: Test imaplib.IMAP4.append line-ending normalization (GH-152877) (GH-152878)

(cherry picked from commit ddb6539c4976b18895bb5c5cd37d197c60fb459d)
(cherry picked from commit 6759fd82117a50c40a0911189eda1c8dfa93ad03)

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

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.14] gh-151763: Fix OOM-0013 crash when the parser or compiler fails to allocate...
Miss Islington (bot) [Thu, 2 Jul 2026 08:23:07 +0000 (10:23 +0200)] 
[3.14] gh-151763: Fix OOM-0013 crash when the parser or compiler fails to allocate (GH-151968) (#152837)

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

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.14] gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768...
Miss Islington (bot) [Thu, 2 Jul 2026 07:42:15 +0000 (09:42 +0200)] 
[3.14] gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768) (GH-152857)

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.14] gh-63121: Refresh imaplib capabilities on state changes (GH-152752) (GH-152855)
Miss Islington (bot) [Thu, 2 Jul 2026 07:38:30 +0000 (09:38 +0200)] 
[3.14] gh-63121: Refresh imaplib capabilities on state changes (GH-152752) (GH-152855)

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.14] gh-72507: Document that imaplib does not verify TLS certificates by default...
Miss Islington (bot) [Thu, 2 Jul 2026 07:27:04 +0000 (09:27 +0200)] 
[3.14] gh-72507: Document that imaplib does not verify TLS certificates by default (GH-152778) (GH-152863)

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.14] gh-79964: Clarify the imaplib fetch example in the docs (GH-152780) (GH-152860)
Miss Islington (bot) [Thu, 2 Jul 2026 07:26:46 +0000 (09:26 +0200)] 
[3.14] gh-79964: Clarify the imaplib fetch example in the docs (GH-152780) (GH-152860)

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.14] gh-135142: update idlelib News3.txt for 9 issues (GH-152839) (#152843)
Miss Islington (bot) [Thu, 2 Jul 2026 03:22:20 +0000 (05:22 +0200)] 
[3.14] gh-135142: update idlelib News3.txt for 9 issues (GH-152839) (#152843)

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.14] gh-82183: Do not restart the busy IDLE shell when running without restart...
Miss Islington (bot) [Wed, 1 Jul 2026 23:26:49 +0000 (01:26 +0200)] 
[3.14] gh-82183: Do not restart the busy IDLE shell when running without restart (GH-152745) (#152833)

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.14] gh-75595: Do not save a blank int entry in IDLE Settings (GH-152743) (#152828)
Miss Islington (bot) [Wed, 1 Jul 2026 22:23:22 +0000 (00:23 +0200)] 
[3.14] gh-75595: Do not save a blank int entry in IDLE Settings (GH-152743) (#152828)

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.14] gh-65339: Save IDLE Shell and Output windows as text by default (GH-152742...
Miss Islington (bot) [Wed, 1 Jul 2026 21:07:09 +0000 (23:07 +0200)] 
[3.14] gh-65339: Save IDLE Shell and Output windows as text by default (GH-152742) (#152822)

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.14] gh-152060: Fix `_pydatetime.fromisoformat()` raising `AssertionError` on inval...
tonghuaroot (童话) [Wed, 1 Jul 2026 18:48:20 +0000 (02:48 +0800)] 
[3.14] gh-152060: Fix `_pydatetime.fromisoformat()` raising `AssertionError` on invalid lengths (GH-152061) (#152786)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks ago[3.14] gh-80504: Always show the full search path in IDLE Find in Files (GH-152740...
Miss Islington (bot) [Wed, 1 Jul 2026 17:33:30 +0000 (19:33 +0200)] 
[3.14] gh-80504: Always show the full search path in IDLE Find in Files (GH-152740) (#152811)

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.14] gh-134300: Remove idlelib from the path of the IDLE user process (GH-152739...
Miss Islington (bot) [Wed, 1 Jul 2026 17:03:16 +0000 (19:03 +0200)] 
[3.14] gh-134300: Remove idlelib from the path of the IDLE user process (GH-152739) (#152808)

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.14] gh-89360: Fix ValueError in IDLE MultiCall event_delete (GH-152738) (#152803)
Miss Islington (bot) [Wed, 1 Jul 2026 16:48:57 +0000 (18:48 +0200)] 
[3.14] gh-89360: Fix ValueError in IDLE MultiCall event_delete (GH-152738) (#152803)

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.14] gh-71956: Fix IDLE Replace All searching up without wrap around (GH-152737...
Miss Islington (bot) [Wed, 1 Jul 2026 16:20:54 +0000 (18:20 +0200)] 
[3.14] gh-71956: Fix IDLE Replace All searching up without wrap around (GH-152737) (#152800)

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.14] gh-66331: Set correct WM_CLASS on X11 for IDLE windows (GH-152733) (#152795)
Miss Islington (bot) [Wed, 1 Jul 2026 15:37:43 +0000 (17:37 +0200)] 
[3.14] gh-66331: Set correct WM_CLASS on X11 for IDLE windows (GH-152733) (#152795)

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.14] gh-144473: Add "steal" term to glossary; clarify "stealing" on error (GH-14450...
Petr Viktorin [Wed, 1 Jul 2026 12:25:56 +0000 (14:25 +0200)] 
[3.14] gh-144473: Add "steal" term to glossary; clarify "stealing" on error (GH-144502) (GH-152772)

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: Peter Bierma <zintensitydev@gmail.com>
3 weeks ago[3.14] Docs: Fix incomplete sentence in `tp_itemsize` documentation (GH-152381) ...
da-woods [Wed, 1 Jul 2026 11:52:24 +0000 (12:52 +0100)] 
[3.14] Docs: Fix incomplete sentence in `tp_itemsize` documentation (GH-152381) (GH-152424)

(cherry picked from commit 0a21a248cc97eba3d75c7bd07c849ec645aea87b)

3 weeks ago[3.14] gh-151626: Fix tests that fail when PYTHONPYCACHEPREFIX is set (GH-151952...
Gregory P. Smith [Wed, 1 Jul 2026 07:54:26 +0000 (00:54 -0700)] 
[3.14] gh-151626: Fix tests that fail when PYTHONPYCACHEPREFIX is set (GH-151952) (#152744)

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.14] gh-152728: IDLE - move 3 toplevel fix_xyz functions to idlelb.util (GH-152729...
Miss Islington (bot) [Wed, 1 Jul 2026 06:09:26 +0000 (08:09 +0200)] 
[3.14] gh-152728: IDLE - move 3 toplevel fix_xyz functions to idlelb.util (GH-152729) (#152731)

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.14] gh-152502: Detect the curses mouse interface portably (GH-152705) (GH-152734)
Serhiy Storchaka [Wed, 1 Jul 2026 05:33:36 +0000 (08:33 +0300)] 
[3.14] gh-152502: Detect the curses mouse interface portably (GH-152705) (GH-152734)

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.14] gh-152715: Add pythoninfo-build command to Platforms/Apple (GH-152716) (#152724)
Miss Islington (bot) [Wed, 1 Jul 2026 03:18:34 +0000 (05:18 +0200)] 
[3.14] gh-152715: Add pythoninfo-build command to Platforms/Apple (GH-152716) (#152724)

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.14] gh-152711: Add pythoninfo-build command to Platforms/Android (GH-152713) ...
Miss Islington (bot) [Wed, 1 Jul 2026 03:04:24 +0000 (05:04 +0200)] 
[3.14] gh-152711: Add pythoninfo-build command to Platforms/Android (GH-152713) (#152726)

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.14] gh-152680: Detect container/VM in test.pythoninfo (GH-152668) (#152700)
Miss Islington (bot) [Tue, 30 Jun 2026 15:41:30 +0000 (17:41 +0200)] 
[3.14] gh-152680: Detect container/VM in test.pythoninfo (GH-152668) (#152700)

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.14] gh-151126: Fix a possible crash during the startup with no memory under `Py_ST...
Miss Islington (bot) [Tue, 30 Jun 2026 11:55:16 +0000 (13:55 +0200)] 
[3.14] gh-151126: Fix a possible crash during the startup with no memory under `Py_STACKREF_DEBUG` (GH-152478) (#152678)

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>