CI: try free-threaded Python 3.14t (DRAFT — documenting failures) - #15104
CI: try free-threaded Python 3.14t (DRAFT — documenting failures)#15104priya-sundaram-dev wants to merge 5 commits into
Conversation
Closing this pull request as invalid@priya-sundaram-dev, this pull request is being closed as none of the checkboxes have been marked. It is important that you go through the checklist and mark the ones relevant to this pull request. Please read the Contributing guidelines. If you're facing any problem on how to mark a checkbox, please read the following instructions:
NOTE: Only |
|
Done — bumped This is actually the right pin for this PR specifically: 2.3.3 is the first pandas release that's generally compatible with Python 3.14, and it's where the free-threaded (3.14t) wheels start landing — so it's exactly what the 3.14t CI job needs to (Leaving the checklist as-is intentionally — this stays a DRAFT until the 3.14t results are worth reading; the algorithms-keeper close-on-empty-checkbox is just its usual strictness.) |
CI finding (3.14t): blocked at dependency install by
|
|
I also lean towards: Which of our algorithms really depend on OpenCV? |
|
Good question — I mapped it. Exactly 20 files import
Nothing else in the repo touches OpenCV, so the blast radius of gating it out is small and well-contained. Concrete plan for the 3.14t job, so it earns its keep now instead of waiting on opencv/opencv#27933:
When the |
|
Perfect plan. Please proceed, and let's see where it takes us. |
|
Pushed (0d37549). Summary of what landed:
One refinement vs. my earlier note: instead of ignoring all three dirs wholesale, I skipped per file where it's cheap, so we keep pure-Python coverage:
No change to the non-ft path: when a |
| - uses: actions/setup-python@v7 | ||
| with: | ||
| python-version: 3.14 | ||
| python-version: 3.14t |
There was a problem hiding this comment.
Let's make this change in all workflows that use actions/setup-python.
| python-version: 3.14t | |
| python-version-file: 'pyproject.toml' |
This will make the diffs smaller in PRs like this one and:
|
Should we add https://github.com/astral-sh/uv-pre-commit to pre-commit? Unlike many other repos, we can be aggressive about updating dependencies because we always run on the latest and greatest version of CPython. |
|
Good news + one more layer, now pushed ( opencv gating worked. The
So it's the next wheel-gap down: Fix pushed: add Re: |
|
Update: with That's the NumPy 2-D cross product removal. |
ea7b3be to
d932efc
Compare
|
Rebased on |
CI settled — clean free-threaded run ✅After the rebase on So the picture on free-threaded CPython today:
Two knobs are load-bearing to get here, both documented inline in the workflow:
Recommendation: keep this as a non-blocking / informational lane for now (allow-failure), not a required check. It's genuinely useful as an early-warning tripwire — the day a pure-Python algorithm here develops a real data race, the 116-in-parallel subset is where it'll show up first — but the 1930 serial fallbacks are upstream-dependency limitations we can't fix from this repo. As those ecosystem packages ship Happy to wire it into |
|
Please rebase to resolve the git conflicts. |
Change the interpreter used across CI workflows from 3.14 to the free-threaded build 3.14t to surface which dependencies and tests are not yet free-threading compatible. Opened as DRAFT for documentation purposes per maintainer request (TheAlgorithms#15081).
…ee-threaded wheels)
opencv-python has no cp314t wheel yet and fails to build from source under free-threaded 3.14t (CMake), blocking uv sync for every job. Move it to an optional [dependency-groups] cv group so the ft CI installs everything else and runs pytest-run-parallel on the pure-Python algorithms. Skip the 20 files that import cv2 (computer_vision augmentations, data_compression PSNR, and the mostly-cv2 digital_image_processing/ tree). Re-fold once a cp314t wheel ships (upstream: opencv/opencv#27933).
for more information, see https://pre-commit.ci
d932efc to
6c0db88
Compare
|
Rebased on |
|
After the rebase, CI is red for two independent reasons, both worth documenting here since that's this draft's purpose:
|
Part of the maintenance experiments requested in #15081.
What this does
Switches the interpreter pinned in every CI workflow from
3.14to the free-threaded build3.14t:build.yml(full pytest suite — this is the interesting one; it already runs withpytest-run-parallel --parallel-threads=auto, so the free-threaded interpreter actually exercises concurrency)project_euler.yml,sphinx.yml,directory_writer.ymlNothing in
pyproject.tomlchanges:3.14tis the same language version as3.14, just the free-threaded ABI (cp314twheels), sorequires-pythonand the classifiers stay correct.Why it's a DRAFT
The point is to document what breaks under free-threading, not to merge. Expected friction:
cp314twheels will fail to install underuv sync(or fall back to a slow pure-Python path).--parallel-threads=autoruns them on a GIL-free interpreter.I'll annotate this PR with the specific failures once CI reports them, so we have a written record of the gap. Keeping it in DRAFT so it can't merge before it's ready.
Follow-up (extra credit from #15081)
Once we see the CI picture, I'll open a separate small PR adding a side-by-side free-threaded variant of a CPU-bound fractal generator so visitors can study the speedup — kept separate to stay reviewable one change at a time.