Skip to content

Commit 6c1d3a6

Browse files
kumaraditya303asvetlov
authored andcommitted
bpo-44011: Document ssl_shutdown_timeout added by revisited asyncio SSL implementation (GH-31597)
1 parent f7e538c commit 6c1d3a6

File tree

1 file changed

+55
-5
lines changed

1 file changed

+55
-5
lines changed

Doc/library/asyncio-eventloop.rst

Lines changed: 55 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ Opening network connections
369369
family=0, proto=0, flags=0, sock=None, \
370370
local_addr=None, server_hostname=None, \
371371
ssl_handshake_timeout=None, \
372+
ssl_shutdown_timeout=None, \
372373
happy_eyeballs_delay=None, interleave=None)
373374
374375
Open a streaming transport connection to a given
@@ -456,6 +457,10 @@ Opening network connections
456457
to wait for the TLS handshake to complete before aborting the connection.
457458
``60.0`` seconds if ``None`` (default).
458459

460+
* *ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown
461+
to complete before aborting the connection. ``30.0`` seconds if ``None``
462+
(default).
463+
459464
.. versionchanged:: 3.5
460465

461466
Added support for SSL/TLS in :class:`ProactorEventLoop`.
@@ -484,6 +489,10 @@ Opening network connections
484489

485490
For more information: https://tools.ietf.org/html/rfc6555
486491

492+
.. versionchanged:: 3.11
493+
494+
Added the *ssl_shutdown_timeout* parameter.
495+
487496
.. seealso::
488497

489498
The :func:`open_connection` function is a high-level alternative
@@ -569,7 +578,8 @@ Opening network connections
569578

570579
.. coroutinemethod:: loop.create_unix_connection(protocol_factory, \
571580
path=None, *, ssl=None, sock=None, \
572-
server_hostname=None, ssl_handshake_timeout=None)
581+
server_hostname=None, ssl_handshake_timeout=None, \
582+
ssl_shutdown_timeout=None)
573583
574584
Create a Unix connection.
575585

@@ -592,6 +602,10 @@ Opening network connections
592602
Added the *ssl_handshake_timeout* parameter.
593603
The *path* parameter can now be a :term:`path-like object`.
594604

605+
.. versionchanged:: 3.11
606+
607+
Added the *ssl_shutdown_timeout* parameter.
608+
595609

596610
Creating network servers
597611
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -602,7 +616,9 @@ Creating network servers
602616
flags=socket.AI_PASSIVE, \
603617
sock=None, backlog=100, ssl=None, \
604618
reuse_address=None, reuse_port=None, \
605-
ssl_handshake_timeout=None, start_serving=True)
619+
ssl_handshake_timeout=None, \
620+
ssl_shutdown_timeout=None, \
621+
start_serving=True)
606622
607623
Create a TCP server (socket type :data:`~socket.SOCK_STREAM`) listening
608624
on *port* of the *host* address.
@@ -662,6 +678,10 @@ Creating network servers
662678
for the TLS handshake to complete before aborting the connection.
663679
``60.0`` seconds if ``None`` (default).
664680

681+
* *ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown
682+
to complete before aborting the connection. ``30.0`` seconds if ``None``
683+
(default).
684+
665685
* *start_serving* set to ``True`` (the default) causes the created server
666686
to start accepting connections immediately. When set to ``False``,
667687
the user should await on :meth:`Server.start_serving` or
@@ -682,6 +702,10 @@ Creating network servers
682702
The socket option :py:data:`~socket.TCP_NODELAY` is set by default
683703
for all TCP connections.
684704

705+
.. versionchanged:: 3.11
706+
707+
Added the *ssl_shutdown_timeout* parameter.
708+
685709
.. seealso::
686710

687711
The :func:`start_server` function is a higher-level alternative API
@@ -691,7 +715,9 @@ Creating network servers
691715

692716
.. coroutinemethod:: loop.create_unix_server(protocol_factory, path=None, \
693717
*, sock=None, backlog=100, ssl=None, \
694-
ssl_handshake_timeout=None, start_serving=True)
718+
ssl_handshake_timeout=None, \
719+
ssl_shutdown_timeout=None, \
720+
start_serving=True)
695721
696722
Similar to :meth:`loop.create_server` but works with the
697723
:py:data:`~socket.AF_UNIX` socket family.
@@ -711,8 +737,14 @@ Creating network servers
711737
Added the *ssl_handshake_timeout* and *start_serving* parameters.
712738
The *path* parameter can now be a :class:`~pathlib.Path` object.
713739

740+
.. versionchanged:: 3.11
741+
742+
Added the *ssl_shutdown_timeout* parameter.
743+
744+
714745
.. coroutinemethod:: loop.connect_accepted_socket(protocol_factory, \
715-
sock, *, ssl=None, ssl_handshake_timeout=None)
746+
sock, *, ssl=None, ssl_handshake_timeout=None, \
747+
ssl_shutdown_timeout=None)
716748
717749
Wrap an already accepted connection into a transport/protocol pair.
718750

@@ -734,6 +766,10 @@ Creating network servers
734766
wait for the SSL handshake to complete before aborting the connection.
735767
``60.0`` seconds if ``None`` (default).
736768

769+
* *ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown
770+
to complete before aborting the connection. ``30.0`` seconds if ``None``
771+
(default).
772+
737773
Returns a ``(transport, protocol)`` pair.
738774

739775
.. versionadded:: 3.5.3
@@ -742,6 +778,10 @@ Creating network servers
742778

743779
Added the *ssl_handshake_timeout* parameter.
744780

781+
.. versionchanged:: 3.11
782+
783+
Added the *ssl_shutdown_timeout* parameter.
784+
745785

746786
Transferring files
747787
^^^^^^^^^^^^^^^^^^
@@ -778,7 +818,8 @@ TLS Upgrade
778818

779819
.. coroutinemethod:: loop.start_tls(transport, protocol, \
780820
sslcontext, *, server_side=False, \
781-
server_hostname=None, ssl_handshake_timeout=None)
821+
server_hostname=None, ssl_handshake_timeout=None, \
822+
ssl_shutdown_timeout=None)
782823
783824
Upgrade an existing transport-based connection to TLS.
784825

@@ -804,8 +845,17 @@ TLS Upgrade
804845
wait for the TLS handshake to complete before aborting the connection.
805846
``60.0`` seconds if ``None`` (default).
806847

848+
* *ssl_shutdown_timeout* is the time in seconds to wait for the SSL shutdown
849+
to complete before aborting the connection. ``30.0`` seconds if ``None``
850+
(default).
851+
807852
.. versionadded:: 3.7
808853

854+
.. versionchanged:: 3.11
855+
856+
Added the *ssl_shutdown_timeout* parameter.
857+
858+
809859

810860
Watching file descriptors
811861
^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)