From 495dec8c808d9b21145600d913d2a43eb112c750 Mon Sep 17 00:00:00 2001 From: Kevin Sheppard Date: Sun, 11 Oct 2026 20:52:31 +0100 Subject: [PATCH] CI: Test Python 3.15 as a normal job, fail on style errors, add macOS Python 3.15.0 was released on 2026-10-09 and 7.1 supports Python 3.10-3.15, so 3.15 is tested like the other versions. Two checks that could not fail a build now can. Azure, ci/azure_template_posix.yml - python315_latest uses python.version '3.15' instead of '3.15-dev' and is no longer experimental. Its tests run in "Run tests (editable)", so a failure fails the build, and coverage is published and uploaded to Codecov as in the other jobs. The job passed on 3.15.0rc3 on 2026-10-09 (12,975 passed, 2,461 skipped, 47 xfailed). The other nine jobs are unchanged, including python310_minimums and python310_win_numpy126. - The style step starts with set -e. Azure runs a script step with bash --noprofile --norc, which does not stop at an error, so only the last command decided the result and a failure of black --check, isort --check or ruff check passed CI. flake8 was run twice, first and last; now it runs once. On main all four tools pass with the newest versions that pip installs today (flake8 7.4.1, black 26.5.1, isort 9.0.2 and ruff 0.17.0, which is newer than the 0.16.10 of the last run), so the step stays green. - The python.version comment no longer mentions 3.15-dev. allowUnstable: true was only needed to download a release candidate. It does no harm and is left alone. GitHub Actions - cron-test.yml, the "Build wheels" workflow: - pypa/cibuildwheel v4.2.1 -> v4.3.1, the first release with CPython 3.15.0 final. - cp315 is added to the matrix. "cp315-*" does not match the free-threaded cp315t, so no free-threaded wheel is built. - macos-latest (arm64) is added. macOS is otherwise only exercised on release day, when bashtage/linearmodels-wheels builds the release. - OPENLAS_NUM_THREADS -> OPENBLAS_NUM_THREADS. With the typo OpenBLAS was not limited to one thread. cibuildwheel does not pass variables into the Linux container, so this applies to the Windows and macOS jobs. - generate-documentation.yml: Python 3.13 -> 3.14. The packages in requirements.txt and requirements-dev.txt resolve to the same 177 versions on 3.13 and 3.14 on Linux, all as wheels, and python314_latest installs the same files (plus requirements-test.txt). The documentation has not been built on 3.14 yet. If the Generate Documentation run on main fails, revert this line. azure-pipelines.yml needs no change: experimental and style default to false there, which is what python315_latest now uses. Checked locally, without running Azure or Actions: - Every YAML file in ci/, azure-pipelines.yml and .github/ parses with yaml.safe_load. - The style script from the YAML, run with bash as Azure does, exits 0 on main. On a copy with one single-quoted string, black and ruff fail: the old script exits 0 and the new one exits 1. - Evaluating the step conditions reproduces the steps that ran in Azure build 919 for all eight Linux jobs. After this change only python315_latest differs: "Run tests (experimental)" is replaced by "Run tests (editable)", and PublishCodeCoverageResults and the Codecov upload now run. - The build requirements, dependencies and CIBW_TEST_REQUIRES of cron-test.yml resolve against PyPI, with uv, to wheels only for cp314 and cp315 on Linux, Windows and macOS arm64, and the newest version of every package has one. --- .github/workflows/cron-test.yml | 8 ++++---- .github/workflows/generate-documentation.yml | 2 +- ci/azure_template_posix.yml | 8 +++----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cron-test.yml b/.github/workflows/cron-test.yml index 48c0cd2be6..a8f344ad7f 100644 --- a/.github/workflows/cron-test.yml +++ b/.github/workflows/cron-test.yml @@ -18,14 +18,14 @@ jobs: strategy: fail-fast: false matrix: - python: [cp314] - os: [ubuntu-latest, windows-latest] + python: [cp314, cp315] + os: [ubuntu-latest, windows-latest, macos-latest] env: BUILD_COMMIT: "main" CIBW_ARCHS_LINUX: "x86_64" MKL_NUM_THREADS: 1 OMP_NUM_THREADS: 1 - OPENLAS_NUM_THREADS: 1 + OPENBLAS_NUM_THREADS: 1 steps: - uses: actions/checkout@v7 @@ -37,7 +37,7 @@ jobs: with: python-version: '3.x' - - uses: pypa/cibuildwheel@v4.2.1 + - uses: pypa/cibuildwheel@v4.3.1 env: CIBW_BUILD: ${{ matrix.python }}-* CIBW_BEFORE_BUILD: python -m pip install wheel>=0.41.0 pip --upgrade diff --git a/.github/workflows/generate-documentation.yml b/.github/workflows/generate-documentation.yml index 429d0e3d43..7c46aba1b2 100644 --- a/.github/workflows/generate-documentation.yml +++ b/.github/workflows/generate-documentation.yml @@ -16,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.13"] + python-version: ["3.14"] steps: - name: Checkout uses: actions/checkout@v7 diff --git a/ci/azure_template_posix.yml b/ci/azure_template_posix.yml index 01501ad6fa..593a8fd76b 100644 --- a/ci/azure_template_posix.yml +++ b/ci/azure_template_posix.yml @@ -17,8 +17,7 @@ jobs: vmImage: ${{ parameters.vmImage }} strategy: # Variables of an entry - # python.version Version of Python. 3.15-dev is the newest 3.15, including - # release candidates. + # python.version Version of Python # PACKAGES Installed in a single pip command with requirements.txt and # requirements-test.txt, so that pip also picks versions of # matplotlib, xarray, ... that work with the pins. @@ -73,9 +72,8 @@ jobs: nightly: true experimental: true python315_latest: - python.version: '3.15-dev' + python.version: '3.15' PACKAGES: 'xxhash' - experimental: true style: true maxParallel: 10 @@ -103,11 +101,11 @@ jobs: continueOnError: true - script: | + set -e flake8 linearmodels black --check linearmodels isort --check linearmodels ruff check linearmodels - flake8 linearmodels displayName: 'Check style and formatting' condition: eq(variables['style'], 'true')