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().
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index 7de5a0a..ca91efe 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -53,6 +53,11 @@
Consider also using the :func:`asyncio.run` function instead of using
lower level functions to manually create and close an event loop.
+ .. deprecated:: 3.10
+ Deprecation warning is emitted if there is no running event loop.
+ If future Python releases this function will be an alias of
+ :func:`get_running_loop`.
+
.. function:: set_event_loop(loop)
Set *loop* as a current event loop for the current OS thread.