Files
priya-sundaram-devpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>Christian Clauss
78e489f5dd CI: Upgrade to free-threaded Python 3.15t (#15105)
* ci: try Python 3.15 release candidate (DRAFT)

Point the repo's .python-version at 3.15 so every workflow that reads
python-version-file runs on the 3.15 release candidate (allow-prereleases
is already enabled across all workflows). Add the 3.15 trove classifier
and bump scipy>=1.18.1, which is the first scipy with cp315 manylinux
wheels, so uv installs it as a wheel rather than building from source.

Rebuilt on current master: the earlier version of this PR edited the
per-workflow `python-version: 3.14` lines, but master has since moved
the interpreter to a single `.python-version` file, so the change is now
a one-line switch there.

Purpose is to document which dependencies/tests are not yet 3.15-ready.
Must stay DRAFT until Python 3.15 GA (early October). Requested in #15081.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Upgrade to Python 3.15t

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2026-09-26 18:06:56 +02:00

50 lines
2.0 KiB
YAML

name: "build"
on:
pull_request:
schedule:
- cron: "0 0 * * *" # Run everyday
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
cache-dependency-glob: uv.lock
- uses: actions/setup-python@v7
with:
python-version-file: .python-version
allow-prereleases: true
- run: uv sync --group=test
- name: Run tests
# opencv-python is gated out on 3.15t (no cp315t wheel yet), so skip the
# files that import cv2. Pure-Python algorithms in computer_vision/ and
# data_compression/ still run; digital_image_processing/ is almost entirely
# cv2-based so it is skipped as a tree. Re-enable when a cp315t wheel ships.
# --ignore-gil-enabled: some compiled deps (sklearn, xgboost, ...) don't
# yet ship the Py_mod_gil slot, so importing them re-enables the GIL under
# 3.15t. That's an upstream-wheel gap, not our code; the flag lets the suite
# run anyway and pytest-run-parallel still reports which tests are not
# thread-safe. Drop the flag once the scientific stack ships free-threaded wheels.
run: uv run --with=pytest-run-parallel pytest
--iterations=8 --parallel-threads=auto --ignore-gil-enabled
--ignore=computer_vision/flip_augmentation.py
--ignore=computer_vision/harris_corner.py
--ignore=computer_vision/mosaic_augmentation.py
--ignore=data_compression/peak_signal_to_noise_ratio.py
--ignore=digital_image_processing/
--ignore=docs/conf.py
--ignore=project_euler/
--ignore=scripts/validate_solutions.py
--ignore=web_programming/current_stock_price.py
--ignore=web_programming/fetch_anime_and_play.py
--cov-report=term-missing:skip-covered
--cov=. .
- if: ${{ success() }}
run: scripts/build_directory_md.py 2>&1 | tee DIRECTORY.md