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

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