Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ an event loop:
running event loop.

If there is no running event loop set, the function will return
the result of ``get_event_loop_policy().get_event_loop()`` call.
the result of the ``get_event_loop_policy().get_event_loop()`` call.

Because this function has rather complex behavior (especially
when custom event loop policies are in use), using the
Expand All @@ -59,6 +59,16 @@ an event loop:
instead of using these lower level functions to manually create and close an
event loop.

.. note::
In Python versions 3.10.0--3.10.8 and 3.11.0 this function
(and other functions which used it implicitly) emitted a
:exc:`DeprecationWarning` if there was no running event loop, even if
the current loop was set.
In Python versions 3.10.9, 3.11.1, and 3.12 they emitted a
:exc:`DeprecationWarning` if there was no running event loop, and no
current loop was set.
In some future Python release it will become an error.

.. function:: set_event_loop(loop)

Set *loop* as the current event loop for the current OS thread.
Expand Down
6 changes: 6 additions & 0 deletions Doc/library/asyncio-policy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ asyncio ships with the following built-in policies:

On Windows, :class:`ProactorEventLoop` is now used by default.

.. note::
In Python versions 3.10.9, 3.11.1, and 3.12 this function emitted a
:exc:`DeprecationWarning` if there was no running event loop, and no
current loop was set.
In some future Python release it will become an error.


.. class:: WindowsSelectorEventLoopPolicy

Expand Down
13 changes: 0 additions & 13 deletions Doc/whatsnew/3.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1710,19 +1710,6 @@ Deprecated
scheduled for removal in Python 3.12.
(Contributed by Erlend E. Aasland in :issue:`42264`.)

* :func:`asyncio.get_event_loop` now emits a deprecation warning if there is
no running event loop. In the future it will be an alias of
:func:`~asyncio.get_running_loop`.
:mod:`asyncio` functions which implicitly create :class:`~asyncio.Future`
or :class:`~asyncio.Task` objects now emit
a deprecation warning 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`.
(Contributed by Serhiy Storchaka in :issue:`39529`.)

* The undocumented built-in function ``sqlite3.enable_shared_cache`` is now
deprecated, scheduled for removal in Python 3.12. Its use is strongly
discouraged by the SQLite3 documentation. See `the SQLite3 docs
Expand Down