]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 weeks agogh-86017: Document displayof for Font.actual() and clarify Font.copy() (GH-153288)
Serhiy Storchaka [Wed, 8 Jul 2026 12:00:15 +0000 (15:00 +0300)] 
gh-86017: Document displayof for Font.actual() and clarify Font.copy() (GH-153288)

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

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-66788: Add the utf-7-imap codec (GH-153149)
Serhiy Storchaka [Wed, 8 Jul 2026 11:55:27 +0000 (14:55 +0300)] 
gh-66788: Add the utf-7-imap codec (GH-153149)

Implement the modified UTF-7 encoding used for international IMAP4
mailbox names (RFC 3501, section 5.1.3).  It differs from UTF-7:
"&" is the shift character ("&-" encodes a literal "&"), "," replaces
"/" in the Base64 alphabet, and all non-printable-ASCII characters are
Base64-encoded.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2 weeks agogh-150191: temporarily skip two openssl tests which have internal data races under...
Kumar Aditya [Wed, 8 Jul 2026 11:48:38 +0000 (17:18 +0530)] 
gh-150191: temporarily skip two openssl tests which have internal data races under TSAN (#153320)

2 weeks agogh-88574: Do not swallow the line after a terminating literal in imaplib (GH-153317)
Serhiy Storchaka [Wed, 8 Jul 2026 11:45:58 +0000 (14:45 +0300)] 
gh-88574: Do not swallow the line after a terminating literal in imaplib (GH-153317)

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.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-149740: Remove redundant self.empty() check in asyncio.Queue.get() (#149741)
Timofei [Wed, 8 Jul 2026 10:15:18 +0000 (13:15 +0300)] 
gh-149740: Remove redundant self.empty() check in asyncio.Queue.get() (#149741)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2 weeks agogh-153292: Fix data race in `threading.RLock.__repr__` in FT builds (#153299)
sobolevn [Wed, 8 Jul 2026 09:41:38 +0000 (12:41 +0300)] 
gh-153292: Fix data race in `threading.RLock.__repr__` in FT builds (#153299)

2 weeks agogh-150358: Remove unused _complete_fut attribute from asyncio.StreamWriter (#150359)
Timofei [Wed, 8 Jul 2026 09:24:24 +0000 (12:24 +0300)] 
gh-150358: Remove unused _complete_fut attribute from asyncio.StreamWriter (#150359)

2 weeks agogh-143990: Preserve the size when creating a Font from a named font (GH-153267)
Serhiy Storchaka [Wed, 8 Jul 2026 08:30:12 +0000 (11:30 +0300)] 
gh-143990: Preserve the size when creating a Font from a named font (GH-153267)

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.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-153056: Fix a data race compiling the string.Template pattern in free-threading...
tonghuaroot (童话) [Wed, 8 Jul 2026 00:40:54 +0000 (08:40 +0800)] 
gh-153056: Fix a data race compiling the string.Template pattern in free-threading builds (#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

---------

Co-authored-by: Barry Warsaw <barry@python.org>
2 weeks agogh-152586: Make `tempfile.TemporaryFileWrapper` public (#152646)
Aniket [Tue, 7 Jul 2026 21:34:16 +0000 (03:04 +0530)] 
gh-152586: Make `tempfile.TemporaryFileWrapper` public (#152646)

Deprecate old compatibility `tempfile._TemporaryFileWrapper` name, schedule it to be removed in Python 3.21

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2 weeks agogh-153133: Fix socket leak in error path of asyncio create_connection (#153134)
Timofei [Tue, 7 Jul 2026 19:23:17 +0000 (22:23 +0300)] 
gh-153133: Fix socket leak in error path of asyncio create_connection (#153134)

2 weeks agogh-153252: Fix error handling in `_PyCompile_CodeGen` (#153253)
sobolevn [Tue, 7 Jul 2026 16:41:05 +0000 (19:41 +0300)] 
gh-153252: Fix error handling in `_PyCompile_CodeGen` (#153253)

2 weeks agoOn Unix, avoid a conversion to wchar_t in getpath.c (#153230)
Victor Stinner [Tue, 7 Jul 2026 16:28:05 +0000 (18:28 +0200)] 
On Unix, avoid a conversion to wchar_t in getpath.c (#153230)

* Replace _Py_wstat() with _Py_stat() in isfile() and isxfile().
* Replace _Py_wfopen() with Py_fopen() in readlines().

2 weeks agogh-152798: update sys.thread_info.lock documentation to match implementation (#153263)
Wojusensei [Tue, 7 Jul 2026 16:13:35 +0000 (00:13 +0800)] 
gh-152798: update sys.thread_info.lock documentation to match implementation (#153263)

2 weeks agogh-153210: Restore accidental `array.ArrayType` removal (#153261)
sobolevn [Tue, 7 Jul 2026 16:09:02 +0000 (19:09 +0300)] 
gh-153210: Restore accidental `array.ArrayType` removal (#153261)

2 weeks agogh-153205: Set `MemoryError` in stackref array conversion (#153206)
An Long [Tue, 7 Jul 2026 16:03:34 +0000 (01:03 +0900)] 
gh-153205: Set `MemoryError` in stackref array conversion (#153206)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2 weeks agogh-150191: Avoid data race in test_sni_callback_race (#150193)
Sam Gross [Tue, 7 Jul 2026 15:52:00 +0000 (11:52 -0400)] 
gh-150191: Avoid data race in test_sni_callback_race (#150193)

2 weeks agoTemporarily allow the TSan (free-threading) job to fail (#152173)
Stan Ulbrych [Tue, 7 Jul 2026 14:59:57 +0000 (16:59 +0200)] 
Temporarily allow the TSan (free-threading) job to fail (#152173)

2 weeks agogh-143990: Allow tkinter.font.Font to wrap a font description (GH-152025)
Serhiy Storchaka [Tue, 7 Jul 2026 09:37:04 +0000 (12:37 +0300)] 
gh-143990: Allow tkinter.font.Font to wrap a font description (GH-152025)

With exists=True and no name, Font now wraps the font description as is,
without creating a new named font, so that it is used without loss of
precision by actual(), measure() and metrics().  Its name attribute is then
the description rather than a string.  Keyword options now override the
corresponding settings of the given font instead of being ignored.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-153227: Use a development version of Pygments (#153228)
Peter Bierma [Tue, 7 Jul 2026 09:08:34 +0000 (05:08 -0400)] 
gh-153227: Use a development version of Pygments (#153228)

2 weeks agogh-153210: Fix `array` module import crash under a memory pressure (#153238)
sobolevn [Tue, 7 Jul 2026 08:25:30 +0000 (11:25 +0300)] 
gh-153210: Fix `array` module import crash under a memory pressure (#153238)

2 weeks agogh-145177: Update Emscripten to 6.0.2 (#153235)
Hood Chatham [Mon, 6 Jul 2026 23:54:16 +0000 (16:54 -0700)] 
gh-145177: Update Emscripten to 6.0.2 (#153235)

Removes the patched `getentropy()` call since it has been included upstream.

2 weeks agogh-140729: Fix the cProfile module when the executed script contains calls to multipr...
Duprat [Mon, 6 Jul 2026 23:39:06 +0000 (01:39 +0200)] 
gh-140729: Fix the cProfile module when the executed script contains calls to multiprocessing.Process (#144715)

Co-authored-by: Pablo Galindo Salgado <pablogsal@gmail.com>
2 weeks agogh-153068: Preserve cprofile enable errors (#153070)
An Long [Mon, 6 Jul 2026 23:36:26 +0000 (08:36 +0900)] 
gh-153068: Preserve cprofile enable errors (#153070)

2 weeks agogh-150479: reject CR and LF in email.utils.formataddr (#150480)
metsw24-max [Mon, 6 Jul 2026 20:16:43 +0000 (01:46 +0530)] 
gh-150479: reject CR and LF in email.utils.formataddr (#150480)

2 weeks agogh-150490: Raise PyType_Modified for insertion into split dictionary (take 2) (#152914)
Dino Viehland [Mon, 6 Jul 2026 19:56:32 +0000 (12:56 -0700)] 
gh-150490: Raise PyType_Modified for insertion into split dictionary (take 2) (#152914)

Raise PyType_Modified for insertion into split dictionary - now with better locking discipline in free-threaded builds

2 weeks agoSeed pip caches for docs on `main`/`3.x` branches (#153127)
Hugo van Kemenade [Mon, 6 Jul 2026 19:46:22 +0000 (22:46 +0300)] 
Seed pip caches for docs on `main`/`3.x` branches (#153127)

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

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.

2 weeks agogh-150880: Clarify DirEntry.path construction semantics (GH-153218)
Zain Nadeem [Mon, 6 Jul 2026 17:14:28 +0000 (22:14 +0500)] 
gh-150880: Clarify DirEntry.path construction semantics (GH-153218)

2 weeks agogh-152433: Allow _ssl module to build for Windows UWP API set (GH-152791)
thexai [Mon, 6 Jul 2026 16:32:36 +0000 (18:32 +0200)] 
gh-152433: Allow _ssl module to build for Windows UWP API set (GH-152791)

2 weeks agogh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717)
Victor Stinner [Mon, 6 Jul 2026 15:44:21 +0000 (17:44 +0200)] 
gh-152785: Upgrade Ubuntu from 24.04 to 26.04 in GitHub Actions (#152717)

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

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks agoDocs: Link to the `contextlib.chdir` context manager in the `os.chdir` docs (#153152)
Cody Maloney [Mon, 6 Jul 2026 15:40:45 +0000 (08:40 -0700)] 
Docs: Link to the `contextlib.chdir` context manager in the `os.chdir` docs (#153152)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks agogh-152849: Fix `OverflowError` message for out-of-range timestamps in the `time`...
tonghuaroot (童话) [Mon, 6 Jul 2026 14:50:15 +0000 (22:50 +0800)] 
gh-152849: Fix `OverflowError` message for out-of-range timestamps in the `time` module (#152850)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks agogh-148286: Remove invalid test in `test_decodeescape` (#153187)
Stan Ulbrych [Mon, 6 Jul 2026 14:47:55 +0000 (16:47 +0200)] 
gh-148286: Remove invalid test in `test_decodeescape` (#153187)

2 weeks agogh-145098: Use `macos-26[-intel]` instead of `macos-15[-intel]` in `{jit,tail-call...
Hugo van Kemenade [Mon, 6 Jul 2026 14:25:32 +0000 (17:25 +0300)] 
gh-145098: Use `macos-26[-intel]` instead of `macos-15[-intel]` in `{jit,tail-call}.yml` (#153194)

2 weeks agoAdd tests for syntax error messages that had no test coverage (GH-153192)
Serhiy Storchaka [Mon, 6 Jul 2026 13:49:17 +0000 (16:49 +0300)] 
Add tests for syntax error messages that had no test coverage (GH-153192)

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

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks agogh-153171: Produce specialized syntax errors for 'not' after an operator in more...
Serhiy Storchaka [Mon, 6 Jul 2026 10:00:05 +0000 (13:00 +0300)] 
gh-153171: Produce specialized syntax errors for 'not' after an operator in more positions (GH-153175)

Move the invalid_factor rule from term to factor and the
invalid_arithmetic rule from shift_expr to sum, so that they are
tried at all positions where the invalid construct can occur.
Previously a generic "invalid syntax" error was reported for
constructs like "1 << 2 + not x" or "1 * + not x".

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks agogh-145855: Remove the DELETE_ATTR bytecode (GH-146216)
An Long [Mon, 6 Jul 2026 09:41:47 +0000 (18:41 +0900)] 
gh-145855: Remove the DELETE_ATTR bytecode (GH-146216)

2 weeks agogh-148765: Fix description of *include_hidden* parameter in `glob.glob()` docs (...
Eoin Shaughnessy [Mon, 6 Jul 2026 07:44:48 +0000 (08:44 +0100)] 
gh-148765: Fix description of *include_hidden* parameter in `glob.glob()` docs (#148768)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks agogh-152026: Track mark-saving contexts with a counter (GH-153160)
Serhiy Storchaka [Mon, 6 Jul 2026 05:22:37 +0000 (08:22 +0300)] 
gh-152026: Track mark-saving contexts with a counter (GH-153160)

Replace the state->repeat checks that guard mark saving and restoring
with an explicit save_marks counter maintained where repeat and
possessive contexts are entered and left.  Each push is now paired
with a pop decided by the same condition.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-82151: Update and improve urlsplit docstring (#152985)
Pranav Choudhary [Mon, 6 Jul 2026 03:19:17 +0000 (08:49 +0530)] 
gh-82151: Update and improve urlsplit docstring (#152985)

* gh-82151: Update and improve urlsplit docstring

Co-authored-by: idomic <michael.ido@gmail.com>
* Slightly improved wording for % escapes. Consistent with rest of the doc.

---------

Co-authored-by: idomic <michael.ido@gmail.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>
2 weeks agogh-151640: Track sharing of `BytesIO` buffer in free-threaded builds (GH-151651)
Pedram Karimi [Mon, 6 Jul 2026 01:17:20 +0000 (04:47 +0330)] 
gh-151640: Track sharing of `BytesIO` buffer in free-threaded builds (GH-151651)

2 weeks agobpo-45706: Add imaplib.IMAP4.login_plain (GH-29398)
Przemysław Buczkowski [Sun, 5 Jul 2026 21:26:44 +0000 (06:26 +0900)] 
bpo-45706: Add imaplib.IMAP4.login_plain (GH-29398)

Adds authentication using PLAIN SASL mechanism.

This is a plain-text authentication mechanism which can be used
instead of IMAP4.login() when UTF-8 support is required.

2 weeks agogh-153141: Fix mutable default argument in _SharedMemoryTracker.__init__ (GH-153142)
Vineet Kumar [Sun, 5 Jul 2026 19:02:58 +0000 (00:32 +0530)] 
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.

2 weeks agogh-98092: Add imaplib.IMAP4.id method (GH-153136)
Serhiy Storchaka [Sun, 5 Jul 2026 17:32:32 +0000 (20:32 +0300)] 
gh-98092: Add imaplib.IMAP4.id method (GH-153136)

Add a wrapper for the IMAP ID command (RFC 2971).  It takes a mapping
of field names to values and returns the server identification
information from the untagged ID response.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks agogh-105708: 'V' could be case insensitive for IPvFuture hostnames (#105709)
Chandra [Sun, 5 Jul 2026 17:08:28 +0000 (12:08 -0500)] 
gh-105708: 'V' could be case insensitive for IPvFuture hostnames (#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.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>
2 weeks agogh-77508: Add imaplib.IMAP4.move method (GH-153121)
Serhiy Storchaka [Sun, 5 Jul 2026 17:02:45 +0000 (20:02 +0300)] 
gh-77508: Add imaplib.IMAP4.move method (GH-153121)

Add a wrapper for the IMAP MOVE command (RFC 6851), analogous to
copy().  The arguments of MOVE and UID MOVE are quoted when necessary.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 weeks agogh-60055: Allow passing a Request instance for RobotParser URLs (#103753)
Andrew James [Sun, 5 Jul 2026 15:57:09 +0000 (01:57 +1000)] 
gh-60055: Allow passing a Request instance for RobotParser URLs (#103753)

* Allow passing a Request instance for the url parameter

* 📜🤖 Added by blurb_it.

* gh-60055: rebase onto main and document Request support

* Fix the lint warnings and CI Errors.

* Addressing RobotFileParser review comments.

* Update Doc/library/urllib.robotparser.rst

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Address additional Review Comments.

* Changed versionchanged to next.

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 weeks agogh-143921: Narrow the control character check in imaplib commands (GH-153067)
Serhiy Storchaka [Sun, 5 Jul 2026 15:25:36 +0000 (18:25 +0300)] 
gh-143921: Narrow the control character check in imaplib commands (GH-153067)

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

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks agogh-68147: Fix RFC references in imaplib (GH-153126)
Serhiy Storchaka [Sun, 5 Jul 2026 14:08:58 +0000 (17:08 +0300)] 
gh-68147: Fix RFC references in imaplib (GH-153126)

Refer to RFC 3501, which obsoleted RFC 2060.  "]" is disallowed
in flags, not in tags.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks agogh-149930: Clarify imaplib response helper types (GH-149963)
Savage Mechanic [Sun, 5 Jul 2026 13:16:54 +0000 (14:16 +0100)] 
gh-149930: Clarify imaplib response helper types (GH-149963)

Co-authored-by: savagemechanic <20458938+savagemechanic@users.noreply.github.com>
2 weeks agogh-43699: Defer the drag cursor in tkinter.dnd until the pointer moves (GH-152371)
Serhiy Storchaka [Sun, 5 Jul 2026 12:49:43 +0000 (15:49 +0300)] 
gh-43699: Defer the drag cursor in tkinter.dnd until the pointer moves (GH-152371)

The drag cursor is now changed only once the pointer starts moving past
a small threshold rather than on the initial button press, so that a
plain click no longer flashes it.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-59396: Use themed widgets in tkinter.filedialog (GH-152036)
Serhiy Storchaka [Sun, 5 Jul 2026 11:27:51 +0000 (14:27 +0300)] 
gh-59396: Use themed widgets in tkinter.filedialog (GH-152036)

The FileDialog, LoadFileDialog and SaveFileDialog dialogs are now built from
the themed tkinter.ttk widgets by default instead of the classic tkinter
widgets, and gained a use_ttk parameter that selects between the classic Tk
widgets and the themed ttk widgets.

They were also brought closer to the native Tk file dialog: the buttons and
field labels gained Alt key accelerators, the default ring follows the keyboard
focus, the Escape key cancels the dialog, the focus traverses the widgets in
their visual order, and the directory and file lists gained a horizontal
scrollbar and type-ahead selection.  The dialog is now transient and centered
over its parent, and the SaveFileDialog overwrite confirmation uses a themed
message box.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agoFix minor typos in 'Compound statements' docs (#149666)
Jonathan Dung [Sun, 5 Jul 2026 11:23:49 +0000 (19:23 +0800)] 
Fix minor typos in 'Compound statements' docs (#149666)

Co-authored-by: Stan Ulbrych <stan@python.org>
2 weeks agogh-76607: Improve documentation of the tkinter cursor option (GH-152481)
Serhiy Storchaka [Sun, 5 Jul 2026 11:13:52 +0000 (14:13 +0300)] 
gh-76607: Improve documentation of the tkinter cursor option (GH-152481)

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

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-79638: Restore "Treat an unreachable robots.txt as disallow all" (GH-152525)
Serhiy Storchaka [Sun, 5 Jul 2026 11:13:01 +0000 (14:13 +0300)] 
gh-79638: Restore "Treat an unreachable robots.txt as disallow all" (GH-152525)

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.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 weeks agogh-75952: Document negative offsets in tkinter geometry strings (GH-152531)
Serhiy Storchaka [Sun, 5 Jul 2026 11:07:49 +0000 (14:07 +0300)] 
gh-75952: Document negative offsets in tkinter geometry strings (GH-152531)

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.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-123193: Document tkinter Variable lifetime (GH-152625)
Serhiy Storchaka [Sun, 5 Jul 2026 11:07:12 +0000 (14:07 +0300)] 
gh-123193: Document tkinter Variable lifetime (GH-152625)

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.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks ago Fix various typos in the `http.server` docs (#153089)
Bénédikt Tran [Sun, 5 Jul 2026 10:58:53 +0000 (12:58 +0200)] 
 Fix various typos in the `http.server` docs (#153089)

2 weeks agogh-69134: Wait until mapped in SimpleDialog keyboard tests (GH-152690)
Serhiy Storchaka [Sun, 5 Jul 2026 10:51:34 +0000 (13:51 +0300)] 
gh-69134: Wait until mapped in SimpleDialog keyboard tests (GH-152690)

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 each of
these tests, as GH-152599 did for the other keyboard tests.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-54930: Send a status line in error responses to malformed request lines (GH-152980)
Serhiy Storchaka [Sun, 5 Jul 2026 10:48:23 +0000 (13:48 +0300)] 
gh-54930: Send a status line in error responses to malformed request lines (GH-152980)

Previously such error responses were sent in the bare HTTP/0.9 style,
without a status line and headers.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2 weeks agogh-151945: fix Sphinx reference warnings in `http.server` docs (#153084)
Bénédikt Tran [Sun, 5 Jul 2026 09:25:30 +0000 (11:25 +0200)] 
gh-151945: fix Sphinx reference warnings in `http.server` docs (#153084)

2 weeks agogh-66335: Test uppercase IMAP4 command names (GH-152876)
Serhiy Storchaka [Sun, 5 Jul 2026 08:08:15 +0000 (11:08 +0300)] 
gh-66335: Test uppercase IMAP4 command names (GH-152876)

Co-authored-by: Milan Oberkirch <zvyn@oberkirch.org>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 weeks agogh-151819: Clarify the conditional-pattern email example in re docs (GH-153072)
Serhiy Storchaka [Sun, 5 Jul 2026 07:48:02 +0000 (10:48 +0300)] 
gh-151819: Clarify the conditional-pattern email example in re docs (GH-153072)

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.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2 weeks agogh-40038: Quote imaplib command arguments when necessary (GH-152703)
Serhiy Storchaka [Sun, 5 Jul 2026 06:12:58 +0000 (09:12 +0300)] 
gh-40038: Quote imaplib command arguments when necessary (GH-152703)

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.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2 weeks agoRemove PDF images (#145977)
Stan Ulbrych [Sun, 5 Jul 2026 05:43:32 +0000 (07:43 +0200)] 
Remove PDF images (#145977)

Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
2 weeks agoAdd "new in 3.15" comments to idlelib (#153052)
Terry Jan Reedy [Sun, 5 Jul 2026 01:56:20 +0000 (21:56 -0400)] 
Add "new in 3.15" comments to idlelib (#153052)

Lazy keyword added to colorizer and test in PR-#142351.
Tested NameError hint expanded in PR-#144299.

2 weeks agoAdd "new in 3.16" to idlelib line (GH-152788) (#153049)
Terry Jan Reedy [Sat, 4 Jul 2026 23:39:11 +0000 (19:39 -0400)] 
Add "new in 3.16" to idlelib line (GH-152788) (#153049)

util (line 27): root.tk_scaling method is new in 3.16.
This should have been included in PR-#152788.

2 weeks agogh-152718: Reject oversized table counts in the profiling binary reader (#152719)
tonghuaroot (童话) [Sat, 4 Jul 2026 22:56:09 +0000 (06:56 +0800)] 
gh-152718: Reject oversized table counts in the profiling binary reader (#152719)

2 weeks agogh-151378: Fix unbounded memory growth when recording binary and the thread is sleepi...
Maurycy Pawłowski-Wieroński [Sat, 4 Jul 2026 19:03:01 +0000 (21:03 +0200)] 
gh-151378: Fix unbounded memory growth when recording binary and the thread is sleeping (#152089)

2 weeks agogh-153030: Fix quadratic complexity in incremental parsing in HTMLParser (GH-153031)
Serhiy Storchaka [Sat, 4 Jul 2026 17:40:22 +0000 (20:40 +0300)] 
gh-153030: Fix quadratic complexity in incremental parsing in HTMLParser (GH-153031)

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.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-151945: Fix all reference warnings and various solecisms in the `http.cookiejar...
Harjoth Khara [Sat, 4 Jul 2026 15:03:08 +0000 (08:03 -0700)] 
gh-151945: Fix all reference warnings and various solecisms in the `http.cookiejar` docs (#152816)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks agogh-150459: Fix `SyntaxError` message for `from x lazy import y` (#150877)
sobolevn [Sat, 4 Jul 2026 13:17:58 +0000 (16:17 +0300)] 
gh-150459: Fix `SyntaxError` message for `from x lazy import y` (#150877)

3 weeks agogh-152068: Reset PyREPL Colors on prompt finish (#152108)
Eduardo Villalpando Mello [Sat, 4 Jul 2026 13:16:02 +0000 (06:16 -0700)] 
gh-152068: Reset PyREPL Colors on prompt finish (#152108)

* Use ANSI Escape Codes from Colorize

* Print ANSI Color reset on finish and restore

* 📜🤖 Added by blurb_it.

* Update imports

* Update Misc/NEWS.d/next/macOS/2026-06-24-18-00-39.gh-issue-152068.ThsmJU.rst

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* Remove news entry

* 📜🤖 Added by blurb_it.

* gh-152068: Test ANSI reset is emitted on console finish() and restore()

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3 weeks agogh-135661: Fix abrupt closing of empty comment in HTMLParser (GH-153007)
Serhiy Storchaka [Sat, 4 Jul 2026 12:05:07 +0000 (15:05 +0300)] 
gh-135661: Fix abrupt closing of empty comment in HTMLParser (GH-153007)

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.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-153009: Fix compilation of `curses` on platforms that define the `stdscr` macro...
Bénédikt Tran [Sat, 4 Jul 2026 10:21:16 +0000 (12:21 +0200)] 
gh-153009: Fix compilation of `curses` on platforms that define the `stdscr` macro (#153010)

3 weeks agogh-152851: fix a crash when copying a BLAKE-2s/2b object (#153008)
Bénédikt Tran [Sat, 4 Jul 2026 10:09:42 +0000 (12:09 +0200)] 
gh-152851: fix a crash when copying a BLAKE-2s/2b object (#153008)

3 weeks agogh-151646: Fix data race between gc.get_stats() and GC in free-threading builds ...
Jiucheng(Oliver) [Sat, 4 Jul 2026 02:07:29 +0000 (22:07 -0400)] 
gh-151646: Fix data race between gc.get_stats() and GC in free-threading builds (gh-151766)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-83386: Enable test_hang_gh83386 for ProcessPoolExecutor (GH-152976)
Gregory P. Smith [Fri, 3 Jul 2026 21:01:58 +0000 (14:01 -0700)] 
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.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
3 weeks agogh-151644: Fix data race in sys.setdlopenflags/getdlopenflags under free-threading...
Jiucheng(Oliver) [Fri, 3 Jul 2026 20:19:09 +0000 (16:19 -0400)] 
gh-151644: Fix data race in sys.setdlopenflags/getdlopenflags under free-threading (gh-151768)

In free-threading builds, concurrent calls to sys.getdlopenflags() and
sys.setdlopenflags() race on interp->imports.dlopenflags.  Fix by
using FT_ATOMIC_LOAD_INT_RELAXED / FT_ATOMIC_STORE_INT_RELAXED in
_PyImport_GetDLOpenFlags and _PyImport_SetDLOpenFlags, consistent with
how analogous interpreter-state integer fields (lazy_imports_mode,
pystats_enabled) are protected.

Relaxed ordering is correct here: dlopenflags is a standalone config
integer with no ordering relationship to other memory.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
3 weeks agogh-150579: use lazy imports for concurrent.futures (GH-150585)
Henry Schreiner [Fri, 3 Jul 2026 18:11:16 +0000 (14:11 -0400)] 
gh-150579: use lazy imports for concurrent.futures (GH-150585)

This module has a manual lazy import hack using `__getattr__`. Now that lazy imports exist and cannot be disabled, this could use lazy imports instead.

Key differences: this will now show up in sys.lazy_modules when accessed. Error messages should be a bit better without the wrapper `__getattr__` involved.  That's the only differences I can think of.

Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 weeks agogh-152951 - Fix double DECREF when `newblock` fails during deque.extend calls (#152961)
Steve Stagg [Fri, 3 Jul 2026 17:43:24 +0000 (18:43 +0100)] 
gh-152951 - Fix double DECREF when `newblock` fails during deque.extend calls (#152961)

3 weeks agogh-150880: Normalize paths on Windows before appending wildcard (GH-152906)
Zain Nadeem [Fri, 3 Jul 2026 15:30:02 +0000 (20:30 +0500)] 
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.

3 weeks agogh-152066: Merge `_GUARD_DORV_VALUES_INST_ATTR_FROM_DICT` into `_CHECK_MANAGED_OBJECT...
Aniket [Fri, 3 Jul 2026 13:22:17 +0000 (18:52 +0530)] 
gh-152066: Merge `_GUARD_DORV_VALUES_INST_ATTR_FROM_DICT` into `_CHECK_MANAGED_OBJECT_HAS_VALUES` (GH-152231)

3 weeks agogh-152785: Upgrade LLVM to LLVM 21 in GitHub Action jobs (#152781)
Victor Stinner [Fri, 3 Jul 2026 11:44:24 +0000 (13:44 +0200)] 
gh-152785: Upgrade LLVM to LLVM 21 in GitHub Action jobs (#152781)

Upgrade LLVM to LLVM 21 in GitHub Action jobs:

* Reusable Sanitizer
* Reusable Ubuntu ("Install Clang and BOLT")

3 weeks agogh-152903: Change PCWSTR to PWSTR in GetThreadDescription() typedef (#152904)
Carlo Bramini [Fri, 3 Jul 2026 11:05:43 +0000 (13:05 +0200)] 
gh-152903: Change PCWSTR to PWSTR in GetThreadDescription() typedef (#152904)

Fixes issue #152903

3 weeks agogh-152870: Fix compile error with decimal when EXTRA_FUNCTIONALITY enabled (#152871)
Xiaowei Lu [Fri, 3 Jul 2026 10:34:15 +0000 (18:34 +0800)] 
gh-152870: Fix compile error with decimal when EXTRA_FUNCTIONALITY enabled (#152871)

3 weeks agogh-150641: Fix evaluating forward references in STRING format can 'leak' internal...
Ivy Xu [Fri, 3 Jul 2026 08:42:06 +0000 (16:42 +0800)] 
gh-150641: Fix evaluating forward references in STRING format can 'leak' internal names in `typing` (#150648)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 weeks agogh-152919: Ensure nuget.org source exist before python install (GH-152919)
Bart van der Braak [Fri, 3 Jul 2026 08:27:56 +0000 (10:27 +0200)] 
gh-152919: Ensure nuget.org source exist before python install (GH-152919)

Ensure `nuget.org` source exist before `python` install

3 weeks agogh-115634: Fix ProcessPoolExecutor deadlock with max_tasks_per_child (GH-140900)
Gregory P. Smith [Fri, 3 Jul 2026 06:08:47 +0000 (23:08 -0700)] 
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.

3 weeks agogh-152785: Upgrade Java from 17 to 21 in GHA Android (#152783)
Victor Stinner [Fri, 3 Jul 2026 02:27:13 +0000 (04:27 +0200)] 
gh-152785: Upgrade Java from 17 to 21 in GHA Android (#152783)

Upgrade Java from 17 to 21 in GHA Android, and document the Java version
requirement.

3 weeks agogh-152847: Reject POSIX TZ rule with non-digit day-of-year in `_zoneinfo.py` (#152848)
tonghuaroot (童话) [Thu, 2 Jul 2026 18:04:53 +0000 (02:04 +0800)] 
gh-152847: Reject POSIX TZ rule with non-digit day-of-year in `_zoneinfo.py` (#152848)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks agogh-152691: tarfile -- add Windows reserved name section (GH-152701)
Zain Nadeem [Thu, 2 Jul 2026 17:57:15 +0000 (22:57 +0500)] 
gh-152691: tarfile -- add Windows reserved name section (GH-152701)

3 weeks agogh-152813: Fix curses build warning on macOS (GH-152814)
Andrii Hrimov [Thu, 2 Jul 2026 15:38:41 +0000 (17:38 +0200)] 
gh-152813: Fix curses build warning on macOS (GH-152814)

3 weeks agogh-98894: Check tracer exit status in test_dtrace (#152893)
stratakis [Thu, 2 Jul 2026 15:07:24 +0000 (17:07 +0200)] 
gh-98894: Check tracer exit status in test_dtrace (#152893)

Fail functional dtrace and SystemTap cases directly when the tracer exits
non-zero.

3 weeks agogh-86165: Fix Time2Internaldate with datetime timetuple (GH-151844)
Xiao Yuan [Thu, 2 Jul 2026 15:00:20 +0000 (18:00 +0300)] 
gh-86165: Fix Time2Internaldate with datetime timetuple (GH-151844)

3 weeks agogh-152785: Upgrade GCC from 10 to 13 in GHA Address Sanitizer (#152782)
Victor Stinner [Thu, 2 Jul 2026 14:52:28 +0000 (16:52 +0200)] 
gh-152785: Upgrade GCC from 10 to 13 in GHA Address Sanitizer (#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.

3 weeks agogh-144067: Document terminal leak when initscr() follows setupterm() (GH-152624)
Serhiy Storchaka [Thu, 2 Jul 2026 14:19:42 +0000 (17:19 +0300)] 
gh-144067: Document terminal leak when initscr() follows setupterm() (GH-152624)

The curses library keeps a single current terminal: calling initscr()
or newterm() after setupterm() abandons the terminal that setupterm()
allocated without freeing it.  This cannot be fixed safely in code
(freeing the terminal would break the capsule API and pending terminfo
queries), so document the behavior, with a cross-reference from
initscr() and newterm().

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-152789: Skip curses tests needing newterm() on ncurses before 6.5 (GH-152880)
Serhiy Storchaka [Thu, 2 Jul 2026 14:07:30 +0000 (17:07 +0300)] 
gh-152789: Skip curses tests needing newterm() on ncurses before 6.5 (GH-152880)

ncurses before 6.5 can crash on repeated newterm().  Fall back to initscr()
in TestCurses and skip ScreenTests and SLKTests, which need several screens.
The shared initscr() screen also needs its rendition and background reset
between tests.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-98894: Check readelf failures in test_dtrace (#152345)
stratakis [Thu, 2 Jul 2026 13:33:47 +0000 (15:33 +0200)] 
gh-98894: Check readelf failures in test_dtrace (#152345)

Report readelf command failures directly instead of later failing with
missing-probe assertions.