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

Deprecation warnings in asyncio with Python 3.8 #137

Closed
dmajda opened this issue Nov 15, 2019 · 2 comments
Closed

Deprecation warnings in asyncio with Python 3.8 #137

dmajda opened this issue Nov 15, 2019 · 2 comments

Comments

@dmajda
Copy link

dmajda commented Nov 15, 2019

When using aiojobs with Python 3.8 with warnings enabled, deprecation warnings are emitted at various places where a loop argument is passed to asyncio APIs. This is because explicit passing of that argument was deprecated and will be removed in Python 3.10. For some of the warnings, see for example this Travis CI build.

It would be good to fix these warnings. Looking at the code, it seems like the most sensible course of action would be to stop passing the loop argument to Job and Scheduler and just switch them to asyncio.get_running_loop() (with a asyncio.get_event_loop() fallback for Python < 3.7).

@asvetlov
Copy link
Member

Your detection is correct.
I have no estimation when I'll have time for this task.
Any help is welcome.

Small implementation note: please follow the pattern from async-timeout for get_running_loop() / get_event_loop() using.

@Dreamsorcerer
Copy link
Member

Appears to have been fixed.

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

No branches or pull requests

3 participants