From 6e9e489fd80424811d1b228d64f3b1b3d23de2a8 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 28 Jul 2016 23:45:42 -0700 Subject: disable static callbacks on Python 3.5 (refs #2970) (#3063) --- src/_cffi_src/openssl/callbacks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/_cffi_src') diff --git a/src/_cffi_src/openssl/callbacks.py b/src/_cffi_src/openssl/callbacks.py index 3e4ef572..5ae89b18 100644 --- a/src/_cffi_src/openssl/callbacks.py +++ b/src/_cffi_src/openssl/callbacks.py @@ -4,6 +4,8 @@ from __future__ import absolute_import, division, print_function +import sys + import cffi INCLUDES = """ @@ -44,7 +46,8 @@ CUSTOMIZATIONS = """ static const long Cryptography_STATIC_CALLBACKS = 1; """ -if cffi.__version_info__ < (1, 4, 0): +if cffi.__version_info__ < (1, 4, 0) or sys.version_info >= (3, 5): # 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