[issue27629] Cannot create ssl.SSLSocket without existing socket

2016-12-06 Thread nemunaire
Changes by nemunaire <pyt...@nemunai.re>: Removed file: http://bugs.python.org/file43927/fix_sslsocket_init_without_socket_3_3-3_6.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27629] Cannot create ssl.SSLSocket without existing socket

2016-12-06 Thread nemunaire
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

[issue27629] Cannot create ssl.SSLSocket without existing socket

2016-07-28 Thread nemunaire
Changes by nemunaire <pyt...@nemunai.re>: Removed file: http://bugs.python.org/file43900/fix_sslsocket_init_without_socket_3.3-3_6.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27629] Cannot create ssl.SSLSocket without existing socket

2016-07-28 Thread nemunaire
nemunaire added the comment: Here is a new patch with tests on constructor. The patch on the feature is quite different: instead of testing for None socket, I choose to delay the != SOCK_STREAM check in the later condition, when we know we treat a socket. Tests include different constructor

[issue27629] Cannot create ssl.SSLSocket without existing socket

2016-07-26 Thread nemunaire
Changes by nemunaire <pyt...@nemunai.re>: -- title: Cannot create raw ssl.SSLSocket -> Cannot create ssl.SSLSocket without existing socket ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue27629] Cannot create raw ssl.SSLSocket

2016-07-26 Thread nemunaire
New submission from nemunaire: I got this stacktrace: File "test_ssl.py", line 3, in sock = ssl.SSLSocket(server_hostname="docs.python.org") File "/usr/lib/python3.4/ssl.py", line 536, in __init__ if sock.getsockopt(SOL_SOCKET, SO_TYPE) != SOCK_STR