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