summaryrefslogtreecommitdiffstats
path: root/Doc/deprecations
diff options
context:
space:
mode:
authorKumar Aditya <kumaraditya@python.org>2024-12-27 15:13:41 (GMT)
committerGitHub <noreply@github.com>2024-12-27 15:13:41 (GMT)
commit64173cd6f2d8dc95c6f8b67912d0edd1c1b707d5 (patch)
treedf986de17f88d238cc0943ccc67c721bd5b84ddf /Doc/deprecations
parent71de839ec987bb67b98fcfecfc687281841a713c (diff)
downloadcpython-64173cd6f2d8dc95c6f8b67912d0edd1c1b707d5.zip
cpython-64173cd6f2d8dc95c6f8b67912d0edd1c1b707d5.tar.gz
cpython-64173cd6f2d8dc95c6f8b67912d0edd1c1b707d5.tar.bz2
gh-127949: make deprecation of policy system more prominent (#128290)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Diffstat (limited to 'Doc/deprecations')
-rw-r--r--Doc/deprecations/pending-removal-in-3.16.rst27
1 files changed, 26 insertions, 1 deletions
diff --git a/Doc/deprecations/pending-removal-in-3.16.rst b/Doc/deprecations/pending-removal-in-3.16.rst
index 6f6954b..f2b818f 100644
--- a/Doc/deprecations/pending-removal-in-3.16.rst
+++ b/Doc/deprecations/pending-removal-in-3.16.rst
@@ -19,10 +19,35 @@ Pending removal in Python 3.16
* :mod:`asyncio`:
* :func:`!asyncio.iscoroutinefunction` is deprecated
- and will be removed in Python 3.16,
+ and will be removed in Python 3.16;
use :func:`inspect.iscoroutinefunction` instead.
(Contributed by Jiahao Li and Kumar Aditya in :gh:`122875`.)
+ * :mod:`asyncio` policy system is deprecated and will be removed in Python 3.16.
+ In particular, the following classes and functions are deprecated:
+
+ * :class:`asyncio.AbstractEventLoopPolicy`
+ * :class:`asyncio.DefaultEventLoopPolicy`
+ * :class:`asyncio.WindowsSelectorEventLoopPolicy`
+ * :class:`asyncio.WindowsProactorEventLoopPolicy`
+ * :func:`asyncio.get_event_loop_policy`
+ * :func:`asyncio.set_event_loop_policy`
+ * :func:`asyncio.set_event_loop`
+
+ Users should use :func:`asyncio.run` or :class:`asyncio.Runner` with
+ *loop_factory* to use the desired event loop implementation.
+
+ For example, to use :class:`asyncio.SelectorEventLoop` on Windows::
+
+ import asyncio
+
+ async def main():
+ ...
+
+ asyncio.run(main(), loop_factory=asyncio.SelectorEventLoop)
+
+ (Contributed by Kumar Aditya in :gh:`127949`.)
+
* :mod:`builtins`:
* Bitwise inversion on boolean types, ``~True`` or ``~False``