summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorPamela Fox <pamela.fox@gmail.com>2022-09-05 01:33:50 (GMT)
committerGitHub <noreply@github.com>2022-09-05 01:33:50 (GMT)
commita0ad63e70e3682cdf7e87e28091bb54fe12a2d4e (patch)
tree8a2b64598dc2578cdaf9b53a4a984202bba9d066 /Doc
parentac1866547243ade5392ed9bc6e7989f4d4346594 (diff)
downloadcpython-a0ad63e70e3682cdf7e87e28091bb54fe12a2d4e.zip
cpython-a0ad63e70e3682cdf7e87e28091bb54fe12a2d4e.tar.gz
cpython-a0ad63e70e3682cdf7e87e28091bb54fe12a2d4e.tar.bz2
gh-93973: Add all_errors to asyncio.create_connection (#93974)
Co-authored-by: Oleg Iarygin <dralife@yandex.ru>
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/asyncio-eventloop.rst14
1 files changed, 13 insertions, 1 deletions
diff --git a/Doc/library/asyncio-eventloop.rst b/Doc/library/asyncio-eventloop.rst
index 555a0f5..c86da8c 100644
--- a/Doc/library/asyncio-eventloop.rst
+++ b/Doc/library/asyncio-eventloop.rst
@@ -377,7 +377,8 @@ Opening network connections
local_addr=None, server_hostname=None, \
ssl_handshake_timeout=None, \
ssl_shutdown_timeout=None, \
- happy_eyeballs_delay=None, interleave=None)
+ happy_eyeballs_delay=None, interleave=None, \
+ all_errors=False)
Open a streaming transport connection to a given
address specified by *host* and *port*.
@@ -468,6 +469,14 @@ Opening network connections
to complete before aborting the connection. ``30.0`` seconds if ``None``
(default).
+ * *all_errors* determines what exceptions are raised when a connection cannot
+ be created. By default, only a single ``Exception`` is raised: the first
+ exception if there is only one or all errors have same message, or a single
+ ``OSError`` with the error messages combined. When ``all_errors`` is ``True``,
+ an ``ExceptionGroup`` will be raised containing all exceptions (even if there
+ is only one).
+
+
.. versionchanged:: 3.5
Added support for SSL/TLS in :class:`ProactorEventLoop`.
@@ -500,6 +509,9 @@ Opening network connections
Added the *ssl_shutdown_timeout* parameter.
+ .. versionchanged:: 3.12
+ *all_errors* was added.
+
.. seealso::
The :func:`open_connection` function is a high-level alternative