diff options
author | Giampaolo Rodolà <g.rodola@gmail.com> | 2010-09-08 22:44:12 (GMT) |
---|---|---|
committer | Giampaolo Rodolà <g.rodola@gmail.com> | 2010-09-08 22:44:12 (GMT) |
commit | b383dbb45e62054e3a73792b7e903178bee18aa8 (patch) | |
tree | 929fb3d74b0bfb2d5427789722ee3363b535e7c4 /Doc/whatsnew/3.2.rst | |
parent | 7c9cf01238cdfb597041d12e71d5a11a98402b34 (diff) | |
download | cpython-b383dbb45e62054e3a73792b7e903178bee18aa8.zip cpython-b383dbb45e62054e3a73792b7e903178bee18aa8.tar.gz cpython-b383dbb45e62054e3a73792b7e903178bee18aa8.tar.bz2 |
Fix issue 9794: adds context manager protocol to socket.socket so that socket.create_connection() can be used with the 'with' statement.
Diffstat (limited to 'Doc/whatsnew/3.2.rst')
-rw-r--r-- | Doc/whatsnew/3.2.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.2.rst b/Doc/whatsnew/3.2.rst index 4969623..7d8970b 100644 --- a/Doc/whatsnew/3.2.rst +++ b/Doc/whatsnew/3.2.rst @@ -389,6 +389,12 @@ New, Improved, and Deprecated Modules (Contributed by Giampaolo Rodolà; :issue:`8807`.) +* :func:`socket.create_connection` now supports the context manager protocol + to unconditionally consume :exc:`socket.error` exceptions and to close the + socket when done. + + (Contributed by Giampaolo Rodolà; :issue:`9794`.) + Multi-threading =============== |