[issue9794] socket.create_connection context manager

2010-09-08 Thread Giampaolo Rodola'
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

[issue9794] socket.create_connection context manager

2010-09-08 Thread Giampaolo Rodola'
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 ___

[issue9794] socket.create_connection context manager

2010-09-07 Thread Giampaolo Rodola'
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

[issue9794] socket.create_connection context manager

2010-09-07 Thread Antoine Pitrou
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

[issue9794] socket.create_connection context manager

2010-09-07 Thread Giampaolo Rodola'
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

[issue9794] socket.create_connection context manager

2010-09-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- assignee: - giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9794 ___ ___