summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorKumar Aditya <kumaraditya@python.org>2024-11-04 08:51:20 (GMT)
committerGitHub <noreply@github.com>2024-11-04 08:51:20 (GMT)
commitfe5a6ab7bea927e887b7b3c2d4e8fe8eac7106c3 (patch)
treea5be0f4c827f80f43dcacc6a967a22f652d21cf1 /Doc
parent0d80777981f95bbc79b146fc78b2189c82521ab9 (diff)
downloadcpython-fe5a6ab7bea927e887b7b3c2d4e8fe8eac7106c3.zip
cpython-fe5a6ab7bea927e887b7b3c2d4e8fe8eac7106c3.tar.gz
cpython-fe5a6ab7bea927e887b7b3c2d4e8fe8eac7106c3.tar.bz2
gh-126353: remove implicit creation of loop from `asyncio.get_event_loop` (#126354)
Remove implicit creation of loop from `asyncio.get_event_loop`. This is a step forward of deprecating the policy system of asyncio.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/asyncio-eventloop.rst5
-rw-r--r--Doc/library/asyncio-policy.rst8
-rw-r--r--Doc/whatsnew/3.14.rst5
3 files changed, 10 insertions, 8 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index 14fd153..3ace6ed 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -59,9 +59,8 @@ an event loop:
instead of using these lower level functions to manually create and close an
event loop.
- .. deprecated:: 3.12
- Deprecation warning is emitted if there is no current event loop.
- In some future Python release this will become an error.
+ .. versionchanged:: 3.14
+ Raises a :exc:`RuntimeError` if there is no current event loop.
.. function:: set_event_loop(loop)
diff --git a/Doc/library/asyncio-policy.rst b/Doc/library/asyncio-policy.rst
index 837ccc6..09b7576 100644
--- a/Doc/library/asyncio-policy.rst
+++ b/Doc/library/asyncio-policy.rst
@@ -97,11 +97,9 @@ asyncio ships with the following built-in policies:
On Windows, :class:`ProactorEventLoop` is now used by default.
- .. deprecated:: 3.12
- The :meth:`get_event_loop` method of the default asyncio policy now emits
- a :exc:`DeprecationWarning` if there is no current event loop set and it
- decides to create one.
- In some future Python release this will become an error.
+ .. versionchanged:: 3.14
+ The :meth:`get_event_loop` method of the default asyncio policy now
+ raises a :exc:`RuntimeError` if there is no set event loop.
.. class:: WindowsSelectorEventLoopPolicy
diff --git a/Doc/whatsnew/3.14.rst b/Doc/whatsnew/3.14.rst
index 21bc289..deee683 100644
--- a/Doc/whatsnew/3.14.rst
+++ b/Doc/whatsnew/3.14.rst
@@ -576,6 +576,11 @@ asyncio
(Contributed by Kumar Aditya in :gh:`120804`.)
+* Removed implicit creation of event loop by :func:`asyncio.get_event_loop`.
+ It now raises a :exc:`RuntimeError` if there is no current event loop.
+ (Contributed by Kumar Aditya in :gh:`126353`.)
+
+
collections.abc
---------------