Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a766ddf

Browse files
committed
Issue #23648: Document the PEP 475 in the "Porting to Python 3.5" section and
add a version changed note in modified functions.
1 parent 1912b39 commit a766ddf

3 files changed

Lines changed: 33 additions & 0 deletions

File tree

Doc/library/functions.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,11 @@ are always available. They are listed here in alphabetical order.
10651065

10661066
The ``'U'`` mode.
10671067

1068+
.. versionchanged:: 3.5
1069+
If the system call is interrupted and the signal does not raise an
1070+
exception, the function now retries the system call instead of raising an
1071+
:exc:`InterruptedError` exception (see :pep:`475` for the rationale).
1072+
10681073

10691074
.. function:: ord(c)
10701075

Doc/library/os.rst

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,11 @@ as internal buffering of data.
905905
.. versionadded:: 3.3
906906
The *dir_fd* argument.
907907

908+
.. versionchanged:: 3.5
909+
If the system call is interrupted and the signal does not raise an
910+
exception, the function now retries the system call instead of raising an
911+
:exc:`InterruptedError` exception (see :pep:`475` for the rationale).
912+
908913
The following constants are options for the *flags* parameter to the
909914
:func:`~os.open` function. They can be combined using the bitwise OR operator
910915
``|``. Some of them are not available on all platforms. For descriptions of
@@ -1082,6 +1087,11 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
10821087
:func:`popen` or :func:`fdopen`, or :data:`sys.stdin`, use its
10831088
:meth:`~file.read` or :meth:`~file.readline` methods.
10841089

1090+
.. versionchanged:: 3.5
1091+
If the system call is interrupted and the signal does not raise an
1092+
exception, the function now retries the system call instead of raising an
1093+
:exc:`InterruptedError` exception (see :pep:`475` for the rationale).
1094+
10851095

10861096
.. function:: sendfile(out, in, offset, nbytes)
10871097
sendfile(out, in, offset, nbytes, headers=None, trailers=None, flags=0)
@@ -1197,6 +1207,11 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
11971207
:func:`fdopen`, or :data:`sys.stdout` or :data:`sys.stderr`, use its
11981208
:meth:`~file.write` method.
11991209

1210+
.. versionchanged:: 3.5
1211+
If the system call is interrupted and the signal does not raise an
1212+
exception, the function now retries the system call instead of raising an
1213+
:exc:`InterruptedError` exception (see :pep:`475` for the rationale).
1214+
12001215

12011216
.. function:: writev(fd, buffers)
12021217

@@ -3359,6 +3374,11 @@ written in Python, such as a mail server's external command delivery program.
33593374
id is known, not necessarily a child process. The :func:`spawn\* <spawnl>`
33603375
functions called with :const:`P_NOWAIT` return suitable process handles.
33613376

3377+
.. versionchanged:: 3.5
3378+
If the system call is interrupted and the signal does not raise an
3379+
exception, the function now retries the system call instead of raising an
3380+
:exc:`InterruptedError` exception (see :pep:`475` for the rationale).
3381+
33623382

33633383
.. function:: wait3(options)
33643384

Doc/whatsnew/3.5.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,14 @@ that may require changes to your code.
572572
Changes in the Python API
573573
-------------------------
574574

575+
* :pep:`475`: the following functions are now retried when interrupted instead
576+
of raising :exc:`InterruptedError` if the signal handler does not raise
577+
an exception:
578+
579+
- :func:`os.open`, :func:`open`
580+
- :func:`os.read`, :func:`os.write`
581+
- :func:`time.sleep`
582+
575583
* Before Python 3.5, a :class:`datetime.time` object was considered to be false
576584
if it represented midnight in UTC. This behavior was considered obscure and
577585
error-prone and has been removed in Python 3.5. See :issue:`13936` for full

0 commit comments

Comments
 (0)