diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-04-25 10:40:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-25 10:40:44 (GMT) |
commit | 172c0f2752d8708b6dda7b42e6c5a3519420a4e8 (patch) | |
tree | 35a076c6baad7ca053a62b9f505af3762a867b79 /Misc/NEWS.d | |
parent | face87c94e67ad9c72b9a3724f112fd76c1002b9 (diff) | |
download | cpython-172c0f2752d8708b6dda7b42e6c5a3519420a4e8.zip cpython-172c0f2752d8708b6dda7b42e6c5a3519420a4e8.tar.gz cpython-172c0f2752d8708b6dda7b42e6c5a3519420a4e8.tar.bz2 |
bpo-39529: Deprecate creating new event loop in asyncio.get_event_loop() (GH-23554)
asyncio.get_event_loop() emits now a deprecation warning when it creates a new event loop.
In future releases it will became an alias of asyncio.get_running_loop().
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r-- | Misc/NEWS.d/next/Library/2020-12-06-20-21-16.bpo-39529.9Zrg43.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2020-12-06-20-21-16.bpo-39529.9Zrg43.rst b/Misc/NEWS.d/next/Library/2020-12-06-20-21-16.bpo-39529.9Zrg43.rst new file mode 100644 index 0000000..bb1fd82 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-12-06-20-21-16.bpo-39529.9Zrg43.rst @@ -0,0 +1,9 @@ +Deprecated use of :func:`asyncio.get_event_loop` without running event loop. +Emit deprecation warning for :mod:`asyncio` functions which implicitly +create a :class:`~asyncio.Future` or :class:`~asyncio.Task` objects if there +is no running event loop and no explicit *loop* argument is passed: +:func:`~asyncio.ensure_future`, :func:`~asyncio.wrap_future`, +:func:`~asyncio.gather`, :func:`~asyncio.shield`, +:func:`~asyncio.as_completed` and constructors of :class:`~asyncio.Future`, +:class:`~asyncio.Task`, :class:`~asyncio.StreamReader`, +:class:`~asyncio.StreamReaderProtocol`. |