Skip to content

Conversation

@matthewwilson-gh
Copy link

PR description:


Fix get_event_loop() deprecation in asyncio tutorial

Replaces the deprecated asyncio.get_event_loop() + run_until_complete() pattern in docs/tutorials/asyncio.rst with asyncio.run().

Before: The tutorial used get_event_loop() (deprecated in Python 3.10 when no event loop is set) and manually ran the coroutine with loop.run_until_complete().

After: Uses asyncio.run() to run the gathered coroutines. This is the recommended way to run async code from sync code (Python 3.7+) and handles loop creation and cleanup.


@davidism davidism closed this Feb 7, 2026
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.

2 participants