summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/socket.rst13
-rw-r--r--Doc/whatsnew/3.5.rst1
2 files changed, 14 insertions, 0 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 85eaabf..9a69ad4 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -830,6 +830,19 @@ to sockets.
Connect to a remote socket at *address*. (The format of *address* depends on the
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
+ 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
+ signal (or the exception raised by the signal handler).
+
+ .. versionchanged:: 3.5
+ The method now waits until the connection completes instead of raising an
+ :exc:`InterruptedError` exception if the connection is interrupted by a
+ signal, the signal handler doesn't raise an exception and the socket is
+ blocking or has a timeout (see the :pep:`475` for the rationale).
+
.. method:: socket.connect_ex(address)
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst
index adf770d..7a25d703 100644
--- a/Doc/whatsnew/3.5.rst
+++ b/Doc/whatsnew/3.5.rst
@@ -643,6 +643,7 @@ Changes in the Python API
- :func:`socket.socket` methods:
* :meth:`~socket.socket.accept`
+ * :meth:`~socket.socket.connect` (except for non-blocking sockets)
* :meth:`~socket.socket.recv`
* :meth:`~socket.socket.recvfrom`
* :meth:`~socket.socket.recvmsg`