diff options
author | Christian Heimes <christian@python.org> | 2020-11-20 08:26:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-20 08:26:07 (GMT) |
commit | 03c8ddd9e94c7bddf1f06cf785027b8d2bf00ff0 (patch) | |
tree | e293c334cb6fee7b5826b21e26ab3c56a2d2fd20 /Doc | |
parent | 7ddbaa7a1b3e61847ee99658be6a7268a049e302 (diff) | |
download | cpython-03c8ddd9e94c7bddf1f06cf785027b8d2bf00ff0.zip cpython-03c8ddd9e94c7bddf1f06cf785027b8d2bf00ff0.tar.gz cpython-03c8ddd9e94c7bddf1f06cf785027b8d2bf00ff0.tar.bz2 |
bpo-42413: socket.timeout is now an alias of TimeoutError (GH-23413)
Signed-off-by: Christian Heimes <christian@python.org>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/smtplib.rst | 2 | ||||
-rwxr-xr-x | Doc/library/socket.rst | 7 | ||||
-rw-r--r-- | Doc/whatsnew/3.10.rst | 6 |
3 files changed, 13 insertions, 2 deletions
diff --git a/Doc/library/smtplib.rst b/Doc/library/smtplib.rst index 8f5ca0a..52220f7 100644 --- a/Doc/library/smtplib.rst +++ b/Doc/library/smtplib.rst @@ -32,7 +32,7 @@ Protocol) and :rfc:`1869` (SMTP Service Extensions). than a success code, an :exc:`SMTPConnectError` is raised. The optional *timeout* parameter specifies a timeout in seconds for blocking operations like the connection attempt (if not specified, the global default timeout - setting will be used). If the timeout expires, :exc:`socket.timeout` is + setting will be used). If the timeout expires, :exc:`TimeoutError` is raised. The optional source_address parameter allows binding to some specific source address in a machine with multiple network interfaces, and/or to some specific source TCP port. It takes a 2-tuple diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index faf8a76..d52b84f 100755 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -283,6 +283,8 @@ Exceptions .. exception:: timeout + A deprecated alias of :exc:`TimeoutError`. + A subclass of :exc:`OSError`, this exception is raised when a timeout occurs on a socket which has had timeouts enabled via a prior call to :meth:`~socket.settimeout` (or implicitly through @@ -292,6 +294,9 @@ Exceptions .. versionchanged:: 3.3 This class was made a subclass of :exc:`OSError`. + .. versionchanged:: 3.10 + This class was made an alias of :exc:`TimeoutError`. + Constants ^^^^^^^^^ @@ -1208,7 +1213,7 @@ to sockets. address family --- see above.) If the connection is interrupted by a signal, the method waits until the - connection completes, or raise a :exc:`socket.timeout` on timeout, if the + connection completes, or raise a :exc:`TimeoutError` on timeout, if the signal handler doesn't raise an exception and the socket is blocking or has a timeout. For non-blocking sockets, the method raises an :exc:`InterruptedError` exception if the connection is interrupted by a diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index ad0ec4d..826d127 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -263,6 +263,12 @@ site When a module does not define ``__loader__``, fall back to ``__spec__.loader``. (Contributed by Brett Cannon in :issue:`42133`.) +socket +------ + +The exception :exc:`socket.timeout` is now an alias of :exc:`TimeoutError`. +(Contributed by Christian Heimes in :issue:`42413`.) + sys --- |