]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-139145: Fix tkinter event loop in interactive mode (GH-152257) (GH-152293)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 26 Jun 2026 15:01:22 +0000 (17:01 +0200)
committerGitHub <noreply@github.com>
Fri, 26 Jun 2026 15:01:22 +0000 (18:01 +0300)
commitfba87d7f6838f5b69e359c2daf7d55eff1140a3c
treeffd16a02cff2e47297a1145ba90022538cf3475f
parentac3b2ab3c95b91743278d543d39f4212f05104f4
[3.13] gh-139145: Fix tkinter event loop in interactive mode (GH-152257) (GH-152293)

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

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>
Misc/NEWS.d/next/Library/2026-06-25-14-32-42.gh-issue-139145.kT9rmP.rst [new file with mode: 0644]
Misc/NEWS.d/next/Library/2026-06-25-14-32-43.gh-issue-139816.Lq2vXa.rst [new file with mode: 0644]
Modules/_tkinter.c