[issue9729] Unconnected SSLSocket.{send, recv} raises TypeError: 'member_descriptor' object is not callable
Andrew Bennetts
report at bugs.python.org
Tue Sep 14 08:28:10 CEST 2010
Andrew Bennetts <spiv at users.sourceforge.net> added the comment:
Here's a conservative fix for Python 2.7. It replaces the attempts to call baseclass.method with direct calls to the decorated object (i.e. replace socket.meth(self, ...) with self._sock.meth(...)).
It also corrects a bunch of incorrect arguments being passed to _sock... it's pretty clear this code was not tested. I've added a test that exercises each SSLSocket method that corresponds to a socket._delegate_method.
A nicer solution is to simply make socket.socket actually be a simple subclass of _socket.socket rather than the weird decorator it is now. This has already happened on the py3k branch, which is why it doesn't have this bug.
----------
keywords: +patch
Added file: http://bugs.python.org/file18878/issue9729.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9729>
_______________________________________
More information about the Python-bugs-list
mailing list