Modernize wheel CI and add cp314 wheel support#706
Merged
Conversation
The published wheels haven't kept up: the Linux job pinned `cython<3` inside a `manylinux2014` container and built only cp38-cp311, leaving no upstream wheels for 3.12+ and producing artifacts incompatible with NumPy 2.x. This PR brings the build chain forward. Build system - `[build-system]` now requires `cython>=3.0.11,<4` and `numpy>=2.0,<3` so any source build (CI, conda-forge, end-user `pip install`) targets current Cython/NumPy. - `requires-python = ">=3.10"` matches the supported matrix; 3.8 reached EOL on 2024-10-07 and 3.9 on 2025-10-31. - Adds the `Programming Language :: Python :: 3.14` classifier. Cython 3 source updates - Reorders `nogil except -1` -> `except -1 nogil` across `.pyx`/`.pxd` (Cython 3 syntax requirement). - Adds `# distutils: define_macros=NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION` to silence NumPy deprecated-API warnings at compile time. These rebases the still-relevant source-file hunks of scikit-learn-contrib#691 onto current master; scikit-learn-contrib#691's pyproject/setup.py hunks have been superseded by master. Wheel CI (`.github/workflows/pythonpublish_wheel.yml`) - Linux: bumps the manylinux image from `manylinux2014_x86_64` to `manylinux_2_28_x86_64` (Python 3.14 needs glibc >= 2.28), pins `cython>=3.0.11,<4` and `numpy>=2.0` in the build env, installs `setuptools` + `wheel` (the cp314 image doesn't ship them by default), and extends the matrix to cp310-cp314. - Windows/macOS: replaces the deprecated `oldest-supported-numpy` with `numpy>=2.0`, bumps `actions/checkout`@v1->v4 and `actions/setup-python`@v1->v5 (v1 doesn't support recent Pythons), retires the EOL `windows-2019`/`macos-11` runners (now `windows-2022` + `macos-14` -- macOS 14 already produces universal2 wheels covering both arm64 and x86_64), extends the matrix to 3.10-3.14, and enables `allow-prereleases: true` in case 3.14 isn't GA on a runner yet. - Disables `fail-fast` on both matrices so one failure doesn't cancel the rest. Verification - All 15 build jobs (Linux cp310-cp314, Windows + macOS for 3.10-3.14) go green on a workflow_dispatch run on the fork. - Locally on Python 3.14.4 with Cython 3.2.4 + NumPy 2.4.4: every extension cythonizes and compiles cleanly, and `HDBSCAN().fit(X)` runs end-to-end. This is consistent with how conda-forge already ships working py314 builds of this package. Closes scikit-learn-contrib#688 (missing wheels for 3.13), scikit-learn-contrib#686 (Linux wheel for 3.12). Supersedes scikit-learn-contrib#691 for the parts still needed.
Contributor
Author
|
The PR is ready for review. |
Collaborator
|
If you can make Cython 3 work that would be great. I'll have to run some local testing to make sure this all works, so please give me some time to manage to get to that, but this looks very promising. |
Contributor
Author
|
👍 for those who need a temporary fork in the meantime, I've created https://pypi.org/project/hdbscan-314/0.8.42/ I'll delete it this is merged & released. Works for us in production |
lmcinnes
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PyPI currently has wheels for hdbscan 0.8.42 covering cp310–cp313 on
Linux/macOS/Windows, but the
pythonpublish_wheel.ymlworkflow that'schecked in doesn't actually produce them — it still pins
cython<3insidea
manylinux2014container and only matrices cp38–cp311. The currentwheels must have been built out-of-band (cibuildwheel locally, or via a
workflow tweaked at release time and never committed). cp314 wheels haven't
been published yet, and the workflow as-checked-in can't produce them
either: Python 3.14 needs glibc ≥ 2.28 and refuses to compile against
Cython 2.
This PR brings the committed workflow into a state where simply dispatching
it for the next release produces a complete, current wheel set — including
cp314.
Build system (
pyproject.toml)[build-system]now requirescython>=3.0.11,<4andnumpy>=2.0,<3soany source build (CI, conda-forge, end-user
pip install) targetscurrent Cython/NumPy.
requires-python = ">=3.10"matches the supported matrix — Python 3.8reached EOL on 2024-10-07 and 3.9 on 2025-10-31.
Programming Language :: Python :: 3.14classifier.Cython 3 source updates
nogil except -1→except -1 nogilacross.pyx/.pxd(Cython 3 syntax requirement).
# distutils: define_macros=NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSIONto silence NumPy deprecated-API warnings.
This rebases the still-relevant source-file hunks of #691 onto current
master.
Wheel CI (
.github/workflows/pythonpublish_wheel.yml)manylinux2014_x86_64→manylinux_2_28_x86_64(Python 3.14needs glibc ≥ 2.28). Pins
cython>=3.0.11,<4andnumpy>=2.0in thebuild env, installs
setuptools+wheel(the cp314 image doesn't shipthem by default), and extends the matrix to cp310–cp314.
oldest-supported-numpywithnumpy>=2.0, bumpsactions/checkoutv1→v4 andactions/setup-pythonv1→v5 (v1 doesn't support recent Pythons), retires the EOL
windows-2019/macos-11runners (nowwindows-2022+macos-14—macOS 14 already produces universal2 wheels covering arm64 and x86_64),
extends the matrix to 3.10–3.14, and enables
allow-prereleases: truefor 3.14.
fail-faston both matrices so one failure doesn't cancel therest.
Verification
green on a
workflow_dispatchrun on the author's fork.cythonizes and compiles cleanly, and
HDBSCAN().fit(X)runs end-to-end.Consistent with how conda-forge already ships working py314 builds.
Relates to #688, #686 (the underlying Linux wheels for 3.12/3.13 are
already on PyPI, but a future release using this workflow won't need
out-of-band builds). Supersedes #691 for the parts still relevant.