]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 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)

3 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)

3 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>
3 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)

3 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)

3 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.

3 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>
3 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)

3 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)

3 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

3 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)

3 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.

3 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)

4 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)

4 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>
4 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>
4 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>
4 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)

4 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)

4 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>
4 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>
4 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)

4 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>
4 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>
4 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>
4 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)

4 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.

4 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.

4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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>
4 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)

4 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>
4 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>
4 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)

4 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>
4 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>
4 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>
4 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>
4 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.

4 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.

4 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)

4 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)

4 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>
4 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>
4 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)

4 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>
4 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>
4 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)

4 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)

4 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>
4 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>
4 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>
4 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>
4 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)

4 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.

4 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)

4 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")

4 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

4 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)

4 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>
4 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

4 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.

4 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.

4 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>
4 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)

4 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)

4 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.

4 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)

4 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.

4 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>
4 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>
4 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.

4 weeks agogh-152680: Detect virtualization on Windows in pythoninfo (#152824)
Victor Stinner [Thu, 2 Jul 2026 13:00:51 +0000 (15:00 +0200)] 
gh-152680: Detect virtualization on Windows in pythoninfo (#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.

4 weeks agogh-88574: Skip a spurious blank line after a literal in imaplib (GH-152751)
Serhiy Storchaka [Thu, 2 Jul 2026 12:55:58 +0000 (15:55 +0300)] 
gh-88574: Skip a spurious blank line after a literal in imaplib (GH-152751)

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.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 weeks agogh-150069: Test frozen dataclass and properties interaction (#150070)
sobolevn [Thu, 2 Jul 2026 12:48:47 +0000 (15:48 +0300)] 
gh-150069: Test frozen dataclass and properties interaction (#150070)

4 weeks agogh-49680: Add translate_line_endings parameter to imaplib.IMAP4.append (GH-152775)
Serhiy Storchaka [Thu, 2 Jul 2026 11:17:37 +0000 (14:17 +0300)] 
gh-49680: Add translate_line_endings parameter to imaplib.IMAP4.append (GH-152775)

Pass False to send the message as an exact sequence of octets, without
rewriting bare CR or LF to CRLF.

Also add tests for the APPEND command, including an email message
round-trip.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: harjoth <harjoth.khara@gmail.com>
4 weeks agogh-66335: Add tests for imaplib command methods (GH-152872)
Serhiy Storchaka [Thu, 2 Jul 2026 10:14:44 +0000 (13:14 +0300)] 
gh-66335: Add tests for imaplib command methods (GH-152872)

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.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 weeks agogh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures ...
Simon Knott [Thu, 2 Jul 2026 07:50:12 +0000 (09:50 +0200)] 
gh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures (#152585)

4 weeks agogh-72507: Document that imaplib does not verify TLS certificates by default (GH-152778)
Serhiy Storchaka [Thu, 2 Jul 2026 07:19:11 +0000 (10:19 +0300)] 
gh-72507: Document that imaplib does not verify TLS certificates by default (GH-152778)

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

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 weeks agogh-79964: Clarify the imaplib fetch example in the docs (GH-152780)
Serhiy Storchaka [Thu, 2 Jul 2026 07:18:51 +0000 (10:18 +0300)] 
gh-79964: Clarify the imaplib fetch example in the docs (GH-152780)

A FETCH response may contain additional or unsolicited data, so the
message is not always data[0][1].

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 weeks agogh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768)
Serhiy Storchaka [Thu, 2 Jul 2026 07:15:13 +0000 (10:15 +0300)] 
gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768)

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.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 weeks agogh-63121: Refresh imaplib capabilities on state changes (GH-152752)
Serhiy Storchaka [Thu, 2 Jul 2026 07:10:27 +0000 (10:10 +0300)] 
gh-63121: Refresh imaplib capabilities on state changes (GH-152752)

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.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
4 weeks agogh-135142: update idlelib News3.txt for 9 issues (#152839)
Terry Jan Reedy [Thu, 2 Jul 2026 02:54:30 +0000 (22:54 -0400)] 
gh-135142: update idlelib News3.txt for 9 issues (#152839)

13 posted 2026 June 30 for various issues.
Edited one other by me.

4 weeks agogh-151763: Fix OOM-0013 crash when the parser or compiler fails to allocate (#151968)
tonghuaroot (童话) [Thu, 2 Jul 2026 00:34:16 +0000 (08:34 +0800)] 
gh-151763: Fix OOM-0013 crash when the parser or compiler fails to allocate (#151968)

4 weeks agogh-82183: Do not restart the busy IDLE shell when running without restart (#152745)
Serhiy Storchaka [Wed, 1 Jul 2026 23:00:18 +0000 (02:00 +0300)] 
gh-82183: Do not restart the busy IDLE shell when running without restart (#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.

4 weeks agogh-75595: Do not save a blank int entry in IDLE Settings (#152743)
Serhiy Storchaka [Wed, 1 Jul 2026 21:57:47 +0000 (00:57 +0300)] 
gh-75595: Do not save a blank int entry in IDLE Settings (#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.

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
4 weeks agogh-65339: Save IDLE Shell and Output windows as text by default (#152742)
Serhiy Storchaka [Wed, 1 Jul 2026 20:36:34 +0000 (23:36 +0300)] 
gh-65339: Save IDLE Shell and Output windows as text by default (#152742)

Their content is not Python source, so the Save As dialog now lists text
files first and defaults to a ".txt" extension.

4 weeks agogh-152433 Allow faulthandler.c to build for Windows UWP (GH-152688)
thexai [Wed, 1 Jul 2026 18:50:07 +0000 (20:50 +0200)] 
gh-152433 Allow faulthandler.c to build for Windows UWP (GH-152688)