[issue26133] asyncio: ugly error related to signal handlers at exit if the loop is not closed explicitly

STINNER Victor report at bugs.python.org
Wed Dec 20 17:15:34 EST 2017


STINNER Victor <victor.stinner at gmail.com> added the comment:

> `remove_signal_handler()` should do nothing if `sys.is_finalizing()` is true.

I dislike this option.

If you want to use sys.is_finalizing(), I would prefer to modify _UnixSelectorEventLoop.close() to not try to remove signal handler if close() has been called too late during Python finalization. But I also expect a warning in this case, not hide bugs silently.

If you reach this case, close() has probably been called by BaseEventLoop.__del__().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue26133>
_______________________________________


More information about the Python-bugs-list mailing list