Skip to content

Commit a7287cb

Browse files
add back pending deprecations
1 parent 5db128f commit a7287cb

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Doc/deprecations/pending-removal-in-3.16.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,30 @@ Pending removal in Python 3.16
3030
use :func:`inspect.iscoroutinefunction` instead.
3131
(Contributed by Jiahao Li and Kumar Aditya in :gh:`122875`.)
3232

33+
* :mod:`asyncio` policy system is deprecated and will be removed in Python 3.16.
34+
In particular, the following classes and functions are deprecated:
35+
36+
* :class:`!asyncio.AbstractEventLoopPolicy`
37+
* :class:`!asyncio.DefaultEventLoopPolicy`
38+
* :class:`!asyncio.WindowsSelectorEventLoopPolicy`
39+
* :class:`!asyncio.WindowsProactorEventLoopPolicy`
40+
* :func:`!asyncio.get_event_loop_policy`
41+
* :func:`!asyncio.set_event_loop_policy`
42+
43+
Users should use :func:`asyncio.run` or :class:`asyncio.Runner` with
44+
*loop_factory* to use the desired event loop implementation.
45+
46+
For example, to use :class:`asyncio.SelectorEventLoop` on Windows::
47+
48+
import asyncio
49+
50+
async def main():
51+
...
52+
53+
asyncio.run(main(), loop_factory=asyncio.SelectorEventLoop)
54+
55+
(Contributed by Kumar Aditya in :gh:`127949`.)
56+
3357
* :mod:`builtins`:
3458

3559
* Bitwise inversion on boolean types, ``~True`` or ``~False``

0 commit comments

Comments
 (0)