Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
gh-139262: Prevent swallowing REPL input on Windows#139263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
| returnFalse | ||
| returnTrue | ||
| defwait(self,timeout:float|None)->bool: |
chris-eiblSep 23, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
The fix is easy and brings us in sync withunix_console.py
cpython/Lib/_pyrepl/unix_console.py
Lines 434 to 441 in6b4e3fe
| defwait(self,timeout:float|None=None)->bool: | |
| """ | |
| Wait for events on the console. | |
| """ | |
| return ( | |
| notself.event_queue.empty() | |
| orbool(self.pollob.poll(timeout)) | |
| ) |
chris-eibl commentedSep 23, 2025
macOS test_ssl failure for sure unrelated :) |
ef6f92a intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@chris-eibl for the PR, and@ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14. |
ambv commentedJan 2, 2026
Thanks for your fix, Chris. |
GH-143362 is a backport of this pull request to the3.14 branch. |
GH-143363 is a backport of this pull request to the3.13 branch. |
Uh oh!
There was an error while loading.Please reload this page.
Especially when using the meta (ALT) key.
For instance,Alt +b for
cpython/Lib/_pyrepl/reader.py
Line 85 in6b4e3fe
the first hit is swallowed in a Windwos Terminal.
It happens, when there is nothing to be read from the console, i.e.
cpython/Lib/_pyrepl/windows_console.py
Line 569 in6b4e3fe
returns
Falsebut there is data inself.event_queue.