New submission from Giampaolo Rodola':

This is useful, for example, when running tests as "python3 -Wa" and you bump 
into:

ResourceWarning: unclosed <socket object, fd=8, family=2, type=2, proto=0>

With this we'd get:

<socket.socket fd=8, family=2, type=2, proto=0, laddr=('192.168.1.2', 37537), 
raddr=('173.194.35.6', 80)>

If desirable, I will add some tests.

----------
components: Library (Lib)
files: socket-repr.patch
keywords: patch
messages: 186400
nosy: giampaolo.rodola
priority: normal
severity: normal
status: open
title: show addresses in socket.__repr__
versions: Python 3.4
Added file: http://bugs.python.org/file29751/socket-repr.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17675>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to