-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
gh-126353: remove implicit creation of loop from get_event_loop
#126354
Conversation
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.
Please add also versionchanged
directives in the documentation and the What's New entry.
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.
Update also Doc/library/asyncio-policy.rst
. Look if there are other mentions of get_event_loop()
that needs to be updated.
Misc/NEWS.d/next/Library/2024-11-03-10-48-07.gh-issue-126353.ChDzot.rst
Outdated
Show resolved
Hide resolved
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.
I was waiting for this date for many years :)
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.
LGTM. 👍
@@ -924,7 +924,7 @@ def test_python_gil(self): | |||
self.assertEqual(proc.stderr, '') | |||
|
|||
def test_python_asyncio_debug(self): | |||
code = "import asyncio; print(asyncio.get_event_loop().get_debug())" | |||
code = "import asyncio; print(asyncio.new_event_loop().get_debug())" |
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.
I think this needs a with contextlib.closing(...
to prevent the test suite printing a ResourceWarning
asyncio.get_event_loop
#126353