[issue27629] Cannot create ssl.SSLSocket without existing socket

nemunaire report at bugs.python.org
Tue Dec 6 13:36:44 EST 2016


nemunaire added the comment:

The documentation already recommends to use SSLContext.wrap_socket(), but it didn't cover all use cases. Eg. I use multiple inheritance to handle both socket and SSLSocket inside a factory pattern, in order to override some methods defined in both classes. If I use SSLContext.wrap_socket(), it erases my overrides.

As the patch add some tests on this feature, this is no more dead code; however I let you decide the future of this issue: I've updated my patch with your remarks if you want to include it (it applies from Python 3.3 to current Python 3.6).

----------
Added file: http://bugs.python.org/file45778/fix_sslsocket_init_without_socket_3_3-3_6.patch

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


More information about the Python-bugs-list mailing list