Interactive interpreter doesn't handle keyboard interrupt correctly if tk.Tk object has been created. No exception name or newline with prompt is printed; REPL waits for Enter key to be pressed and then prints traceback instead of exception name.
To reproduce the bug, run python in interactive mode, create new tk.Tk object, then do interrupt and press Enter:
>>>importtkinterastk>>>root=tk.Tk()
>>># Ctrl+C goes here, but no exception name or newline is printed, so hit EnterTraceback (mostrecentcalllast):
File"<stdin>", line-1, in<module>KeyboardInterrupt>>>
In 3.12.0a0, if user wrote any syntactically incorrect code before interrupting, exception object dump and 'lost sys.stderr' message will be printed:
Interactive interpreter doesn't handle keyboard interrupt correctly if tk.Tk object has been created. No exception name or newline with prompt is printed; REPL waits for Enter key to be pressed and then prints traceback instead of exception name.
To reproduce the bug, run python in interactive mode, create new tk.Tk object, then do interrupt and press Enter:
In 3.12.0a0, if user wrote any syntactically incorrect code before interrupting, exception object dump and 'lost sys.stderr' message will be printed:
CPython versions tried: 3.10.3 and 3.12.0a0 on Linux (5.16.9-arch1-1), 3.9.2 on Windows 10.
The text was updated successfully, but these errors were encountered: