GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Fix remove_signal_handler to not to crash after PyOS_FiniInterrupts by 1st1 · Pull Request #456 · python/asyncio
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
Conversation
1st1
commented
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of just
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only in debug mode. But frankly I don't understand this code.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
gvanrossum
reviewed
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should return a bool.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
gvanrossum
suggested changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't understand all this well enough to know whether this is a good idea or not. We really need to find someone else who wants to co-own asyncio -- ATM I feel my role is mostly that of giving you permission to commit what you see fit and I am not actually comfortable with this -- we'll end up with there being only one person who understands asyncio and that's not enough for such an important stdlib module.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Only in debug mode. But frankly I don't understand this code.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
|
I think the PR makes sense: we raise |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
OK, then LGTM.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
If something needs to be changed in signalmodule.c please open an issue on
bugs.python.org.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Yes, the bug in _signal can (and should) be fixed, and I have a working patch for that. My worry is that it might be a bit too late to do that for 3.6. I'll submit the patch and ask Ned's opinion. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I've no idea what's going on. I can reproduce this bug with python installed from MacPorts. I can't reproduce it with python I build from source. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
The bug is the following program: import signal import asyncio def foo(): pass async def bar(): pass def main(): loop = asyncio.get_event_loop() loop.add_signal_handler(signal.SIGINT, lambda: None) loop.add_signal_handler(signal.SIGHUP, lambda: None) loop.run_until_complete(bar()) if __name__ == "__main__": main() It should spit out something like this: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Maybe they ran configure with different parameters or in a different
context or with a different version of Xcode?
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Maybe. It should be something that changes how & when objects are GCed. The above traceback happens when objects are GCed after the signals module is finalized (and that's what I've seen in reports from asyncio and uvloop users). I'll try to get to the bottom of this. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@1st1 My results:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.