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

fix: call get_running_loop instead of get_event_loop #63

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Jan 24, 2025

Calling get_event_loop when there is no running loop is deprecated in Python 3.12+

https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_event_loop

Because this function has rather complex behavior (especially when custom event loop policies are in use), using the get_running_loop() function is preferred to get_event_loop() in coroutines and callbacks.

Calling get_event_loop when there is no running loop is deprecated
in Python 3.12+

https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.get_event_loop

> Because this function has rather complex behavior (especially when custom event loop policies are in use), using the get_running_loop() function is preferred to get_event_loop() in coroutines and callbacks.
@bdraco bdraco merged commit e424fe1 into main Jan 24, 2025
9 checks passed
@bdraco bdraco deleted the get_running_loop branch January 24, 2025 08:57
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