[New-bugs-announce] [issue17675] show addresses in socket.__repr__

Giampaolo Rodola' report at bugs.python.org
Tue Apr 9 15:16:10 CEST 2013

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=('', 37537), raddr=('', 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 <report at bugs.python.org>

More information about the New-bugs-announce mailing list