[Python-checkins] GH-95913: Update what's new in 3.11 for asyncio (GH-97806)
miss-islington
webhook-mailer at python.org
Tue Oct 4 14:45:44 EDT 2022
https://github.com/python/cpython/commit/dcec9b70c96fac8b9ebf54d05459c15f0606b3c6
commit: dcec9b70c96fac8b9ebf54d05459c15f0606b3c6
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-10-04T11:45:02-07:00
summary:
GH-95913: Update what's new in 3.11 for asyncio (GH-97806)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303 at users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach at Gerlach.CAM>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra at gmail.com>
(cherry picked from commit 9fbfa42ece3e0256657ce2594c7c3eb8b3ac8ff3)
Co-authored-by: Guido van Rossum <guido at python.org>
files:
M Doc/whatsnew/3.11.rst
diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst
index 60e2d794e6c1..fe36f99f5382 100644
--- a/Doc/whatsnew/3.11.rst
+++ b/Doc/whatsnew/3.11.rst
@@ -540,27 +540,51 @@ New Modules
Improved Modules
================
+.. _whatsnew311-asyncio:
+
asyncio
-------
-* Add raw datagram socket functions to the event loop:
- :meth:`~asyncio.AbstractEventLoop.sock_sendto`,
- :meth:`~asyncio.AbstractEventLoop.sock_recvfrom` and
- :meth:`~asyncio.AbstractEventLoop.sock_recvfrom_into`.
- (Contributed by Alex Grönholm in :issue:`46805`.)
-
-* Add :meth:`~asyncio.streams.StreamWriter.start_tls` method for upgrading
- existing stream-based connections to TLS. (Contributed by Ian Good in
- :issue:`34975`.)
-
-* Add :class:`~asyncio.Barrier` class to the synchronization primitives of
- the asyncio library. (Contributed by Yves Duprat and Andrew Svetlov in
- :gh:`87518`.)
-
-* Add :class:`~asyncio.TaskGroup` class,
+* Added the :class:`~asyncio.TaskGroup` class,
an :ref:`asynchronous context manager <async-context-managers>`
holding a group of tasks that will wait for all of them upon exit.
- (Contributed by Yury Seliganov and others.)
+ For new code this is recommended over using
+ :func:`~asyncio.create_task` and :func:`~asyncio.gather` directly.
+ (Contributed by Yury Selivanov and others in :gh:`90908`.)
+
+* Added :func:`~asyncio.timeout`, an asynchronous context manager for
+ setting a timeout on asynchronous operations. For new code this is
+ recommended over using :func:`~asyncio.wait_for` directly.
+ (Contributed by Andrew Svetlov in :gh:`90927`.)
+
+* Added the :class:`~asyncio.Runner` class, which exposes the machinery
+ used by :func:`~asyncio.run`.
+ (Contributed by Andrew Svetlov in :gh:`91218`.)
+
+* Added the :class:`~asyncio.Barrier` class to the synchronization
+ primitives in the asyncio library, and the related
+ :exc:`~asyncio.BrokenBarrierError` exception.
+ (Contributed by Yves Duprat and Andrew Svetlov in :gh:`87518`.)
+
+* Added keyword argument *all_errors* to :meth:`asyncio.loop.create_connection`
+ so that multiple connection errors can be raised as an :exc:`ExceptionGroup`.
+
+* Added the :meth:`asyncio.StreamWriter.start_tls` method for
+ upgrading existing stream-based connections to TLS.
+ (Contributed by Ian Good in :issue:`34975`.)
+
+* Added raw datagram socket functions to the event loop:
+ :meth:`~asyncio.loop.sock_sendto`,
+ :meth:`~asyncio.loop.sock_recvfrom` and
+ :meth:`~asyncio.loop.sock_recvfrom_into`.
+ These have implementations in :class:`~asyncio.SelectorEventLoop` and
+ :class:`~asyncio.ProactorEventLoop`.
+ (Contributed by Alex Grönholm in :issue:`46805`.)
+
+* Added :meth:`~asyncio.Task.cancelling` and
+ :meth:`~asyncio.Task.uncancel` methods to :class:`~asyncio.Task`.
+ These are primarily intended for internal use,
+ notably by :class:`~asyncio.TaskGroup`.
contextlib
----------
More information about the Python-checkins
mailing list