Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3.6
Changeset: r94422:85c682c5ec33
Date: 2018-04-23 00:38 +0200
http://bitbucket.org/pypy/pypy/changeset/85c682c5ec33/
Log: The class is named ssl.SSLSession. Restore the import in ssl.py
diff --git a/lib-python/3/ssl.py b/lib-python/3/ssl.py
--- a/lib-python/3/ssl.py
+++ b/lib-python/3/ssl.py
@@ -100,7 +100,7 @@
import _ssl # if we can't import it, let the error propagate
from _ssl import OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_INFO, OPENSSL_VERSION
-from _ssl import _SSLContext, MemoryBIO#, SSLSession # XXX: PyPy hack
+from _ssl import _SSLContext, MemoryBIO, SSLSession
from _ssl import (
SSLError, SSLZeroReturnError, SSLWantReadError, SSLWantWriteError,
SSLSyscallError, SSLEOFError,
diff --git a/lib_pypy/_cffi_ssl/_stdssl/__init__.py
b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
--- a/lib_pypy/_cffi_ssl/_stdssl/__init__.py
+++ b/lib_pypy/_cffi_ssl/_stdssl/__init__.py
@@ -695,11 +695,11 @@
@property
def session(self):
"Get / set SSLSession."
- return Session(self)
+ return SSLSession(self)
@session.setter
def session(self, value):
- if not isinstance(value, Session):
+ if not isinstance(value, SSLSession):
raise TypeError("Value is not a SSLSession.")
if self.ctx.ctx != value._ctx.ctx:
raise ValueError("Session refers to a different SSLContext.")
@@ -742,7 +742,7 @@
return (cipher_name, cipher_protocol, bits)
-class Session(object):
+class SSLSession(object):
def __new__(cls, ssl):
self = object.__new__(cls)
session = lib.SSL_get1_session(ssl.ssl)
@@ -753,7 +753,7 @@
return self
def __eq__(self, other):
- if not isinstance(other, Session):
+ if not isinstance(other, SSLSession):
return NotImplemented;
return self.id == other.id
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit