Giampaolo Rodola' g.rod...@gmail.com added the comment:
Patch which updates doc is in attachment.
--
Added file: http://bugs.python.org/file18804/socket_ctx_mgr.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9794
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Committed in r84639.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9794
___
New submission from Giampaolo Rodola' g.rod...@gmail.com:
Patch in attachment adds a context manager to socket.socket class so that
socket.create_connection() can be used with with statement.
--
components: Library (Lib)
files: socket_ctx_mgr.patch
keywords: patch
messages: 115812
Antoine Pitrou pit...@free.fr added the comment:
You don't need to use socketserver. Take a look at how the other tests in
test_socket are written. Inheriting from ThreadedTCPSocketTest should be easy.
--
___
Python tracker rep...@bugs.python.org
Giampaolo Rodola' g.rod...@gmail.com added the comment:
It wasn't easy but here it is. =)
I'll submit a patch which updates the doc tomorrow.
--
Added file: http://bugs.python.org/file18790/socket_ctx_mgr.patch
___
Python tracker
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
assignee: - giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9794
___
___