-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
get_running_loop is only valid in coroutines #13349
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
Conversation
766864b to
3d4c571
Compare
3d4c571 to
2b2e0e8
Compare
get_running_loop is only valid from inside a coroutine EventLoopPolicy.get_event_loop is _not_ deprecated
2b2e0e8 to
3147552
Compare
|
This is running into various problems with invalid assumptions about asyncio in the script magics (#13348) |
cf4cc6a to
5404b27
Compare
leave other problems with asyncio implementation for another PR
5404b27 to
0fbbb2b
Compare
|
In two commits because the first commit should be backported to 7.x, while the second is only for the 8.0 updates to script magics. |
|
FWIW, referring to the Python patch deprecating get_event_loop, it is an accident that We should move to our own handle on the event loop, and remove all calls to |
|
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
This only pickes up the first commit of the PR
This only pickes up the first commit of the PR
Backport PR #13349: get_running_loop is only valid in coroutines
This fixes the problems introduced in #13269 by following the pattern in #13289. Using
get_running_loopis only a valid way to get the event loop from inside a coroutine, which is not what's happening here.I don't really understand why
asyncio.get_event_loopis deprecated andpolicy.get_event_loopis not, but that is the case, at least for now.await doesn't work in 7.30 because of this, so this should perhaps be in 7.30.1