diff options
Diffstat (limited to 'Doc')
| -rw-r--r-- | Doc/library/socket.rst | 4 | ||||
| -rw-r--r-- | Doc/whatsnew/3.6.rst | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index c09927cf34..cd6e3105b0 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -868,6 +868,10 @@ to sockets. it is recommended to :meth:`close` them explicitly, or to use a :keyword:`with` statement around them. + .. versionchanged:: 3.6 + :exc:`OSError` is now raised if an error occurs when the underlying + :c:func:`close` call is made. + .. note:: :meth:`close()` releases the resource associated with a connection but diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index 9be1a9c291..8bf2847159 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -514,6 +514,10 @@ Changes in the Python API * :func:`spwd.getspnam` now raises a :exc:`PermissionError` instead of :exc:`KeyError` if the user doesn't have privileges. +* The :meth:`socket.socket.close` method now raises an exception if + an error (e.g. EBADF) was reported by the underlying system call. + See :issue:`26685`. + Changes in the C API -------------------- |
