diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ed88a88f2bb..e20398973ff6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,14 +17,28 @@ jobs: cache-dependency-glob: uv.lock - uses: actions/setup-python@v7 with: - python-version-file: pyproject.toml + python-version: 3.14t allow-prereleases: true - run: uv sync --group=test - name: Run tests # TODO: #8818 Re-enable quantum tests + # opencv-python is gated out on 3.14t (no cp314t 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 cp314t 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.14t. 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 + --iterations=8 --parallel-threads=auto --ignore-gil-enabled --ignore=computer_vision/cnn_classification.py + --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=dynamic_programming/k_means_clustering_tensorflow.py --ignore=machine_learning/local_weighted_learning/local_weighted_learning.py diff --git a/.github/workflows/directory_writer.yml b/.github/workflows/directory_writer.yml index 9df64222cd56..4201b31c755b 100644 --- a/.github/workflows/directory_writer.yml +++ b/.github/workflows/directory_writer.yml @@ -11,7 +11,7 @@ jobs: fetch-depth: 0 - uses: actions/setup-python@v7 with: - python-version-file: pyproject.toml + python-version: 3.14t allow-prereleases: true - name: Write DIRECTORY.md run: | diff --git a/.github/workflows/project_euler.yml b/.github/workflows/project_euler.yml index 06f865f0bcdf..0c2486716743 100644 --- a/.github/workflows/project_euler.yml +++ b/.github/workflows/project_euler.yml @@ -25,7 +25,7 @@ jobs: - uses: astral-sh/setup-uv@v7 - uses: actions/setup-python@v7 with: - python-version-file: pyproject.toml + python-version: 3.14t allow-prereleases: true - run: uv sync --group=euler-validate --group=test - run: uv run pytest --doctest-modules --cov-report=term-missing:skip-covered --cov=project_euler/ project_euler/ @@ -43,7 +43,7 @@ jobs: - uses: astral-sh/setup-uv@v7 - uses: actions/setup-python@v7 with: - python-version-file: pyproject.toml + python-version: 3.14t allow-prereleases: true - run: uv sync --group=euler-validate --group=test - run: uv run pytest scripts/validate_solutions.py diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 3828bea0eaf0..b7e3303f321b 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -36,7 +36,7 @@ jobs: - uses: astral-sh/setup-uv@v7 - uses: actions/setup-python@v7 with: - python-version-file: pyproject.toml + python-version: 3.14t allow-prereleases: true - run: uv sync --group=docs - uses: actions/configure-pages@v6 diff --git a/pyproject.toml b/pyproject.toml index 1a55feda3cbb..dcbc3d796435 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -18,8 +18,7 @@ dependencies = [ "lxml>=6", "matplotlib>=3.9.3", "numpy>=2.1.3", - "opencv-python>=4.10.0.84", - "pandas>=2.2.3", + "pandas>=2.3.3", "pillow>=11.3", "rich>=13.9.4", "scikit-learn>=1.5.2", @@ -42,6 +41,14 @@ docs = [ "sphinx-autoapi>=3.4", "sphinx-pyproject>=0.3", ] +# opencv-python has no free-threaded (cp314t) wheel yet and fails to build from +# source under 3.14t (CMake), which blocks `uv sync` for every job. Keep it in an +# optional group so the free-threaded CI can install everything else and actually +# run pytest-run-parallel on the pure-Python algorithms. Re-fold into core deps +# once a cp314t wheel ships (upstream: opencv/opencv#27933). +cv = [ + "opencv-python>=4.10.0.84", +] euler-validate = [ "httpx>=0.28.1", "numpy>=2.1.3",