From 18c70d2552b76778137e6f5661fbefb9a0cdf2e1 Mon Sep 17 00:00:00 2001 From: Arpit Kumar Jaiswal Date: Wed, 7 Oct 2026 19:42:32 +0530 Subject: [PATCH 1/3] Require CFFI 2.1.1 on Python 3.15 --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4b6dbbac5331..710e37756753 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires = [ # Must be kept in sync with `project.dependencies` "cffi>=2.0.0; platform_python_implementation != 'PyPy'", - "cffi>=2.1; python_version >= '3.15' and platform_python_implementation != 'PyPy'", + "cffi>=2.1.1; python_version >= '3.15' and platform_python_implementation != 'PyPy'", # Used by cffi (which import distutils, and in Python 3.12, distutils has # been removed from the stdlib, but installing setuptools puts it back) as # well as our build.rs for the rust/cffi bridge. @@ -52,6 +52,7 @@ requires-python = ">=3.9,!=3.9.0,!=3.9.1" dependencies = [ # Must be kept in sync with `build-system.requires` "cffi>=2.0.0; platform_python_implementation != 'PyPy'", + "cffi>=2.1.1; python_version >= '3.15' and platform_python_implementation != 'PyPy'", # Must be kept in sync with ./.github/requirements/build-requirements.{in,txt} "typing-extensions>=4.13.2; python_version < '3.11'", ] From 2c6f99d224f9dda3dde2f6686f0b01dbee6b14b5 Mon Sep 17 00:00:00 2001 From: Arpit Kumar Jaiswal Date: Wed, 7 Oct 2026 19:42:37 +0530 Subject: [PATCH 2/3] Require CFFI 2.1.1 on Python 3.15 --- .github/requirements/build-requirements.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/requirements/build-requirements.in b/.github/requirements/build-requirements.in index 9263954f3545..b5c702ee7643 100644 --- a/.github/requirements/build-requirements.in +++ b/.github/requirements/build-requirements.in @@ -1,7 +1,7 @@ # Must be kept sync with build-system.requires at pyproject.toml setuptools!=74.0.0 cffi>=2.0.0; platform_python_implementation != 'PyPy' -cffi>=2.1; python_version >= '3.15' and platform_python_implementation != 'PyPy' +cffi>=2.1.1; python_version >= '3.15' and platform_python_implementation != 'PyPy' maturin>=1.14.1,<2 # Must be kept sync with build-system.requires at vectors/pyproject.toml From 2eb1aa2321acd446e545fdb68d2519718f60fe8d Mon Sep 17 00:00:00 2001 From: Arpit Kumar Jaiswal Date: Wed, 7 Oct 2026 19:42:42 +0530 Subject: [PATCH 3/3] Document Python 3.15 CFFI requirement --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c2dfd026b986..a826020d9238 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,8 @@ Changelog .. note:: This version is not yet released and is under active development. +* Require CFFI 2.1.1 or newer on Python 3.15 to avoid an ABI issue in + earlier CFFI releases. * :func:`~cryptography.hazmat.primitives.serialization.load_der_private_key` and :func:`~cryptography.hazmat.primitives.serialization.load_pem_private_key` now accept :rfc:`5958` ``OneAsymmetricKey`` (PKCS8 version 2).