diff options
author | Ćukasz Langa <lukasz@langa.pl> | 2024-09-06 19:28:29 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-06 19:28:29 (GMT) |
commit | 033510e11dff742d9626b9fd895925ac77f566f1 (patch) | |
tree | 312afe4e65696542145747bc525868fb1816a7d6 /Lib/test/test_pyrepl/support.py | |
parent | 0c080d7c77d826c1afab7bd6b73f61e714cffcb7 (diff) | |
download | cpython-033510e11dff742d9626b9fd895925ac77f566f1.zip cpython-033510e11dff742d9626b9fd895925ac77f566f1.tar.gz cpython-033510e11dff742d9626b9fd895925ac77f566f1.tar.bz2 |
gh-120221: Support KeyboardInterrupt in asyncio REPL (#123795)
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.
Diffstat (limited to 'Lib/test/test_pyrepl/support.py')
-rw-r--r-- | Lib/test/test_pyrepl/support.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_pyrepl/support.py b/Lib/test/test_pyrepl/support.py index cb5cb4a..672d489 100644 --- a/Lib/test/test_pyrepl/support.py +++ b/Lib/test/test_pyrepl/support.py @@ -161,8 +161,8 @@ class FakeConsole(Console): def forgetinput(self) -> None: pass - def wait(self) -> None: - pass + def wait(self, timeout: float | None = None) -> bool: + return True def repaint(self) -> None: pass |