You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
asyncio event loop hangs if an eager task fails to start #157301
Actually the repro will hang, and the displayed exception is not readable and informative about what was wrong:
➜ cpython git:(main) ✗ ./python.exe repro.py
Exception in callback <_asyncio.TaskStepMethWrapper object at 0x104911ba0>()
handle: <Handle <_asyncio.TaskStepMethWrapper object at 0x104911ba0>()>
Traceback (most recent call last):
File "/Users/timofeiivankov/cpython/Lib/asyncio/events.py", line 91, in _run
self._context.run(self._callback, *self._args)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Invalid attempt to leave task <Task finished name='Task-1' coro=<main() done, defined at /Users/timofeiivankov/cpython/repro.py:6> exception=TypeError('an instance of Context was expected')> while task <Task pending name='Task-2' coro=<child() running at /Users/timofeiivankov/cpython/repro.py:3>> is entered.
Activity
Merge branch 'main' into pythongh-157301-hang
gh-157301: Fix asyncio event loop hanging on a failed eager task start (
[3.15] gh-157301: Fix asyncio event loop hanging on a failed eager ta…
[3.13] gh-157301: Fix asyncio event loop hanging on a failed eager ta…