Apply _reuse patch to socket.py