[issue31387] asyncio should make it easy to enable cooperative SIGINT handling

2019-10-14 Thread Kyle Stanley
Change by Kyle Stanley : -- nosy: +aeros ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.

[issue31387] asyncio should make it easy to enable cooperative SIGINT handling

2019-09-07 Thread Ryan Hiebert
Change by Ryan Hiebert : -- nosy: +ryanhiebert ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue31387] asyncio should make it easy to enable cooperative SIGINT handling

2017-09-07 Thread Nick Coghlan
Nick Coghlan added the comment: As per Nathaniel's comments on issue 29988 and 31388, doing this robustly relies on: 1. the event loop being able to reliably guard itself and __aexit__ method implementations against interrupts (issue 31388) 2. "async with" statements ensuring that if the frame

[issue31387] asyncio should make it easy to enable cooperative SIGINT handling

2017-09-07 Thread Nick Coghlan
Nick Coghlan added the comment: Issue 31388 is also potentially relevant here, as registering a signal handler for SIGINT isn't sufficient to cover all potential cases were Py_AddPendingCall gets called. In particular, the tests for issue 29988 use Py_AddPendingCall to emulate Ctrl-C, rather t

[issue31387] asyncio should make it easy to enable cooperative SIGINT handling

2017-09-07 Thread Nathaniel Smith
Nathaniel Smith added the comment: Some prior discussion on the old asyncio tracker: https://github.com/python/asyncio/pull/305#issuecomment-168714572 https://github.com/python/asyncio/issues/341 -- ___ Python tracker

[issue31387] asyncio should make it easy to enable cooperative SIGINT handling

2017-09-07 Thread Nick Coghlan
New submission from Nick Coghlan: Issue 29988 covers the fact that with the default SIGINT handler installed, a poorly timed Ctrl-C can lead to context managers failing to even start running their __(a)exit__ methods, let alone complete them. For the asynchronous case, the problem is even wors