[New-bugs-announce] [issue26133] TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object in <bound method BaseEventLoop.__del__ of <_UnixSelectorEventLoop running=False closed=True debug=False>>

Alex Brandt report at bugs.python.org
Sat Jan 16 14:06:06 EST 2016


New submission from Alex Brandt:

When using the suggested practice of setting a stop loop signal handler with:

loop.add_signal_handler(signal.SIGTERM, loop.stop)

The following stack trace is given when the signal runs:

ligament_1 | Exception ignored in: <bound method BaseEventLoop.__del__ of <_UnixSelectorEventLoop running=False closed=True debug=False>>
ligament_1 | Traceback (most recent call last):
ligament_1 |   File "/usr/lib/python3.5/asyncio/base_events.py", line 387, in __del__
ligament_1 |   File "/usr/lib/python3.5/asyncio/unix_events.py", line 58, in close
ligament_1 |   File "/usr/lib/python3.5/asyncio/unix_events.py", line 139, in remove_signal_handler
ligament_1 |   File "/usr/lib/python3.5/signal.py", line 47, in signal
ligament_1 | TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object

Since this happens during shutdown of the application I wouldn't consider this a high priority bug but it is quite annoying.  I've also not investigated if this interrupts the loop stopping procedure yet.

----------
components: asyncio
messages: 258401
nosy: Alex Brandt, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
status: open
title: TypeError: signal handler must be signal.SIG_IGN, signal.SIG_DFL, or a callable object in <bound method BaseEventLoop.__del__ of <_UnixSelectorEventLoop running=False closed=True debug=False>>
type: crash
versions: Python 3.5

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


More information about the New-bugs-announce mailing list