Skip to content
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

Get event loop deprecate #308

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

unkcpz
Copy link
Member

@unkcpz unkcpz commented Jan 13, 2025

This PR is try to force the use of custom PlumpyEventLoopPolicy for all tests. But in the end I can not get rid of all warnings since some are from nest_asyncio and pytest_asyncio where the get_event_loop is still used.

The recommended way of replacing the asyncio.get_event_loop is discussed at python/cpython#100160. I made the similar change to the PlumpyEventLoopPolicy by creating the event loop explicitly in new_event_loop.

I think the major issue came from we are using nest_asyncio to make event loop reentranable, which I introduced 4 years ago. Since the nest_asyncio is not actively maintained and it is not a decent way to do python asyncio, I'll look to see how to get rid of it by using the standard async primitives.

  • The next step for this PR is to finalize the event loop create and get mechanism in custom event loop policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant