diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-03-30 19:16:11 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-03-30 19:16:11 (GMT) |
commit | f70e1ca0fc30426d12aa8fc6684764ee11a66777 (patch) | |
tree | adde4b05e331c51ea39f603aff8171ca1527cef6 /Doc/library | |
parent | 3f5d48bead8e937aef6f94a3211406270c1a5f8f (diff) | |
download | cpython-f70e1ca0fc30426d12aa8fc6684764ee11a66777.zip cpython-f70e1ca0fc30426d12aa8fc6684764ee11a66777.tar.gz cpython-f70e1ca0fc30426d12aa8fc6684764ee11a66777.tar.bz2 |
Issue #23485: select.select() is now retried automatically with the recomputed
timeout when interrupted by a signal, except if the signal handler raises an
exception. This change is part of the PEP 475.
The asyncore and selectors module doesn't catch the InterruptedError exception
anymore when calling select.select(), since this function should not raise
InterruptedError anymore.
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/errno.rst | 5 | ||||
-rw-r--r-- | Doc/library/exceptions.rst | 7 | ||||
-rw-r--r-- | Doc/library/select.rst | 7 |
3 files changed, 17 insertions, 2 deletions
diff --git a/Doc/library/errno.rst b/Doc/library/errno.rst index d2163b6..22a5cbc 100644 --- a/Doc/library/errno.rst +++ b/Doc/library/errno.rst @@ -41,7 +41,10 @@ defined by the module. The specific list of defined symbols is available as .. data:: EINTR - Interrupted system call + Interrupted system call. + + .. seealso:: + This error is mapped to the exception :exc:`InterruptedError`. .. data:: EIO diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index 271a5c8..bddd0ed 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -536,7 +536,12 @@ depending on the system error code. .. exception:: InterruptedError Raised when a system call is interrupted by an incoming signal. - Corresponds to :c:data:`errno` ``EINTR``. + Corresponds to :c:data:`errno` :py:data:`~errno.EINTR`. + + .. versionchanged:: 3.5 + Python now retries system calls when a syscall is interrupted by a + signal, except if the signal handler raises an exception (see :pep:`475` + for the rationale), instead of raising :exc:`InterruptedError`. .. exception:: IsADirectoryError diff --git a/Doc/library/select.rst b/Doc/library/select.rst index 5334af8..7fe09cb 100644 --- a/Doc/library/select.rst +++ b/Doc/library/select.rst @@ -145,6 +145,13 @@ The module defines the following: library, and does not handle file descriptors that don't originate from WinSock. + .. versionchanged:: 3.5 + The function is now retried with a recomputed timeout when interrupted by + a signal, except if the signal handler raises an exception (see + :pep:`475` for the rationale), instead of raising + :exc:`InterruptedError`. + + .. attribute:: PIPE_BUF The minimum number of bytes which can be written without blocking to a pipe |