]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-100160: Restore and deprecate implicit creation of an event loop (GH-100410)
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 13 Jan 2023 12:40:29 +0000 (14:40 +0200)
committerGitHub <noreply@github.com>
Fri, 13 Jan 2023 12:40:29 +0000 (14:40 +0200)
commite5bd5ad70d9e549eeb80aadb4f3ccb0f2f23266d
tree3c13553b04873b8cd80d10a877740031aa324b31
parent468c3bf79890ef614764b4e7543608876c792794
gh-100160: Restore and deprecate implicit creation of an event loop (GH-100410)

Partially revert changes made in GH-93453.

asyncio.DefaultEventLoopPolicy.get_event_loop() now emits a
DeprecationWarning and creates and sets a new event loop instead of
raising a RuntimeError if there is no current event loop set.

Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Doc/library/asyncio-eventloop.rst
Doc/library/asyncio-policy.rst
Doc/whatsnew/3.10.rst
Doc/whatsnew/3.12.rst
Lib/asyncio/events.py
Lib/test/test_asyncio/test_events.py
Lib/test/test_asyncio/test_unix_events.py
Misc/NEWS.d/next/Library/2022-12-21-17-49-50.gh-issue-100160.N0NHRj.rst [new file with mode: 0644]