Commit Graph
131873 Commits
Author SHA1 Message Date
7eb476dfbe [3.15] Add "new in 3.15" comments to idlelib (GH-153052) (#153054)
Add "new in 3.15" comments to idlelib (GH-153052)

Lazy keyword added to colorizer and test in PR-GH-142351.
Tested NameError hint expanded in PR-GH-144299.
(cherry picked from commit 0621639e8f)

Co-authored-by: Terry Jan Reedy <[email protected]>
2026-07-05 02:28:53 +00:00
41a2abe06d [3.15] gh-152718: Reject oversized table counts in the profiling binary reader (GH-152719) (#153050)
gh-152718: Reject oversized table counts in the profiling binary reader (GH-152719)
(cherry picked from commit 8e580b0685)

Co-authored-by: tonghuaroot (童话) <[email protected]>
2026-07-04 23:27:41 +00:00
9f82c25eca [3.15] gh-151378: Fix unbounded memory growth when recording binary and the thread is sleeping (GH-152089) (#153047)
gh-151378: Fix unbounded memory growth when recording binary and the thread is sleeping (GH-152089)
(cherry picked from commit 639a5525fb)

Co-authored-by: Maurycy Pawłowski-Wieroński <[email protected]>
2026-07-04 19:34:15 +00:00
960e152bf6 [3.15] gh-151945: Fix all reference warnings and various solecisms in the http.cookiejar docs (GH-152816) (#153032)
(cherry picked from commit 66c76fa673)

Co-authored-by: Harjoth Khara <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
2026-07-04 15:11:20 +00:00
Miss Islington (bot)andGitHub cb0adb0d94 [3.15] gh-152068: Reset PyREPL Colors on prompt finish (GH-152108) (#153029) 2026-07-04 13:49:59 +00:00
fdc17cab04 [3.15] gh-135661: Fix abrupt closing of empty comment in HTMLParser (GH-153007) (GH-153024)
An abruptly closed empty comment ("<!-->" or "<!--->") no longer extends
up to a later "-->" in the same feed() call.

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

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Opus 4.8 <[email protected]>
2026-07-04 12:36:03 +00:00
e1320ae4c3 [3.15] gh-152851: fix a crash when copying a BLAKE-2s/2b object (GH-153008) (#153011)
gh-152851: fix a crash when copying a BLAKE-2s/2b object (GH-153008)
(cherry picked from commit 5a400ceafb)

Co-authored-by: Bénédikt Tran <[email protected]>
2026-07-04 10:41:40 +00:00
2dd5d4e1ec [3.15] gh-150579: use lazy imports for concurrent.futures (GH-150585) (#152975)
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.
(cherry picked from commit 423ae0ff36)

Signed-off-by: Henry Schreiner <[email protected]>
Co-authored-by: Henry Schreiner <[email protected]>
Co-authored-by: Gregory P. Smith <[email protected]>
2026-07-03 20:20:49 -07:00
8d08232817 [3.15] gh-83386: Enable test_hang_gh83386 for ProcessPoolExecutor (GH-152976) (#152982)
gh-83386: Enable test_hang_gh83386 for ProcessPoolExecutor (GH-152976)

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

Co-authored-by: Gregory P. Smith <[email protected]>
Co-authored-by: Claude Fable 5 <[email protected]>
2026-07-03 21:32:20 +00:00
ce373b845c [3.15] gh-152951 - Fix double DECREF when newblock fails during deque.extend calls (GH-152961) (#152971)
gh-152951 - Fix double DECREF when `newblock` fails during deque.extend calls (GH-152961)
(cherry picked from commit a90576d72c)

Co-authored-by: Steve Stagg <[email protected]>
2026-07-03 18:14:59 +00:00
138dd26337 [3.15] gh-152785: Upgrade LLVM to LLVM 21 in GitHub Action jobs (GH-152781) (#152968)
gh-152785: Upgrade LLVM to LLVM 21 in GitHub Action jobs (GH-152781)

Upgrade LLVM to LLVM 21 in GitHub Action jobs:

* Reusable Sanitizer
* Reusable Ubuntu ("Install Clang and BOLT")
(cherry picked from commit f5b3eefbda)

Co-authored-by: Victor Stinner <[email protected]>
2026-07-03 16:48:51 +00:00
f3ef09e976 [3.15] gh-150880: Normalize paths on Windows before appending wildcard (GH-152906) (GH-152963)
gh-150880: Normalize paths on Windows before appending wildcard (GH-152906)

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

Co-authored-by: Zain Nadeem <[email protected]>
2026-07-03 16:02:22 +00:00
8ad11e3d96 [3.15] gh-152785: Upgrade GCC from 10 to 13 in GHA Address Sanitizer (GH-152782) (#152949)
gh-152785: Upgrade GCC from 10 to 13 in GHA Address Sanitizer (GH-152782)

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

Co-authored-by: Victor Stinner <[email protected]>
2026-07-03 11:40:56 +00:00
fe23abac94 [3.15] gh-152903: Change PCWSTR to PWSTR in GetThreadDescription() typedef (GH-152904) (#152943)
gh-152903: Change PCWSTR to PWSTR in GetThreadDescription() typedef (GH-152904)

Fixes issue GH-152903
(cherry picked from commit ac1acb6d7d)

Co-authored-by: Carlo Bramini <[email protected]>
2026-07-03 11:33:14 +00:00
2a7eb3d179 [3.15] gh-152870: Fix compile error with decimal when EXTRA_FUNCTIONALITY enabled (GH-152871) (#152937)
gh-152870: Fix compile error with decimal when EXTRA_FUNCTIONALITY enabled (GH-152871)
(cherry picked from commit c4739533f3)

Co-authored-by: Xiaowei Lu <[email protected]>
2026-07-03 11:03:07 +00:00
1b89ad7e00 [3.15] gh-150641: Fix evaluating forward references in STRING format can 'leak' internal names in typing (GH-150648) (#152935)
gh-150641: Fix evaluating forward references in STRING format can 'leak' internal names in `typing` (GH-150648)
(cherry picked from commit f75028f7ce)

Co-authored-by: Ivy Xu <[email protected]>
Co-authored-by: Jelle Zijlstra <[email protected]>
2026-07-03 11:55:10 +02:00
d657028a6e [3.15] gh-152919: Ensure nuget.org source exist before python install (GH-152919)
(cherry picked from commit 8c35afa221)

Co-authored-by: Bart van der Braak <[email protected]>
2026-07-03 08:55:46 +00:00
c8c08cfe29 [3.15] gh-115634: Fix ProcessPoolExecutor deadlock with max_tasks_per_child (GH-140900) (#152926)
gh-115634: Fix ProcessPoolExecutor deadlock with max_tasks_per_child (GH-140900)

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

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

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

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

Co-authored-by: Gregory P. Smith <[email protected]>
2026-07-03 06:37:25 +00:00
c09f078796 [3.15] gh-152785: Upgrade Java from 17 to 21 in GHA Android (GH-152783) (#152920)
Upgrade Java from 17 to 21 in GHA Android, and document the Java version
requirement.
(cherry picked from commit 0a13efc3fb)

Co-authored-by: Victor Stinner <[email protected]>
2026-07-03 02:56:16 +00:00
Terry Jan ReedyandGitHub 984ebbfeec [3.15] gh-151428: Remove unused imports in idlelib.idle_test (GH-151478) (#152916) 2026-07-02 21:07:27 +00:00
598856c7e4 [3.15] gh-152847: Reject POSIX TZ rule with non-digit day-of-year in _zoneinfo.py (GH-152848) (#152910)
(cherry picked from commit 31864bd9a6)

Co-authored-by: tonghuaroot (童话) <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
2026-07-02 18:31:47 +00:00
e0db0e4d34 [3.15] gh-98894: Check tracer exit status in test_dtrace (GH-152893) (#152900)
gh-98894: Check tracer exit status in test_dtrace (GH-152893)

Fail functional dtrace and SystemTap cases directly when the tracer exits
non-zero.
(cherry picked from commit 311e7e79f4)

Co-authored-by: stratakis <[email protected]>
2026-07-02 15:37:52 +00:00
7dd15e4f76 [3.15] gh-86165: Fix Time2Internaldate with datetime timetuple (GH-151844) (GH-152895)
(cherry picked from commit 460fe13601)

Co-authored-by: Xiao Yuan <[email protected]>
2026-07-02 15:29:55 +00:00
46b48ff09a [3.15] gh-144067: Document terminal leak when initscr() follows setupterm() (GH-152624) (GH-152894)
(cherry picked from commit e471712958)

Co-authored-by: Claude Opus 4.8 <[email protected]>
2026-07-02 18:01:41 +03:00
bd86f3cb69 [3.15] gh-98894: Check readelf failures in test_dtrace (GH-152345) (#152891)
gh-98894: Check readelf failures in test_dtrace (GH-152345)

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

Co-authored-by: stratakis <[email protected]>
2026-07-02 16:58:12 +02:00
a1a9e6f081 [3.15] gh-152680: Detect virtualization on Windows in pythoninfo (GH-152824) (#152890)
gh-152680: Detect virtualization on Windows in pythoninfo (GH-152824)

Use WMI to detect virtualization on Windows.

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

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

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

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

Co-authored-by: Victor Stinner <[email protected]>
2026-07-02 13:27:35 +00:00
9317d52169 [3.15] gh-88574: Skip a spurious blank line after a literal in imaplib (GH-152751) (GH-152884)
Some IMAP servers send an extra blank line after the data of a literal.
imaplib mistook it for the response trailer and failed on the next
command.  Such a blank line is now skipped.
(cherry picked from commit 53ff1a28cc)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-02 13:25:34 +00:00
d8493ae633 [3.15] gh-150069: Test frozen dataclass and properties interaction (GH-150070) (#152882)
gh-150069: Test frozen dataclass and properties interaction (GH-150070)
(cherry picked from commit 753f82db2f)

Co-authored-by: sobolevn <[email protected]>
2026-07-02 13:20:55 +00:00
6759fd8211 [3.15] gh-49680: Test imaplib.IMAP4.append line-ending normalization (GH-152877)
gh-49680: Test imaplib.IMAP4.append line-ending normalization

(cherry picked from commit ddb6539c49)

Co-authored-by: harjoth <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-02 11:57:58 +00:00
ad6b3590cf [3.15] gh-66335: Add tests for imaplib command methods (GH-152872) (GH-152873)
Add coverage tests for the IMAP4 command methods and their UID variants
(SELECT, CREATE, COPY, STORE, FETCH, SEARCH, SORT, THREAD, DELETE,
RENAME, SUBSCRIBE, UNSUBSCRIBE, LIST, STATUS, the ACL and quota
commands, ANNOTATION, PROXYAUTH and ENABLE), plus test helpers
(splitargs, parse_sequence_set, make_simple_handler) and per-command
argument capture in the test server.
(cherry picked from commit a50b089b7c)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-02 10:40:07 +00:00
Miss Islington (bot)andGitHub d13f5b27c8 [3.15] gh-151763: Fix OOM-0013 crash when the parser or compiler fails to allocate (GH-151968) (#152836) 2026-07-02 09:23:23 +01:00
c2cb9bdcdc [3.15] gh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures (GH-152585) (#152868)
gh-152569: Fix asyncio.wait leaking tasks via await-graph on long-lived futures (GH-152585)
(cherry picked from commit f8514dccac)

Co-authored-by: Simon Knott <[email protected]>
2026-07-02 13:50:14 +05:30
c5b0c81c52 [3.15] gh-144473: Add "steal" term to glossary; clarify "stealing" on error (GH-144502) (GH-152771)
With one exception, all "stealing" functions also steal on error,
but it makes sense to note this in each case.
(cherry picked from commit 34503f3953)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: Peter Bierma <[email protected]>
2026-07-02 10:07:57 +02:00
6a1a23f2e7 [3.15] gh-108280: Give a meaningful error for an invalid imaplib greeting (GH-152768) (GH-152856)
Connecting to a server that does not send a valid IMAP4 greeting, such as
a POP3 server answering on the IMAP port, failed with the unhelpful
"imaplib.IMAP4.error: None".  A meaningful message is now raised instead.
(cherry picked from commit 262b6a0df5)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-02 07:46:30 +00:00
f4b3dd5600 [3.15] gh-63121: Refresh imaplib capabilities on state changes (GH-152752) (GH-152854)
imaplib fetched the server capabilities only once, at connection time.
They are now also refreshed after a successful LOGIN or AUTHENTICATE,
from the CAPABILITY response the server sent or, if it sent none, by
querying it.  This lets methods such as enable() see capabilities added
after login, for example ENABLE on Gmail (gh-103451).

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

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-02 07:40:43 +00:00
0ab38f4808 [3.15] gh-72507: Document that imaplib does not verify TLS certificates by default (GH-152778) (GH-152862)
IMAP4_SSL() and IMAP4.starttls() do not verify the server certificate or
hostname unless a suitable ssl_context is passed.
(cherry picked from commit f3bf8abb8c)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-02 07:28:02 +00:00
58d92ac773 [3.15] gh-79964: Clarify the imaplib fetch example in the docs (GH-152780) (GH-152859)
A FETCH response may contain additional or unsolicited data, so the
message is not always data[0][1].
(cherry picked from commit 50ae0be749)

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-02 07:26:50 +00:00
7d8b0b3a81 [3.15] gh-135142: update idlelib News3.txt for 9 issues (GH-152839) (#152842)
gh-135142: update idlelib News3.txt for 9 issues (GH-152839)

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

Co-authored-by: Terry Jan Reedy <[email protected]>
2026-07-02 03:20:31 +00:00
75fb03330e [3.15] gh-82183: Do not restart the busy IDLE shell when running without restart (GH-152745) (#152832)
gh-82183: Do not restart the busy IDLE shell when running without restart (GH-152745)

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

Co-authored-by: Serhiy Storchaka <[email protected]>
2026-07-01 23:30:08 +00:00
758a9c389a [3.15] gh-75595: Do not save a blank int entry in IDLE Settings (GH-152743) (#152827)
gh-75595: Do not save a blank int entry in IDLE Settings (GH-152743)

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

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

Co-authored-by: Serhiy Storchaka <[email protected]>
Co-authored-by: Cheryl Sabella <[email protected]>
2026-07-01 22:27:52 +00:00
392f1cc079 [3.15] gh-65339: Save IDLE Shell and Output windows as text by default (GH-152742) (#152821)
gh-65339: Save IDLE Shell and Output windows as text by default (GH-152742)

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

Co-authored-by: Serhiy Storchaka <[email protected]>
2026-07-01 21:03:58 +00:00
6bbc28bc9c [3.15] gh-151040: Fix test_c_stack_unwind on RISC-V (GH-152370) (#152819)
(cherry picked from commit 1b0c05f148)

Co-authored-by: Ivy Xu <[email protected]>
2026-07-01 19:20:27 +00:00
c86035cf88 [3.15] gh-80504: Always show the full search path in IDLE Find in Files (GH-152740) (#152810)
gh-80504: Always show the full search path in IDLE Find in Files (GH-152740)

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

Co-authored-by: Serhiy Storchaka <[email protected]>
2026-07-01 17:35:41 +00:00
6aa89d98e3 [3.15] gh-134300: Remove idlelib from the path of the IDLE user process (GH-152739) (#152807)
gh-134300: Remove idlelib from the path of the IDLE user process (GH-152739)

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

Co-authored-by: Serhiy Storchaka <[email protected]>
2026-07-01 17:03:14 +00:00
c2d2752028 [3.15] gh-89360: Fix ValueError in IDLE MultiCall event_delete (GH-152738) (#152802)
gh-89360: Fix ValueError in IDLE MultiCall event_delete (GH-152738)

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

Co-authored-by: Serhiy Storchaka <[email protected]>
2026-07-01 16:49:12 +00:00
5de11c6eba [3.15] gh-71956: Fix IDLE Replace All searching up without wrap around (GH-152737) (#152799)
gh-71956: Fix IDLE Replace All searching up without wrap around (GH-152737)

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

Co-authored-by: Serhiy Storchaka <[email protected]>
2026-07-01 16:22:25 +00:00
ad5e591974 [3.15] Fix copy paste error with Py_mod_state_traverse (GH-152776) (#152777)
(cherry picked from commit b52bc56451)

Co-authored-by: Petr Viktorin <[email protected]>
Co-authored-by: hydrogen-mvm <[email protected]>
2026-07-01 18:05:39 +02:00
f7c26ed02f [3.15] gh-66331: Set correct WM_CLASS on X11 for IDLE windows (GH-152733) (#152794)
gh-66331: Set correct WM_CLASS on X11 for IDLE windows (GH-152733)

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

Co-authored-by: Serhiy Storchaka <[email protected]>
2026-07-01 15:44:06 +00:00
63da6c86eb [3.15] gh-152157: Reject empty fractions in _datetime.{date}time.fromisoformat (GH-152161) (#152761)
(cherry picked from commit 112c69a051)

Co-authored-by: tonghuaroot (童话) <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>
2026-07-01 10:23:08 +00:00
f663e54dc4 [3.15] gh-152728: IDLE - move 3 toplevel fix_xyz functions to idlelb.util (GH-152729) (#152730)
gh-152728: IDLE - move 3 toplevel fix_xyz functions to idlelb.util (GH-152729)

IDLE - move 3 toplevel fix_xyz functions to idlelb.util

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

Co-authored-by: Terry Jan Reedy <[email protected]>
2026-07-01 02:08:44 -04:00