[issue9794] socket.create_connection context manager

2010-09-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Committed in r84639. -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ P

[issue9794] socket.create_connection context manager

2010-09-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Patch which updates doc is in attachment. -- Added file: http://bugs.python.org/file18804/socket_ctx_mgr.patch ___ Python tracker ___ ___

[issue9794] socket.create_connection context manager

2010-09-07 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- assignee: -> giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9794] socket.create_connection context manager

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

[issue9794] socket.create_connection context manager

2010-09-07 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola' : 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 nosy: amaury.forgeot