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

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

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

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

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

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

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

2 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

3 weeks agogh-152682: Remove non-functional `test_syntax.test_disallowed_type_param_names_oom...
Petr Vaganov [Wed, 1 Jul 2026 17:38:09 +0000 (22:38 +0500)] 
gh-152682: Remove non-functional `test_syntax.test_disallowed_type_param_names_oom` (#152770)

3 weeks agogh-80504: Always show the full search path in IDLE Find in Files (#152740)
Serhiy Storchaka [Wed, 1 Jul 2026 17:05:56 +0000 (20:05 +0300)] 
gh-80504: Always show the full search path in IDLE Find in Files (#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.

3 weeks agogh-134300: Remove idlelib from the path of the IDLE user process (#152739)
Serhiy Storchaka [Wed, 1 Jul 2026 16:35:57 +0000 (19:35 +0300)] 
gh-134300: Remove idlelib from the path of the IDLE user process (#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".

3 weeks agogh-89360: Fix ValueError in IDLE MultiCall event_delete (#152738)
Serhiy Storchaka [Wed, 1 Jul 2026 16:22:03 +0000 (19:22 +0300)] 
gh-89360: Fix ValueError in IDLE MultiCall event_delete (#152738)

Deleting a key binding for a sequence not bound to the virtual event no
longer raises a ValueError; the discrepancy is now ignored.

3 weeks agogh-71956: Fix IDLE Replace All searching up without wrap around (#152737)
Serhiy Storchaka [Wed, 1 Jul 2026 15:55:43 +0000 (18:55 +0300)] 
gh-71956: Fix IDLE Replace All searching up without wrap around (#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.

3 weeks agogh-66331: Set correct WM_CLASS on X11 for IDLE windows (#152733)
Serhiy Storchaka [Wed, 1 Jul 2026 15:10:49 +0000 (18:10 +0300)] 
gh-66331: Set correct WM_CLASS on X11 for IDLE windows (#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.

3 weeks agoUse tk_scaling() instead of a raw Tcl call in IDLE and tkinter tests (#152788)
Terry Jan Reedy [Wed, 1 Jul 2026 15:08:37 +0000 (11:08 -0400)] 
Use tk_scaling() instead of a raw Tcl call in IDLE and tkinter tests (#152788)

Replace `tk.call('tk', 'scaling')` with `tk_scaling()`, which
returns a float, in idlelib.util and test_tkinter.widget_tests.

Co-authored-by: serhiy-storchaka
3 weeks agoGH-148874: Make sure that mngr.__exit__() is always called in a with statement (GH...
Mark Shannon [Wed, 1 Jul 2026 14:15:33 +0000 (15:15 +0100)] 
GH-148874: Make sure that mngr.__exit__() is always called in a with statement (GH-150911)

* Even if there is an interrupt during the call to mngr.__enter__()

3 weeks agoFix copy paste error with Py_mod_state_traverse (GH-152776)
Petr Viktorin [Wed, 1 Jul 2026 12:22:34 +0000 (14:22 +0200)] 
Fix copy paste error with Py_mod_state_traverse (GH-152776)

Co-authored-by: hydrogen-mvm <hydrogen-mvm@users.noreply.github.com>
3 weeks agogh-144473: Add "steal" term to glossary; clarify "stealing" on error (GH-144502)
Petr Viktorin [Wed, 1 Jul 2026 11:47:00 +0000 (13:47 +0200)] 
gh-144473: Add "steal" term to glossary; clarify "stealing" on error (GH-144502)

With one exception, all "stealing" functions also steal on error,
but it makes sense to note this in each case.

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
3 weeks agoBump the `actions/{github-script,checkout}` and `j178/prek-action` actions (#152760)
dependabot[bot] [Wed, 1 Jul 2026 11:36:43 +0000 (11:36 +0000)] 
Bump the `actions/{github-script,checkout}` and `j178/prek-action` actions (#152760)

Bumps the actions group with 3 updates: [actions/github-script](https://github.com/actions/github-script), [actions/checkout](https://github.com/actions/checkout) and [j178/prek-action](https://github.com/j178/prek-action).

Updates `actions/github-script` from 8.0.0 to 9.0.0
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/ed597411d8f924073f98dfc5c65a23a2325f34cd...3a2844b7e9c422d3c10d287c895573f7108da1b3)

Updates `actions/checkout` from 6.0.2 to 7.0.0
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/de0fac2e4500dabe0009e67214ff5f5447ce83dd...9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0)

Updates `j178/prek-action` from 1.1.1 to 2.0.4
- [Release notes](https://github.com/j178/prek-action/releases)
- [Commits](https://github.com/j178/prek-action/compare/0bb87d7f00b0c99306c8bcb8b8beba1eb581c037...bdca6f102f98e2b4c7029491a53dfd366469e33d)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: j178/prek-action
  dependency-version: 2.0.4
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 weeks agoUse `@force_not_colorized` in `test_syntactical_future_repl` (#152749)
Shahar Naveh [Wed, 1 Jul 2026 11:20:38 +0000 (14:20 +0300)] 
Use `@force_not_colorized` in `test_syntactical_future_repl` (#152749)

3 weeks agoBump `hypothesis` from `6.151.9` to `6.155.3` in `Tools/requirements-hypothesis.txt...
dependabot[bot] [Wed, 1 Jul 2026 10:14:23 +0000 (12:14 +0200)] 
Bump `hypothesis` from `6.151.9` to `6.155.3` in `Tools/requirements-hypothesis.txt` (#152758)

Bumps [hypothesis](https://github.com/HypothesisWorks/hypothesis) from 6.151.9 to 6.155.3.
- [Release notes](https://github.com/HypothesisWorks/hypothesis/releases)
- [Commits](https://github.com/HypothesisWorks/hypothesis/compare/hypothesis-python-6.151.9...v6.155.3)

---
updated-dependencies:
- dependency-name: hypothesis
  dependency-version: 6.155.3
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 weeks agogh-152157: Reject empty fractions in `_datetime.{date}time.fromisoformat` (#152161)
tonghuaroot (童话) [Wed, 1 Jul 2026 09:54:02 +0000 (17:54 +0800)] 
gh-152157: Reject empty fractions in `_datetime.{date}time.fromisoformat` (#152161)

Co-authored-by: Stan Ulbrych <stan@python.org>
3 weeks agogh-133031: Fix test_textbox_unicode on a narrow build (GH-152750)
Serhiy Storchaka [Wed, 1 Jul 2026 08:43:19 +0000 (11:43 +0300)] 
gh-133031: Fix test_textbox_unicode on a narrow build (GH-152750)

A narrow build stores one byte per cell, so skip the multi-byte cases there,
as already done for test_textbox_edit_wide.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
3 weeks agogh-151626: Fix tests that fail when PYTHONPYCACHEPREFIX is set (GH-151952)
Jiucheng(Oliver) [Wed, 1 Jul 2026 05:31:43 +0000 (01:31 -0400)] 
gh-151626: Fix tests that fail when PYTHONPYCACHEPREFIX is set (GH-151952)

Fix tests in test_compileall, test_import, test_importlib, test_py_compile, and test_inspect to neutralize PYTHONPYCACHEPREFIX

3 weeks agogh-152728: IDLE - move 3 toplevel fix_xyz functions to idlelb.util (#152729)
Terry Jan Reedy [Wed, 1 Jul 2026 04:58:39 +0000 (00:58 -0400)] 
gh-152728: IDLE - move 3 toplevel fix_xyz functions to idlelb.util (#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.

3 weeks agogh-152711: Add pythoninfo-build command to Platforms/Android (#152713)
Victor Stinner [Wed, 1 Jul 2026 03:00:03 +0000 (05:00 +0200)] 
gh-152711: Add pythoninfo-build command to Platforms/Android (#152713)

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

3 weeks agogh-152715: Add pythoninfo-build command to Platforms/Apple (#152716)
Victor Stinner [Wed, 1 Jul 2026 02:59:42 +0000 (04:59 +0200)] 
gh-152715: Add pythoninfo-build command to Platforms/Apple (#152716)

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

3 weeks agogh-152433: Windows: enable mmapmodule for UWP (#152473)
thexai [Tue, 30 Jun 2026 20:49:01 +0000 (22:49 +0200)] 
gh-152433: Windows: enable mmapmodule for UWP (#152473)

3 weeks agogh-152433: Windows: use GetFileSizeEx instead of GetFileSize for memory mapped files...
thexai [Tue, 30 Jun 2026 20:35:44 +0000 (22:35 +0200)] 
gh-152433: Windows: use GetFileSizeEx instead of GetFileSize for memory mapped files (#152383)

3 weeks agoGH-81881: Raise `SpecialFileError` for sockets and devices in `shutil.copyfile` ...
Savannah Ostrowski [Tue, 30 Jun 2026 19:50:41 +0000 (12:50 -0700)] 
GH-81881: Raise `SpecialFileError` for sockets and devices in `shutil.copyfile` (#142693)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Senthil Kumaran <senthil@python.org>