Antoine Pitrou <pit...@free.fr> added the comment:

I would need opinions on one more thing. The current patch warns when a socket 
has not been explicitly closed. But it does so even when the socket isn't bound 
at all. e.g.:

$ ./python -c "import socket; socket.socket()"
-c:1: ResourceWarning: unclosed <socket.socket object, fd=3, family=2, type=1, 
proto=0>

Perhaps we should be more discriminate and only warn when either bind(), 
listen() or connect() had been called previously? What do you think?

----------

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

Reply via email to