diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-07-28 23:11:10 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-07-28 23:11:10 (GMT) |
commit | 6752d65dafd21fe3bf69bef290600d2a18e75754 (patch) | |
tree | b65445f55bf9ff2625cffffd815ba7019bb6fe62 /Doc/whatsnew/3.5.rst | |
parent | 4e167ca7c1a299e8847d6b48067cdaa670d6a64f (diff) | |
download | cpython-6752d65dafd21fe3bf69bef290600d2a18e75754.zip cpython-6752d65dafd21fe3bf69bef290600d2a18e75754.tar.gz cpython-6752d65dafd21fe3bf69bef290600d2a18e75754.tar.bz2 |
What's New in Python 3.5: move PEP 475 doc
Diffstat (limited to 'Doc/whatsnew/3.5.rst')
-rw-r--r-- | Doc/whatsnew/3.5.rst | 117 |
1 files changed, 65 insertions, 52 deletions
diff --git a/Doc/whatsnew/3.5.rst b/Doc/whatsnew/3.5.rst index d80be02..8dee183 100644 --- a/Doc/whatsnew/3.5.rst +++ b/Doc/whatsnew/3.5.rst @@ -227,6 +227,68 @@ PEP 475: Retry system calls failing with EINTR EINTR or :exc:`InterruptedError` manually, and should make it more robust against asynchronous signal reception. +Examples of functions which are now retried when interrupted by a signal +instead of raising :exc:`InterruptedError` if the Python signal handler does +not raise an exception: + +* :func:`open`, :func:`os.open`, :func:`io.open` +* functions of the :mod:`faulthandler` module +* :mod:`os` functions: + + - :func:`os.fchdir` + - :func:`os.fchmod` + - :func:`os.fchown` + - :func:`os.fdatasync` + - :func:`os.fstat` + - :func:`os.fstatvfs` + - :func:`os.fsync` + - :func:`os.ftruncate` + - :func:`os.mkfifo` + - :func:`os.mknod` + - :func:`os.posix_fadvise` + - :func:`os.posix_fallocate` + - :func:`os.pread` + - :func:`os.pwrite` + - :func:`os.read` + - :func:`os.readv` + - :func:`os.sendfile` + - :func:`os.wait3` + - :func:`os.wait4` + - :func:`os.wait` + - :func:`os.waitid` + - :func:`os.waitpid` + - :func:`os.write` + - :func:`os.writev` + - special cases: :func:`os.close` and :func:`os.dup2` now ignore + :py:data:`~errno.EINTR` error, the syscall is not retried (see the PEP + for the rationale) + +* :mod:`select` functions: + + - :func:`select.devpoll.poll` + - :func:`select.epoll.poll` + - :func:`select.kqueue.control` + - :func:`select.poll.poll` + - :func:`select.select` + +* :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` + - :meth:`~socket.socket.send` + - :meth:`~socket.socket.sendall` + - :meth:`~socket.socket.sendmsg` + - :meth:`~socket.socket.sendto` + +* :func:`signal.sigtimedwait`, :func:`signal.sigwaitinfo` +* :func:`time.sleep` + +PEP and implementation written by Charles-François Natali and Victor Stinner, +with the help of Antoine Pitrou (the french connection). + .. seealso:: :pep:`475` -- Retry system calls failing with EINTR @@ -966,58 +1028,9 @@ that may require changes to your code. Changes in the Python API ------------------------- -* :pep:`475`: Examples of functions which are now retried when interrupted - instead of raising :exc:`InterruptedError` if the signal handler does not - raise an exception: - - - :func:`open`, :func:`os.open`, :func:`io.open` - - functions of the :mod:`faulthandler` module - - :mod:`os` functions: - - * :func:`os.fchdir` - * :func:`os.fchmod` - * :func:`os.fchown` - * :func:`os.fdatasync` - * :func:`os.fstat` - * :func:`os.fstatvfs` - * :func:`os.fsync` - * :func:`os.ftruncate` - * :func:`os.mkfifo` - * :func:`os.mknod` - * :func:`os.posix_fadvise` - * :func:`os.posix_fallocate` - * :func:`os.pread` - * :func:`os.pwrite` - * :func:`os.read` - * :func:`os.readv` - * :func:`os.sendfile` - * :func:`os.wait3` - * :func:`os.wait4` - * :func:`os.wait` - * :func:`os.waitid` - * :func:`os.waitpid` - * :func:`os.write` - * :func:`os.writev` - * special cases: :func:`os.close` and :func:`os.dup2` now ignore - :py:data:`~errno.EINTR` error, the syscall is not retried (see the PEP - for the rationale) - - - :func:`select.select`, :func:`select.poll.poll`, :func:`select.epoll.poll`, - :func:`select.kqueue.control`, :func:`select.devpoll.poll` - - :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` - * :meth:`~socket.socket.send` - * :meth:`~socket.socket.sendall` - * :meth:`~socket.socket.sendmsg` - * :meth:`~socket.socket.sendto` - - - :func:`signal.sigtimedwait`, :func:`signal.sigwaitinfo` - - :func:`time.sleep` +* :pep:`475`: System calls are now retried when interrupted by a signal instead + of raising :exc:`InterruptedError` if the Python signal handler does not + raise an exception. * Before Python 3.5, a :class:`datetime.time` object was considered to be false if it represented midnight in UTC. This behavior was considered obscure and |