mirror of
https://github.com/saymrwulf/cryptography.git
synced 2026-05-14 20:37:55 +00:00
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 <christian@python.org> * remove unused import
This commit is contained in:
parent
1bab7bcf7b
commit
d078e546e2
1 changed files with 1 additions and 4 deletions
|
|
@ -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;
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue