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
asyncio.Event didn't get rid of its loop parameter (and defer loop lookup until use) until >= 3.10. So samples that instantiate an asyncio.Event() globally will get this when running in < 3.10:
Traceback (most recent call last):
File "scratch\scratch.py", line 106, in <module>
loop.run_until_complete(main())
File "asyncio\base_events.py", line 616, in run_until_complete
File "scratch\scratch.py", line 99, in main
await interrupt_event.wait()
File "asyncio\locks.py", line 309, in wait
RuntimeError: Task <Task pending name='Task-1' coro=<main() running at scratch\scratch.py:99> cb=[_run_until_complete_cb() at asyncio\base_events.py:184]> got Future <Future pending> attached to a different loop
Of course delaying creation of the event until after loop creation and passing in the now-removed loop kwarg in the event constructor fixes it.
We just need to find a better way to marry asyncio and signals across our samples.
The text was updated successfully, but these errors were encountered:
Describe the bug
asyncio.Event
didn't get rid of its loop parameter (and defer loop lookup until use) until >= 3.10. So samples that instantiate anasyncio.Event()
globally will get this when running in < 3.10:Of course delaying creation of the event until after loop creation and passing in the now-removed
loop
kwarg in the event constructor fixes it.We just need to find a better way to marry asyncio and signals across our samples.
The text was updated successfully, but these errors were encountered: