Skip to content

Commit 67ce430

Browse files
lysnikolaoubdraco
andauthored
Use Cython 3.1 universally (#1514)
Co-authored-by: J. Nick Koston <[email protected]>
1 parent 63c4461 commit 67ce430

File tree

9 files changed

+12
-29
lines changed

9 files changed

+12
-29
lines changed

.github/workflows/ci-cd.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,7 @@ jobs:
259259
uses: py-actions/py-dependency-install@v4
260260
with:
261261
path: >-
262-
requirements/test${{
263-
matrix.pyver == '3.13t' && '-freethreading' || ''
264-
}}.txt
262+
requirements/test.txt
265263
- name: Determine pre-compiled compatible wheel
266264
env:
267265
# NOTE: When `pip` is forced to colorize output piped into `jq`,

CHANGES/1514.packaging.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated to use Cython 3.1 universally across the build path -- by :user:`lysnikolaou`.

packaging/pep517_backend/_backend.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from __future__ import annotations
55

66
import os
7-
import sysconfig
87
from collections.abc import Iterator
98
from contextlib import contextmanager, nullcontext, suppress
109
from functools import partial
@@ -376,10 +375,8 @@ def get_requires_for_build_wheel(
376375

377376
if is_pure_python_build:
378377
c_ext_build_deps = []
379-
elif sysconfig.get_config_var('Py_GIL_DISABLED'):
380-
c_ext_build_deps = ['Cython ~= 3.1.0a1']
381378
else:
382-
c_ext_build_deps = ['Cython >= 3.0.12']
379+
c_ext_build_deps = ['Cython >= 3.1.2']
383380

384381
return _setuptools_get_requires_for_build_wheel(
385382
config_settings=config_settings,

pyproject.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,3 @@ pure-python = "false"
9191

9292
[tool.cibuildwheel.windows]
9393
before-test = [] # Windows cmd has different syntax and pip chooses wheels
94-
95-
# TODO: Remove this when there's a Cython 3.1 final release
96-
# Remove PIP_CONSTRAINT from the environment
97-
[[tool.cibuildwheel.overrides]]
98-
select = "cp313t-*"
99-
100-
test-requires = "-r requirements/test-freethreading.txt"
101-
inherit.environment = "append"
102-
environment = {PIP_CONSTRAINT = "requirements/cython-freethreading.txt"}

requirements/cython-freethreading.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

requirements/cython.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
cython==3.0.12
1+
cython==3.1.2

requirements/test-freethreading.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

requirements/test-pure.txt

Lines changed: 0 additions & 8 deletions
This file was deleted.

requirements/test.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
-r cython.txt
2-
-r test-pure.txt
2+
covdefaults
3+
hypothesis>=6.0
4+
idna==3.10
5+
multidict==6.4.4
6+
propcache==0.3.1
7+
pytest==8.4.0
8+
pytest-cov>=2.3.1
9+
pytest-xdist

0 commit comments

Comments
 (0)