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