Feat: Add free-threaded Python support - #357
Conversation
There was a problem hiding this comment.
Pull request overview
This PR enables free-threaded (PEP 703) Python support for mkl_fft by marking the Cython extension as free-threading compatible, aligning build tooling requirements, and expanding CI/conda packaging to cover both CPython 3.14 (GIL) and 3.14t (free-threaded) variants.
Changes:
- Mark
mkl_fft/_pydfti.pyxasfreethreading_compatiblefor Cython and pin Cython to>=3.1.0across build/packaging. - Update conda recipes to require
cython >=3.1.0and removepython-gilpins. - Extend conda/pip CI matrices to build/test CPython 3.14
cp314andcp314tvariants and adjust cache/artifact naming accordingly.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Pins build-time Cython to >=3.1.0 for free-threading support features. |
| mkl_fft/_pydfti.pyx | Declares the extension as free-threading compatible via a Cython directive. |
| conda-recipe/meta.yaml | Aligns Intel-channel recipe with Cython >=3.1.0 and drops python-gil pins. |
| conda-recipe-cf/meta.yaml | Aligns conda-forge recipe with Cython >=3.1.0 and drops python-gil pins. |
| AGENTS.md | Updates documented build dependencies to reflect the Cython pin. |
| .github/workflows/conda-package.yml | Adds 3.14 cp314 and cp314t build/test coverage and distinguishes variants in cache/artifacts. |
| .github/workflows/conda-package-cf.yml | Mirrors conda-forge CI to build/test both 3.14 variants and adjust cache/artifacts. |
| .github/workflows/build-with-standard-clang.yml | Adds 3.14t to the Python matrix (currently incompatible with actions/setup-python). |
| .github/workflows/build-with-clang.yml | Adds 3.14t to the Python matrix (currently incompatible with actions/setup-python). |
| .github/workflows/build_pip.yml | Adds 3.14 cp314/cp314t variants via a python_spec matchspec approach. |
| - name: Install mkl_fft dependencies | ||
| run: | | ||
| pip install meson-python ninja cython cmake | ||
| pip install meson-python ninja "cython>=3.1.0" cmake |
There was a problem hiding this comment.
Need to update .github/workflows/coverity.yml also with "cython>=3.1.0"
| "meson-python>=0.13.0", | ||
| "ninja", | ||
| "Cython", | ||
| "Cython>=3.1.0", |
There was a problem hiding this comment.
please add the free-threading compatible (beta) classifier below as well
|
Testing this PR captured a few issues, which are being resolved in a separate PR. When above feedback is applied, I think this can go in. |
Summary
Enable free-threaded Python support for
mkl_fft.The Meson migration in #303 is now merged, so this PR contains only the
changes required for free-threaded support.
Depends on IntelPython/mkl-service#213 for a compatible free-threaded
mkl-servicepackage.