From 9af6d1377d6372dc2bfb7869d00f634248aa0880 Mon Sep 17 00:00:00 2001 From: jakkdl Date: Mon, 19 May 2025 12:52:37 +0200 Subject: [PATCH 1/2] unpin cython --- .github/workflows/ci.yml | 6 ++---- tox.ini | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 562495a4a2..bacdccbd50 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -390,13 +390,11 @@ jobs: - python: '3.9' # We support running on cython 2 and 3 for 3.9 cython: '<3' # cython 2 - python: '3.9' - # cython 3.1.0 broke stuff https://github.com/cython/cython/issues/6865 - cython: '>=3,<3.1' # cython 3 (or greater) + cython: '>=3' # cython 3 (or greater) - python: '3.11' # 3.11 is the last version Cy2 supports cython: '<3' # cython 2 - python: '3.13' # We support running cython3 on 3.13 - # cython 3.1.0 broke stuff https://github.com/cython/cython/issues/6865 - cython: '>=3,<3.1' # cython 3 (or greater) + cython: '>=3' # cython 3 (or greater) steps: - name: Retrieve the project source from an sdist inside the GHA artifact uses: re-actors/checkout-python-sdist@release/v2 diff --git a/tox.ini b/tox.ini index 39d4dece5d..e7f1988008 100644 --- a/tox.ini +++ b/tox.ini @@ -53,7 +53,7 @@ commands = description = "Run cython tests." deps = # cython 3.1.0 broke stuff https://github.com/cython/cython/issues/6865 - cython: cython<3.1.0 + cython: cython cython2: cython<3 setuptools ; python_version >= '3.12' commands_pre = From abd43c4a11070503830b00e06322e0c94f61a0c6 Mon Sep 17 00:00:00 2001 From: jakkdl Date: Mon, 19 May 2025 13:41:19 +0200 Subject: [PATCH 2/2] add cov-cython tox env --- tox.ini | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tox.ini b/tox.ini index e7f1988008..37bb42b7bb 100644 --- a/tox.ini +++ b/tox.ini @@ -63,6 +63,26 @@ commands_pre = commands = python -m tests.cython.run_test_cython +[testenv:cov-cython] +deps = + setuptools + cython +set_env = + CFLAGS= -DCYTHON_TRACE_NOGIL=1A +allowlist_externals = + sed + cp +commands_pre = + python --version + cython --version + cp pyproject.toml {temp_dir}/ + sed -i "s/plugins\ =\ \\[\\]/plugins = [\"Cython.Coverage\"]/" {temp_dir}/pyproject.toml + cythonize --inplace -X linetrace=True tests/cython/test_cython.pyx +commands = + coverage run -m tests.cython.run_test_cython --rcfile={temp_dir}/pyproject.toml + coverage combine + coverage report + [testenv:gen_exports] description = "Run gen_exports.py, regenerating code for public API wrappers." deps =