GeezerVison is showing github.com — [3.11] gh-93453: Only emit deprecation warning in asyncio.get_event_loop when a new event loop is created by serhiy-storchaka · Pull Request #99949 · python/cpython
Conversation
serhiy-storchaka
commented
Dec 2, 2022
•
edited by bedevere-bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
It no longer emits a deprecation warning if the current event loop was set.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…op when a new event loop is created
It no longer emits a deprecation warning if the current event loop was set.
serhiy-storchaka
changed the title
gh-93453: Only emit deprecation warning in asyncio.get_event_loop when a new event loop is created
[3.11] gh-93453: Only emit deprecation warning in asyncio.get_event_loop when a new event loop is created
Dec 2, 2022
|
This will need to also be backported to 3.10. In the light of that, I'm nervous about the removal of _asyncio._get_event_loop here. The point of the change as named in the PR is to stop emitting deprecation warnings when a loop exists on the policy. Serhiy's comment here explains this intent as well:
#98440 (comment)
@serhiy-storchaka, @gvanrossum, @kumaraditya303: would you be okay if I changed this PR to keep _asyncio._get_event_loop intact? I think that makes more sense for a change that's supposed to land in 3.10.9 too.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Note that I'm fine with _get_event_loop() to disappear in 3.12 as it's an underscored name. I simply think it's going to be disruptive to change this in 3.11.1 and 3.10.9.
(I also resolved a conflict in any case to have CI green.)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
I do not think it is necessary, but I have no objections.
|
ambv and gvanrossum reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
OK, @serhiy-storchaka, then I'll adapt this PR to leave _asyncio._get_event_loop existing.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do read my comments first!
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ambv reacted with thumbs up emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
I afraid that I can create conflicts with Łukasz, so from now I'm stopping committing in this branch. In any case my internet connection is currently too bad and can disappear at any time.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks, @serhiy-storchaka, I reverted removal of asyncio.events._get_event_loop and _asyncio._get_event_loop. Look how obvious the remaining changes now look in the "Files changed" tab. I like this.
I will wait for everything to pass and then merge this to create a 3.10 backport.
|
serhiy-storchaka reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks @serhiy-storchaka for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Sorry @serhiy-storchaka and @ambv, I had trouble checking out the 3.10 backport branch.
Please retry by removing and re-adding the "needs backport to 3.10" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 3fae04b10e2655a20a3aadb5e0d63e87206d0c67 3.10
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Note: I'm working on the backport now manually, there's some test conflicts with 3.10.
Now backporting '3fae04b10e2655a20a3aadb5e0d63e87206d0c67' into '3.10'
Error cherry-pick 3fae04b10e2655a20a3aadb5e0d63e87206d0c67.
Auto-merging Doc/library/asyncio-eventloop.rst
Auto-merging Doc/library/asyncio-llapi-index.rst
Auto-merging Lib/asyncio/events.py
Auto-merging Lib/test/test_asyncio/test_base_events.py
Auto-merging Lib/test/test_asyncio/test_events.py
CONFLICT (content): Merge conflict in Lib/test/test_asyncio/test_events.py
Auto-merging Lib/test/test_asyncio/test_futures.py
CONFLICT (content): Merge conflict in Lib/test/test_asyncio/test_futures.py
Auto-merging Lib/test/test_asyncio/test_streams.py
CONFLICT (content): Merge conflict in Lib/test/test_asyncio/test_streams.py
Auto-merging Lib/test/test_asyncio/test_tasks.py
CONFLICT (content): Merge conflict in Lib/test/test_asyncio/test_tasks.py
Auto-merging Lib/test/test_coroutines.py
Auto-merging Modules/_asynciomodule.c
error: could not apply 3fae04b10e... [3.11] gh-93453: Only emit deprecation warning in asyncio.get_event_loop when a new event loop is created (#99949)
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
ambv
pushed a commit
to ambv/cpython
that referenced
this pull request
Dec 6, 2022
…o.get_event_loop when a new event loop is created (pythonGH-99949)
It no longer emits a deprecation warning if the current event loop was set.
Co-authored-by: Łukasz Langa <[email protected]>
(cherry picked from commit 3fae04b)
Co-authored-by: Serhiy Storchaka <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|