-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Allow interrupting input() on Windows, as part of effort to make pdb interruptible #498
Merged
blink1073
merged 10 commits into
ipython:master
from
itamarst:10516-interrupt-input-on-windows
May 20, 2020
Merged
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
40854ca
A test for interruptions.
itamarst 2c6779f
New interrupt mechanism that works better in some cases.
itamarst acbfccb
Apparently working interruption on Windows.
itamarst 53c3b86
Merge remote-tracking branch 'upstream/master' into 10516-interrupt-i…
itamarst 41f9cfa
Actually interrupt_main() is fine.
itamarst 45b94e9
Tweak docstring.
itamarst 06d6858
Explanatory comment expanded.
itamarst c566e4b
Use polling with select().
itamarst 33904b0
Fix punctuation.
itamarst 3250f86
Tweak to trigger build.
itamarst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm wary of spin loops like this; since it is a socket we can use
select()
.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.
Unfortunately
select()
is also uninterruptible by KeyboardInterrupt on Windows. I decided to try using it anyway, because that way at least the loop will be more responsive while needing to wake up less. But sadly as far as I can tell this needs a loop of some sort if it's going to be uninterruptible 😞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.
Shucks, thanks for looking into it. I'm not sure what happened on the last travis build, I kicked it.
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.
I tried matplotlib 3.2.1 on my Linux machine and can't reproduce those issues. But on newer version of Python.
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.
IPython 7.14.0 was released 4 days ago, that might be it.
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.
This might be relevant: https://github.com/ipython/ipython/pull/12184/files
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.
I'm using same version of matplotlib as Travis, though. With updated ipython still can't reproduce... Can you try rerunning tests on master? At least that way can tell if it's in any way related to this PR.
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.
I just kicked https://travis-ci.org/github/ipython/ipykernel/builds/682166613
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.
...and that failed in the same way
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.
one thing to try is pinning the ipython version to 7.13.0