Skip to content

[3.14] gh-139145: Fix tkinter event loop in interactive mode (GH-152257)#152292

Merged
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-3ffda34-3.14
Jun 26, 2026
Merged

[3.14] gh-139145: Fix tkinter event loop in interactive mode (GH-152257)#152292
serhiy-storchaka merged 1 commit into
python:3.14from
miss-islington:backport-3ffda34-3.14

Conversation

@miss-islington

@miss-islington miss-islington commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

When a Tcl command running its own event loop (such as vwait or
wait_variable) was active and the user typed input on stdin, the event
loop kept spinning at 100% CPU. The stdin file handler is now removed as
soon as input becomes available.

Also fix gh-139816: an exception raised in a callback no longer stops the
event loop to wait for Enter on a Python built without readline; pending
callbacks keep running until input is actually available on stdin.
(cherry picked from commit 3ffda34)

Co-authored-by: Serhiy Storchaka storchaka@gmail.com
Co-authored-by: mdehoon mjldehoon@yahoo.com
Co-authored-by: Christopher Chavez chrischavez@gmx.us
Co-authored-by: Claude Opus 4.8 noreply@anthropic.com

…-152257)

When a Tcl command running its own event loop (such as vwait or
wait_variable) was active and the user typed input on stdin, the event
loop kept spinning at 100% CPU.  The stdin file handler is now removed as
soon as input becomes available.

Also fix pythongh-139816: an exception raised in a callback no longer stops the
event loop to wait for Enter on a Python built without readline; pending
callbacks keep running until input is actually available on stdin.
(cherry picked from commit 3ffda34)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: mdehoon <mjldehoon@yahoo.com>
Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@serhiy-storchaka serhiy-storchaka merged commit c2fedea into python:3.14 Jun 26, 2026
49 checks passed
@miss-islington miss-islington deleted the backport-3ffda34-3.14 branch June 26, 2026 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants