[issue3162] ssl.SSLSocket implements methods that are overriden by socket.socket.__init__ and methods with incorrect names.

Simon Cross report at bugs.python.org
Fri Sep 5 14:00:27 CEST 2008


Simon Cross <hodgestar at gmail.com> added the comment:

I've attached a patch for trunk / 2.6 that adds recv_into and
recvfrom_into methods to ssl.SSLSocket and does a minor re-ordering of
the nasty lambdas in __init__. The recv_into method is a port of the one
from 3.0. The recvfrom_into method is a simple "fail if we have an SSL
object or pass down if we don't".

For the record, I'm against the lambdas in SSLSocket.__init__ and would
prefer the solution I suggested previously of putting a hasattr(...)
check into socket.socket (I can submit a patch if useful).

As is probably abundantly clear at the moment :), none of the SSLSocket
methods in questions have tests in test_ssl -- I will move on to trying
to add them next.

I'm also going to attach a patch for 3.0 which adds recvfrom_into (a
port of the 2.6 one).

----------
keywords: +patch
Added file: http://bugs.python.org/file11389/trunk-ssl-methods.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3162>
_______________________________________


More information about the Python-bugs-list mailing list