-
-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test fixtures gen_cluster gen_test are using asyncio.run #6164
Comments
3 tasks
pristine_loop
fixture likely needs to be removed. This also affects other fixtures like gen_cluster
, gen_test
, loop
, cleanup
, etc.
3 tasks
mrocklin
pushed a commit
that referenced
this issue
Apr 21, 2022
when using `asyncio.run` in `gen_test` test that later call `asyncio.get_event_loop()` fail - even before python3.10: ```python import asyncio async def amain(): pass asyncio.run(amain()) asyncio.get_event_loop() ``` ```pytb Traceback (most recent call last): File "foo.py", line 7, in <module> asyncio.get_event_loop() File "/usr/lib/python3.8/asyncio/events.py", line 639, in get_event_loop raise RuntimeError('There is no current event loop in thread %r.' RuntimeError: There is no current event loop in thread 'MainThread'. ``` * use `gen_test` for tests that acquire `IOLoop.current()` * use `get_running_loop()` instead of `get_event_loop()` * use `asyncio.run()` instead of `asyncio.get_event_loop().run_until_complete()` See #6164
3 tasks
|
3 tasks
Fixed by #6231 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: