[issue34037] asyncio: BaseEventLoop.close() shutdowns the executor without waiting causing leak of dangling threads
Petr Viktorin
report at bugs.python.org
Mon Apr 20 04:33:48 EDT 2020
Petr Viktorin <encukou at gmail.com> added the comment:
I got a report from a library that ties together asyncio and some other async libraries, getting errors like this:
tests/test_taskgroups.py:60: in test_run_natively
module.run(testfunc())
/usr/lib64/python3.9/asyncio/runners.py:48: in run
loop.run_until_complete(loop.shutdown_default_executor())
uvloop/loop.pyx:1451: in uvloop.loop.Loop.run_until_complete
???
/usr/lib64/python3.9/asyncio/events.py:254: in shutdown_default_executor
raise NotImplementedError
E NotImplementedError
(more at: https://bugzilla.redhat.com/show_bug.cgi?id=1817681#c1 )
I'm not all that familiar with asyncio, but it seems to me that all event loops inherited from BaseEventLoop must be updated to implement this new method to correctly work with run() in Python 3.9. Is that right? If it is, this needs at least a much more prominent What's New entry. Or the hard NotImplementedError should turn into a warning.
----------
nosy: +petr.viktorin
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34037>
_______________________________________
More information about the Python-bugs-list
mailing list