]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-139145: Fix tkinter event loop in interactive mode (GH-152257)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 26 Jun 2026 14:14:43 +0000 (17:14 +0300)
committerGitHub <noreply@github.com>
Fri, 26 Jun 2026 14:14:43 +0000 (17:14 +0300)
commit3ffda34f5cd3809a8755c9596948e4e477661d5f
tree0fbb04774a67e7a232f52165b2189d2840434f4b
parent588be7af08c04d63c1a920539c64885fbc4c6d38
gh-139145: Fix tkinter event loop in interactive mode (GH-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 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.

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