From e7f7fdebe5cfe8e782e92e5a5a5edd57c49ac17b Mon Sep 17 00:00:00 2001 From: Kevin Sheppard Date: Sun, 11 Oct 2026 21:06:12 +0100 Subject: [PATCH] CI: Build cp310-cp315 wheels with cibuildwheel 4.3.1 (trial build) Prepares the linearmodels 7.1 wheels for Python 3.15.0 final and pytest 9. As committed this is the trial configuration: it builds linearmodels main and uploads nothing. Open it as a pull request to run all 24 jobs. The change for the release itself is two lines, listed under "Release day". Changes to .github/workflows/build-wheels.yml - pypa/cibuildwheel v4.2 -> v4.3.1. The old pin resolves to v4.2.1, which builds and tests with CPython 3.15.0rc2 (v4.3.0 has rc3). v4.3.1 is the first release with 3.15.0 final, which came out on 2026-10-09. - cp315 is added to the Python matrix. Four runners and six Pythons are 24 jobs. Each Python gives six wheels (manylinux x86_64, manylinux aarch64, musllinux x86_64, Windows AMD64, macOS arm64, macOS x86_64), so 36 wheels where 7.0 had 30. - CIBW_TEST_REQUIRES pytest==8.4.2 -> pytest>=9,<10. linearmodels 7.1 sets minversion = "9.0" in the pyproject.toml it installs next to the package, and linearmodels.test() runs pytest on that directory, so pytest 8.4.2 would stop with a usage error before running a test in every job that runs tests. The specifier contains < and >, which cibuildwheel before v4.3.0 handed to cmd.exe on Windows (pypa/cibuildwheel#2978), so this pin needs the new cibuildwheel. - BUILD_COMMIT "v7.0" -> "main" and PYPI_UPLOAD true -> false, for the trial only. Pull requests from branches of this repository receive the PyPI secrets, and the upload step runs after every build while PYPI_UPLOAD is true, so a trial with it set would upload wheels built from main. - OPENLAS_NUM_THREADS -> OPENBLAS_NUM_THREADS. The misspelt variable was never read, so OpenBLAS was not limited to one thread. cibuildwheel passes only the variables listed in CIBW_ENVIRONMENT_PASS_LINUX into the Linux containers and this workflow lists none, so the fix applies to the Windows and macOS jobs. No free-threaded wheels. cibuildwheel v4.3.1 has no opt-in group for them (they are built unless skipped), so CIBW_BUILD is what keeps them out: "cp315-*" does not match "cp315t-*". CIBW_BUILD is unchanged. What the trial should show - All 24 jobs green. fail-fast is off, so a failure does not hide the others. The jobs that matter most are the 12 macOS ones (macos-latest is arm64, macos-15-intel is x86_64), which nothing else exercises, and the musllinux wheel in each Ubuntu job. The aarch64 wheels are built under QEMU and their tests are skipped. - 36 wheels. The Summary page of the run has one table per job: three wheels for each Ubuntu job (manylinux_x86_64, manylinux_aarch64, musllinux_x86_64) and one for every other job, about 1.5 MB each (7.0: 1.50-1.53 MB). - No cp314t or cp315t wheel or build identifier in any job. - "All PyPi uploading is disabled" in the Upload wheels step of every job. Release day, once the trial is green BUILD_COMMIT: "v7.1" PYPI_UPLOAD: true BUILD_COMMIT is checked out in the submodule before every build, so the submodule pointer does not have to move. "RLS: Release 7" moved it to v7.0 as well; doing the same records what was released. Checked locally, without running Actions - The file parses with yaml.safe_load, the parsed document differs from origin/main in exactly the values above, and the file is still LF-only. - Replaying cibuildwheel v4.3.1's build selection (selector.py and build-platforms.toml, read from the tag) over this workflow selects 36 identifiers, six per Python and none free-threaded. The same replay of the old workflow gives the 30 wheels that 7.0 shipped. - From the wheel tags on PyPI, pip's newest-first choice is a wheel and not an sdist for every compiled package, on every platform of the matrix and for each Python from 3.10 to 3.15: numpy, Cython, ninja and patchelf in the build environment, aarch64 included, and numpy, scipy, pandas, statsmodels and wrapt in the test environment. Those five are the only compiled packages among its 24. On 3.15 they are numpy 2.5.4, scipy 1.18.1, pandas 3.0.6, statsmodels 0.15.0 and wrapt 2.5.0. - A pytest older than minversion exits with code 4 and "'minversion' requires pytest-X, actual pytest-Y" before it runs a test. Not checked: the build itself, which only the trial can show. --- .github/workflows/build-wheels.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 134deed..eb2cd02 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -17,24 +17,24 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel] - python: [cp310, cp311, cp312, cp313, cp314] + python: [cp310, cp311, cp312, cp313, cp314, cp315] env: - BUILD_COMMIT: "v7.0" # main or a specific version, e.g., "v6.1" - PYPI_UPLOAD: true # true or false + BUILD_COMMIT: "main" # main or a specific version, e.g., "v6.1" + PYPI_UPLOAD: false # true or false TESTPYPI_UPLOAD: false CIBW_BUILD: ${{ matrix.python }}-* CIBW_ARCHS_LINUX: "x86_64 aarch64" CIBW_ARCHS_MACOS: native # No support for pypy, musl, Win32 for 3.10+ CIBW_SKIP: "pp* *musllinux_aarch64* *-win32" - CIBW_TEST_REQUIRES: pytest==8.4.2 pytest-xdist xarray + CIBW_TEST_REQUIRES: pytest>=9,<10 pytest-xdist xarray CIBW_TEST_COMMAND: python -c "import linearmodels; linearmodels.test(['-n','auto','--skip-slow'])" # Avoid testing on emulated architectures CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x} *-win32" CIBW_REPAIR_WHEEL_COMMAND_LINUX: 'auditwheel repair --strip -w {dest_dir} {wheel}' MKL_NUM_THREADS: 1 OMP_NUM_THREADS: 1 - OPENLAS_NUM_THREADS: 1 + OPENBLAS_NUM_THREADS: 1 steps: - uses: actions/checkout@v7 @@ -49,7 +49,7 @@ jobs: platforms: all - name: Build wheels - uses: pypa/cibuildwheel@v4.2 + uses: pypa/cibuildwheel@v4.3.1 with: output-dir: wheelhouse package-dir: linearmodels