Skip to content

Conversation

@jonathanslenders
Copy link
Member

Use asyncio.get_running_loop() and asyncio.run(). Stop using asyncio.get_event_loop() and asyncio.set_event_loop().

@jonathanslenders jonathanslenders force-pushed the dropping-python3.6 branch 2 times, most recently from 7fa079c to 1ea88a5 Compare February 1, 2023 13:35
Use `asyncio.get_running_loop()` and `asyncio.run()`. Stop using
`asyncio.get_event_loop()` and `asyncio.set_event_loop()`.
find -name '*.py' -exec pyupgrade --py37-plus  '{}' \;
@jonathanslenders
Copy link
Member Author

If anyone here has a Windows environment available, it would be much appreciated if this could be tested.
Windows 10 or 11 would be fine.

This is a better than having a separate .start() and .stop() when it comes to
cancellation.
@jonathanslenders
Copy link
Member Author

Going to merge this, I tested on Windows.

There are some mypy issues:

AssertionError: Internal error: unresolved placeholder type None
That's probably a mypy bug which should be fixed in the next release: python/mypy#14631

@jonathanslenders jonathanslenders merged commit 5eb6efd into master Feb 14, 2023
@jonathanslenders jonathanslenders deleted the dropping-python3.6 branch February 14, 2023 10:35
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