Repository navigation
improve tests for python 3.14 #3906
Description
Activity
To be confident about free-threaded compatibility, it is recommended to test with
pytest-run-parallel.Something like:
%uvx --with=pytest-run-parallel pytest --iterations=8 --parallel-threads=autoThanks @cclauss! I have added another workflow to test the free-threaded version of python 3.14 in #3907. The workflow is currently, as expected, failing, see https://github.com/vega/altair/actions/runs/19181574029/job/54839362746#step:6:1. But hopefully in coming period can check which dev dependencies are the culprit and which tests shall be skipped in this process. Do you have a free-threaded version of python locally to test this a bit more? Otherwise will continue testing through the github action workflow, albeit more cumbersome.
%
uv run pytest -o addopts= --pyargs --doctest-modules --doctest-ignore-import-errors --iterations=8 --parallel-threads=auto tests
--> # Add the dependencies needed...
%uv run --python=3.14t --with=numpy,pandas pytest -o addopts= --pyargs --doctest-modules --doctest-ignore-import-errors --iterations=8 --parallel-threads=auto testsI took a look at the current state of this.
The first two bullets seem to be handled already by #3975: geopandas and duckdb are no longer pinned away from Python 3.14 in pyproject.toml.
The remaining open question looks like the free-threaded Python 3.14 workflow from #3907. It is currently manual-only, and several optional dependencies are still commented out. From current wheel availability, pyarrow, pandas, and numpy appear to have 3.14t wheels, while duckdb and polars still do not.
Would you prefer a PR that enables partial 3.14t coverage now, keeping unsupported optional deps skipped, or should this wait until the remaining optional dependencies publish 3.14t wheels?
Thanks for looking into this @axelray-dev. Maybe a PR that enables partial 3.14t coverage would be helpful now already; particularly if it also documents what is required / what is blocking to get to full covereage. E.g. linking some of the issues to watch (ie pola-rs/polars#21889 for polars) and maybe even includes what code to add when these become available?
Status?
The latest updates are in the PR linked above: #4038
- Yes. Given that ci: enable partial Python 3.14t coverage #4038 is merged, are there remaining TODOs on this issue, or should it be closed?
Should testing begin on Python 3.15 beta 3?
I think we can keep this open since there are still blockers listed in that PR that prevents full support for our test suite:
- ruff: no cp314t wheels available yet
- duckdb: no free-threaded builds (Free threading 314t - Initial / Experimental Builds duckdb/duckdb-python#76)
- polars: pyo3/numpy crate incompatibility (Build fails with free-threaded Python pola-rs/polars#21889)
Should testing begin on Python 3.15 beta 3?
Thanks for linking, it seems like it could; feel free to open a PR.
ruff: no cp314t wheels available yet
I am confused. Ruff is released as a Rust binary executable that runs just fine without Python installed.
Good catch, I think the reason there is no wheel tagged specifically with
cp314tis that they use thepy3-none-...tags for each platform to indicate that the wheel is not tied to a CPython ABI since it is a separate binary, so the cp314t free-threaded ABI distinction should not matter for installing Ruff.@axelray-dev Can you confirm if you tested to install ruff and it didn't work with py 3.14t in #4038 or if you only looked for the presence of the tag on pypi?
Good catch. I did not verify Ruff by installing it under Python 3.14t; I only checked for a cp314t-specific wheel tag, so that blocker note was likely too conservative.
Since Ruff publishes Python-ABI-independent wheels/binaries, it should not need a cp314t tag. I think the next step is to uncomment the Ruff install in the free-threaded workflow and validate it via workflow_dispatch. DuckDB and Polars still look like the real blockers.
- added a commit that references this issue
on Jun 25, 2026
What is your suggestion?
Have you considered any alternative solutions?
No response