-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Overriding SIGINT doesn't work as expected in the new REPL #120221
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
CC: @lysnikolaou @ambv |
This will be fixed by #120234 |
I noticed the problem when trying to debug Python in gdb. CTRL+C doesn't go into gdb anymore. For now, I'm using a bash alias:
|
… REPL (pythonGH-120354) (cherry picked from commit 34e4d32) Co-authored-by: Pablo Galindo Salgado <[email protected]>
Thank you. CTRL+C is gdb stops again the process as expected :) |
This could have been addressed by changing |
The problem of that approach is that if you paste a huge buffer and then want to cancel because pasting it's too slow then you need to wait until you get the key press for Ctrl-C to send the signal, which will happen after all the buffer is processed, while using signals directly allows us to cancel almost immediately |
This broke CTRL-C in the asyncio REPL. Now the |
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 (pythongh-123178).
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 (pythongh-123178).
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.
…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 (pythongh-123178). This also fixes freezes with pasting and an active input hook. (cherry picked from commit 033510e) Co-authored-by: Łukasz Langa <[email protected]>
… (#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 033510e) Co-authored-by: Łukasz Langa <[email protected]>
Fixed by #123799. |
Bug report
In the old REPL, overriding SIGINT and pressing Ctrl-C works as expected:
but in the new REPL it doesn't trigger the signal handler:
Linked PRs
The text was updated successfully, but these errors were encountered: