From d078e546e2ebfaa37ebe92c446ff437183312530 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Wed, 18 Jan 2017 08:02:38 +0100 Subject: Use static callbacks with Python 3.x again (#3350) * Use static callbacks with Python 3.x again Static callbacks were disabled for Python 3.5+ to work around an issue with subinterpreters, locking callbacks and osrandom engine. Locking callback and osrandom engine were replaced with a C implementations in version 1.6 and 1.7. https://github.com/pyca/cryptography/issues/2970 Closes: #3348 Signed-off-by: Christian Heimes * remove unused import --- src/_cffi_src/openssl/callbacks.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/_cffi_src') diff --git a/src/_cffi_src/openssl/callbacks.py b/src/_cffi_src/openssl/callbacks.py index 4a6b4d37..0194d2a5 100644 --- a/src/_cffi_src/openssl/callbacks.py +++ b/src/_cffi_src/openssl/callbacks.py @@ -4,8 +4,6 @@ from __future__ import absolute_import, division, print_function -import sys - import cffi INCLUDES = """ @@ -50,9 +48,8 @@ CUSTOMIZATIONS = """ static const long Cryptography_STATIC_CALLBACKS = 1; """ -if cffi.__version_info__ < (1, 4, 0) or sys.version_info >= (3, 5): +if cffi.__version_info__ < (1, 4, 0): # backwards compatibility for old cffi version on PyPy - # and Python >=3.5 (https://github.com/pyca/cryptography/issues/2970) TYPES = "static const long Cryptography_STATIC_CALLBACKS;" CUSTOMIZATIONS = """static const long Cryptography_STATIC_CALLBACKS = 0; """ -- cgit v1.2.3