diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-09-06 20:25:19 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-06 20:25:19 (GMT) |
| commit | 5c3078d6e597c7e50b3b0da37f493e2dfca17a6a (patch) | |
| tree | c8f16cbf540fee5b7527d51b3b9ff7ed9c8b065e /Lib/_pyrepl/windows_console.py | |
| parent | 66b15381f187f00f0fd91575f9f11e14bfddeeca (diff) | |
| download | cpython-5c3078d6e597c7e50b3b0da37f493e2dfca17a6a.zip cpython-5c3078d6e597c7e50b3b0da37f493e2dfca17a6a.tar.gz cpython-5c3078d6e597c7e50b3b0da37f493e2dfca17a6a.tar.bz2 | |
[3.13] gh-120221: Support KeyboardInterrupt in asyncio REPL (GH-123795) (#123799)
This switches the main pyrepl event loop to always be non-blocking so that it
can listen to incoming interruptions from other threads.
This also resolves invalid display of exceptions from other threads
(gh-123178).
This also fixes freezes with pasting and an active input hook.
(cherry picked from commit 033510e11dff742d9626b9fd895925ac77f566f1)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib/_pyrepl/windows_console.py')
| -rw-r--r-- | Lib/_pyrepl/windows_console.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/_pyrepl/windows_console.py b/Lib/_pyrepl/windows_console.py index 14a426b..40cfdaa 100644 --- a/Lib/_pyrepl/windows_console.py +++ b/Lib/_pyrepl/windows_console.py @@ -479,7 +479,7 @@ class WindowsConsole(Console): while True: if msvcrt.kbhit(): # type: ignore[attr-defined] return True - if timeout and time.time() - start_time > timeout: + if timeout and time.time() - start_time > timeout / 1000: return False time.sleep(0.01) |
