diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-12-06 17:42:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-06 17:42:12 (GMT) |
commit | fd38a2f0ec03b4eec5e3cfd41241d198b1ee555a (patch) | |
tree | f5019c34b08ec4dbfcbcd95edbde05553d283481 /Python/pythonrun.c | |
parent | b72014c783e5698beb18ee1249597e510b8bcb5a (diff) | |
download | cpython-fd38a2f0ec03b4eec5e3cfd41241d198b1ee555a.zip cpython-fd38a2f0ec03b4eec5e3cfd41241d198b1ee555a.tar.gz cpython-fd38a2f0ec03b4eec5e3cfd41241d198b1ee555a.tar.bz2 |
gh-93453: No longer create an event loop in get_event_loop() (#98440)
asyncio.get_event_loop() now always return either running event loop or
the result of get_event_loop_policy().get_event_loop() call. The latter
should now raise an RuntimeError if no current event loop was set
instead of creating and setting a new event loop.
It affects also a number of asyncio functions and constructors which
call get_event_loop() implicitly: ensure_future(), shield(), gather(),
etc.
DeprecationWarning is no longer emitted if there is no running event loop but
the current event loop was set.
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Python/pythonrun.c')
0 files changed, 0 insertions, 0 deletions