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