Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9fbfa42

Browse filesBrowse files
gvanrossumkumaraditya303CAM-GerlachJelleZijlstra
authored
GH-95913: Update what's new in 3.11 for asyncio (#97806)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
1 parent ce8fc18 commit 9fbfa42
Copy full SHA for 9fbfa42

File tree

1 file changed

+40
-16
lines changed
Filter options

1 file changed

+40
-16
lines changed

‎Doc/whatsnew/3.11.rst

Copy file name to clipboardExpand all lines: Doc/whatsnew/3.11.rst
+40-16Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -529,27 +529,51 @@ New Modules
529529
Improved Modules
530530
================
531531

532+
.. _whatsnew311-asyncio:
533+
532534
asyncio
533535
-------
534536

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,
550538
an :ref:`asynchronous context manager <async-context-managers>`
551539
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`.
553577

554578
contextlib
555579
----------

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.