Yury Selivanov added the comment:

I think this patch should be reverted.  It breaks backwards compatibility:

    import socket

    sock0 = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
    sock = socket.socket(
        socket.AF_INET, socket.SOCK_STREAM, 0, sock0.fileno())
    sock0.close()

    sock.close()


This code behaves differently on 3.5 vs 3.6.

In uvloop (https://github.com/magicstack/uvloop) I create Python sockets for 
libuv socket handles. Sometimes, those handles are closed by libuv, and I have 
no control over that. So right now, a lot of uvloop tests fail because 
socket.close() now can raise an error.

It also doesn't make any sense to raise it anyways.  socket.close() *must* be 
safe to call even when the socket is already closed.

----------
nosy: +yselivanov
status: closed -> open

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

Reply via email to