From e8d0aeecf7c516a521137ee976569481b802f554 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Tue, 16 Sep 2025 16:34:09 -0600 Subject: [PATCH 1/3] Depend on CFFI 2.0.0 or newer on Python > 3.8 --- pyproject.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 531956cec174..309d1f2cbd01 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,8 +5,8 @@ requires = [ "maturin>=1.9.4,<2", # Must be kept in sync with `project.dependencies` - "cffi>=1.14; platform_python_implementation != 'PyPy' and python_version < '3.14'", - "cffi>=2.0.0; platform_python_implementation != 'PyPy' and python_version >= '3.14'", + "cffi>=1.14; platform_python_implementation != 'PyPy' and python_version == '3.8'", + "cffi>=2.0.0; platform_python_implementation != 'PyPy' and python_version > '3.9'", # 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. @@ -51,8 +51,8 @@ classifiers = [ requires-python = ">=3.8,!=3.9.0,!=3.9.1" dependencies = [ # Must be kept in sync with `build-system.requires` - "cffi>=1.14; platform_python_implementation != 'PyPy' and python_version < '3.14'", - "cffi>=2.0.0; platform_python_implementation != 'PyPy' and python_version >= '3.14'", + "cffi>=1.14; platform_python_implementation != 'PyPy' and python_version == '3.8'", + "cffi>=2.0.0; platform_python_implementation != 'PyPy' and python_version > '3.9'", # Must be kept in sync with ./.github/requirements/build-requirements.{in,txt} "typing-extensions>=4.13.2; python_version < '3.11'", ] From af36b0649e9a21183e444902975535f9a929183a Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Tue, 16 Sep 2025 16:40:49 -0600 Subject: [PATCH 2/3] fix comparison and update build_requirements.in --- .github/requirements/build-requirements.in | 4 ++-- pyproject.toml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/requirements/build-requirements.in b/.github/requirements/build-requirements.in index 29b1503efff1..abcffac9b096 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>=1.12; platform_python_implementation != 'PyPy' and python_version < '3.14' -cffi>=2.0.0; platform_python_implementation != 'PyPy' and python_version >= '3.14' +cffi>=1.12; platform_python_implementation != 'PyPy' and python_version == '3.8' +cffi>=2.0.0; platform_python_implementation != 'PyPy' and python_version >= '3.9' maturin>=1,<2 # Must be kept sync with build-system.requires at vectors/pyproject.toml diff --git a/pyproject.toml b/pyproject.toml index 309d1f2cbd01..8b1dfb2b9e6a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires = [ # Must be kept in sync with `project.dependencies` "cffi>=1.14; platform_python_implementation != 'PyPy' and python_version == '3.8'", - "cffi>=2.0.0; platform_python_implementation != 'PyPy' and python_version > '3.9'", + "cffi>=2.0.0; platform_python_implementation != 'PyPy' and python_version >= '3.9'", # 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,7 +52,7 @@ requires-python = ">=3.8,!=3.9.0,!=3.9.1" dependencies = [ # Must be kept in sync with `build-system.requires` "cffi>=1.14; platform_python_implementation != 'PyPy' and python_version == '3.8'", - "cffi>=2.0.0; platform_python_implementation != 'PyPy' and python_version > '3.9'", + "cffi>=2.0.0; platform_python_implementation != 'PyPy' and python_version >= '3.9'", # Must be kept in sync with ./.github/requirements/build-requirements.{in,txt} "typing-extensions>=4.13.2; python_version < '3.11'", ] From baa0013fd290dd423e749a4f7724d9cd8056eb91 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Tue, 16 Sep 2025 16:46:55 -0600 Subject: [PATCH 3/3] fix typo --- .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 abcffac9b096..b55742d0c311 100644 --- a/.github/requirements/build-requirements.in +++ b/.github/requirements/build-requirements.in @@ -1,6 +1,6 @@ # Must be kept sync with build-system.requires at pyproject.toml setuptools!=74.0.0 -cffi>=1.12; platform_python_implementation != 'PyPy' and python_version == '3.8' +cffi>=1.14; platform_python_implementation != 'PyPy' and python_version == '3.8' cffi>=2.0.0; platform_python_implementation != 'PyPy' and python_version >= '3.9' maturin>=1,<2