Skip to content

Build CPython 3.15 wheels - #218

Open
M-Colley wants to merge 1 commit into
osqp:masterfrom
M-Colley:py315-wheels
Open

M-Colley wants to merge 1 commit into
osqp:masterfrom
M-Colley:py315-wheels

Conversation

@M-Colley

@M-Colley M-Colley commented Nov 9, 2026

Copy link
Copy Markdown

CPython 3.15 was released in October and osqp has no 3.15 wheels yet, so pip install osqp on 3.15 builds from the sdist, which needs CMake and a compiler.

Changes

  • build_default.yml: cibuildwheel v3.3.1 → v4.3.5. cibuildwheel builds CPython 3.15 by default from 4.2.0, and 4.3.1 or later uses the final 3.15 release.
  • cibuildwheel.toml: two existing overrides gain the 3.15 builds:
    • cp315-macosx_x86_64 joins the platforms that skip the osqp.nn tests, because torch has no macOS x86_64 wheels.
    • cp315t-* joins the free-threaded override.
  • cp315t is skipped for now. On free-threaded 3.15 the adjoint-derivative tests crash. OSQP allocates 13 work buffers in adjoint_derivative_qdldl with malloc() and frees them with c_free, which is PyMem_RawFree here. The fix is Allocate the adjoint derivative's QDLDL buffers with c_malloc osqp#799. Once GIT_TAG points to an OSQP release that includes it, drop cp315t-* from skip.
    • The same mismatch is latent in today's wheels. Released osqp 1.1.3 on Python 3.12 crashes in derivative_test.py under PYTHONMALLOC=debug.

Side effects of cibuildwheel 4, for review

  • No cp38 wheels. cibuildwheel 4 drops Python 3.8. requires-python >= 3.8 is unchanged, so 3.8 falls back to the sdist.
  • Windows repair. Windows wheels are now repaired with delvewheel by default. For osqp this vendors the MSVC C++ runtime (osqp.libs/msvcp140-<hash>.dll), because the pybind11 extension uses the C++ standard library. numpy and scipy wheels do the same, and it avoids "DLL load failed" on machines without the Visual C++ redistributable. If you'd rather not vendor it, set repair-wheel-command = "" for Windows.
  • Other workflows. The CUDA, MKL and wasm workflows keep their cibuildwheel pins.

Tested locally

On Windows with cibuildwheel 4.3.5, using the configured test commands:

Build Result
cp315-win_amd64 builds and repairs; 61 passed, 3 skipped (torch tests included)
cp314t-win_amd64 56 passed, 3 skipped
cp315t-win_amd64 crashes in derivative_test.py in two of two runs; with osqp/osqp#799 applied, 56 passed, 3 skipped

--print-build-identifiers lists cp315 for Linux (x86_64, aarch64), macOS (x86_64, arm64) and Windows (amd64, arm64), and no cp315t.

🤖 Generated with Claude Code

cibuildwheel 4.3.5 builds CPython 3.15 by default. macOS x86_64 on 3.15 skips
the torch tests like 3.13 and 3.14, and the free-threaded override covers
cp315t. cp315t stays skipped until OSQP frees its adjoint-derivative buffers
with the allocator that allocated them.
@CLAassistant

CLAassistant commented Nov 9, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants