Author hodgestar
Recipients hodgestar
Date 2008-06-21.17:13:37
SpamBayes Score 0.0275373
Marked as misclassified No
Message-id <1214068420.92.0.41617535069.issue3162@psf.upfronthosting.co.za>
In-reply-to
Content
It appears that ssl.SSLSocket attempts to override some of the methods
socket.socket delegates to the underlying _socket.socket methods.
However, this overriding fails because socket.socket.__init__ replaces
all the methods mentioned in _delegate_methods.

These methods are: recv, recvfrom, recv_into, recvfrom_into, send and
sendto.

ssl.SSLSocket implements recv and send. Neither of these overrides will
actually work.  ssl.SSLSocket also implements recv_from and send_to
which seem to be attempts to override recvfrom and sendto.

In the Py3k branch it looks like the overriding done by
socket.socket.__init__ is gone so that these methods are now potentially
overridable. This could potentially be emulated in trunk by checking for
the methods using hasattr(...) before overriding them.

I'm happy to create patches which fix the method names and clean up the
methods on both branches and add tests. I just want to check that I have
an accurate picture of what's needed before starting on them.
History
Date User Action Args
2008-06-21 17:13:41hodgestarsetspambayes_score: 0.0275373 -> 0.0275373
recipients: + hodgestar
2008-06-21 17:13:40hodgestarsetspambayes_score: 0.0275373 -> 0.0275373
messageid: <1214068420.92.0.41617535069.issue3162@psf.upfronthosting.co.za>
2008-06-21 17:13:39hodgestarlinkissue3162 messages
2008-06-21 17:13:37hodgestarcreate