@@ -532,24 +532,43 @@ Improved Modules
532
532
asyncio
533
533
-------
534
534
535
- * Add raw datagram socket functions to the event loop:
535
+ * Added the :class: `~asyncio.TaskGroup ` class,
536
+ an :ref: `asynchronous context manager <async-context-managers >`
537
+ holding a group of tasks that will wait for all of them upon exit.
538
+ For new code this is recommended over using
539
+ :class: `~asyncio.create_task ` and :func: `~asyncio.gather ` directly.
540
+ (Contributed by Yury Seliganov and others in :gh: `90908 `.)
541
+
542
+ * Added :func: `~asyncio.timeout `, an asynchronous context manager for
543
+ setting a timeout on asynchronous operations For new code this is
544
+ recommended over using :func: `~asyncio.wait_for ` directly.
545
+ (Contributed by Andrew Svetlov in :gh: `90927 `.)
546
+
547
+ * Added the :class: `~asyncio.Runner ` class, which exposes the machinery
548
+ used by :func: `~asyncio.run `.
549
+ (Contributed by Andrew Svetlov in :gh: `91218 `.)
550
+
551
+ * Added the :class: `~asyncio.Barrier ` class to the synchronization
552
+ primitives in the asyncio library, and the related
553
+ :exc: `~asyncio.BrokenBarrierError ` exception.
554
+ (Contributed by Yves Duprat and Andrew Svetlov in :gh: `87518 `.)
555
+
556
+ * Added the :meth: `~asyncio.StreamWriter.start_tls ` method for
557
+ upgrading existing stream-based connections to TLS.
558
+ (Contributed by Ian Good in :issue: `34975 `.)
559
+
560
+ * Added raw datagram socket functions to the event loop:
536
561
:meth: `~asyncio.AbstractEventLoop.sock_sendto `,
537
562
:meth: `~asyncio.AbstractEventLoop.sock_recvfrom ` and
538
563
:meth: `~asyncio.AbstractEventLoop.sock_recvfrom_into `.
564
+ These have implementations in :class: `~asyncio.SelectorEventLoop ` and
565
+ :class: `~asyncio.ProactorEventLoop `.
539
566
(Contributed by Alex Grönholm in :issue: `46805 `.)
540
567
541
- * Add :meth: `~asyncio.streams.StreamWriter.start_tls ` method for upgrading
542
- existing stream-based connections to TLS. (Contributed by Ian Good in
543
- :issue: `34975 `.)
544
-
545
- * Add :class: `~asyncio.Barrier ` class to the synchronization primitives of
546
- the asyncio library. (Contributed by Yves Duprat and Andrew Svetlov in
547
- :gh: `87518 `.)
548
-
549
- * Add :class: `~asyncio.TaskGroup ` class,
550
- an :ref: `asynchronous context manager <async-context-managers >`
551
- holding a group of tasks that will wait for all of them upon exit.
552
- (Contributed by Yury Seliganov and others.)
568
+ * Added :meth: `~asyncio.Task.cancelling ` and
569
+ :meth: `~asyncio.Task.uncancel ` methods to :class: `~asyncio.Task `.
570
+ These are primarily intended for internal use,
571
+ notably by :class: `~asyncio.TaskGroup `.
553
572
554
573
contextlib
555
574
----------
0 commit comments