From 1a31035e97b9b1d67e2bbafa19f020bc86f3e3d7 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Tue, 1 Jul 2025 14:35:03 -0700 Subject: [PATCH 1/3] unpin Cython for Python 3.13 --- conda-recipe/meta.yaml | 6 ------ pyproject.toml | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 812362a627..a6e06f0dfd 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -41,12 +41,6 @@ requirements: - {{ dep }} {% elif dep.startswith('build>=') %} - {{ 'python-' ~ dep }} - {% elif dep.startswith('cython') %} - {% if dep.split(';')[1] == "python_version<'3.13'" %} - - {{ dep.split(';')[0] }} # [py<313] - {% else %} - - {{ dep.split(';')[0] }} # [py>=313] - {% endif %} {% else %} - {{ dep|replace('_','-') }} {% endif %} diff --git a/pyproject.toml b/pyproject.toml index 098eefa0a3..e7795060a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,8 +8,7 @@ requires = [ "scikit-build>=0.17.0", "ninja>=1.11.1; platform_system!='Windows'", "cmake>=3.29.0", - "cython>=3.0.10;python_version<'3.13'", - "cython>=3.0.10,<3.1.0;python_version>='3.13'", + "cython>=3.0.10", "numpy >=1.23", # WARNING: check with doc how to upgrade "versioneer[toml]==0.29" From dcec12587fd6b7a9edf5239b762fdbdfb0f48188 Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Thu, 3 Jul 2025 13:17:43 -0700 Subject: [PATCH 2/3] conditionally avoid pytest-cov if Python is 3.13 --- conda-recipe/run_test.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh index 63ae7996cc..ea36ada687 100644 --- a/conda-recipe/run_test.sh +++ b/conda-recipe/run_test.sh @@ -4,4 +4,8 @@ set -e ${PYTHON} -c "import dpctl; print(dpctl.__version__)" ${PYTHON} -m dpctl -f -${PYTHON} -m pytest -q -ra --disable-warnings --cov dpctl --cov-report term-missing --pyargs dpctl -vv +if ${PYTHON} --version 2>&1 | grep -q '^Python 3\.13'; then + ${PYTHON} -m pytest -q -ra --disable-warnings --pyargs dpctl -vv +else + ${PYTHON} -m pytest -q -ra --disable-warnings --cov dpctl --cov-report term-missing --pyargs dpctl -vv +fi From 31da6930a486a17fc14743da05dc84f32d9c4b6f Mon Sep 17 00:00:00 2001 From: Nikita Grigorian Date: Fri, 1 Aug 2025 16:23:18 -0700 Subject: [PATCH 3/3] add comments specifying why coverage is not used on Python 3.13 --- conda-recipe/run_test.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh index ea36ada687..504977258b 100644 --- a/conda-recipe/run_test.sh +++ b/conda-recipe/run_test.sh @@ -4,6 +4,9 @@ set -e ${PYTHON} -c "import dpctl; print(dpctl.__version__)" ${PYTHON} -m dpctl -f +# don't use coverage for Python 3.13 due to crashes related to +# Cython >= 3.1.0 and Python >= 3.13 +# TODO: remove if crash is triaged if ${PYTHON} --version 2>&1 | grep -q '^Python 3\.13'; then ${PYTHON} -m pytest -q -ra --disable-warnings --pyargs dpctl -vv else