aboutsummaryrefslogtreecommitdiff
path: root/frozen_deps/Cryptodome/Util/_raw_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'frozen_deps/Cryptodome/Util/_raw_api.py')
-rw-r--r--frozen_deps/Cryptodome/Util/_raw_api.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/frozen_deps/Cryptodome/Util/_raw_api.py b/frozen_deps/Cryptodome/Util/_raw_api.py
index c2e0187..cd64ac8 100644
--- a/frozen_deps/Cryptodome/Util/_raw_api.py
+++ b/frozen_deps/Cryptodome/Util/_raw_api.py
@@ -76,6 +76,12 @@ try:
if '__pypy__' not in sys.builtin_module_names and sys.flags.optimize == 2:
raise ImportError("CFFI with optimize=2 fails due to pycparser bug.")
+ # cffi still uses PyUnicode_GetSize, which was removed in Python 3.12
+ # thus leading to a crash on cffi.dlopen()
+ # See https://groups.google.com/u/1/g/python-cffi/c/oZkOIZ_zi5k
+ if sys.version_info >= (3, 12) and os.name == "nt":
+ raise ImportError("CFFI is not compatible with Python 3.12 on Windows")
+
from cffi import FFI
ffi = FFI()