[pypy-commit] pypy py3k: fix for 30065a062e2c
pjenvey
noreply at buildbot.pypy.org
Wed Jan 15 03:12:34 CET 2014
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r68675:0f695956f1f6
Date: 2014-01-14 18:11 -0800
http://bitbucket.org/pypy/pypy/changeset/0f695956f1f6/
Log: fix for 30065a062e2c
diff --git a/pypy/module/_ssl/interp_ssl.py b/pypy/module/_ssl/interp_ssl.py
--- a/pypy/module/_ssl/interp_ssl.py
+++ b/pypy/module/_ssl/interp_ssl.py
@@ -92,7 +92,7 @@
class SSLContext(W_Root):
- def __init__(self, protocol):
+ def __init__(self, space, protocol):
if protocol == PY_SSL_VERSION_TLS1:
method = libssl_TLSv1_method()
elif protocol == PY_SSL_VERSION_SSL3:
@@ -121,7 +121,7 @@
@unwrap_spec(protocol=int)
def descr_new(space, w_subtype, protocol=PY_SSL_VERSION_SSL23):
self = space.allocate_instance(SSLContext, w_subtype)
- self.__init__(protocol)
+ self.__init__(space, protocol)
if not self.ctx:
raise ssl_error(space, "failed to allocate SSL context")
return space.wrap(self)
diff --git a/pypy/module/_ssl/test/test_ssl.py b/pypy/module/_ssl/test/test_ssl.py
--- a/pypy/module/_ssl/test/test_ssl.py
+++ b/pypy/module/_ssl/test/test_ssl.py
@@ -215,7 +215,7 @@
def test_options(self):
import _ssl
ctx = _ssl._SSLContext(_ssl.PROTOCOL_TLSv1)
- assert _ssl.OP_ALL == ctx.options
+ assert _ssl.OP_ALL | _ssl.OP_NO_SSLv2 == ctx.options
More information about the pypy-commit
mailing list