feat: python >= 3.12 stable ABI - #74
Merged
Merged
Conversation
GitOrigin-RevId: 91f7f866d7348690bdc5286477993c01d404f840
There was a problem hiding this comment.
Pull request overview
This PR updates FastSlide’s Python wheel build/release pipeline to ship a stable-ABI (abi3) wheel for CPython >= 3.12 alongside a CPython 3.11-specific wheel, and bumps the project version to 0.8.1 across language bindings and packaging metadata.
Changes:
- Add a Bazel transition that pins both the Python toolchain version and nanobind’s
py-limited-apisetting for wheel builds. - Update wheel build tooling/docs/CI to build and smoke-test a
cp312-abi3wheel plus acp311wheel (instead of a larger per-version matrix). - Bump version strings from 0.8.0 → 0.8.1 across C/C++/Python/Bazel/Meson/docs metadata.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/versioned_py_wheel.bzl | Adds stable-ABI pinning to the wheel transition and updates the macro API. |
| tools/build_wheels.py | Simplifies wheel build CLI to build the fixed wheel set per platform. |
| tools/artifacts/wheels.py | Switches wheel-building from python-tag matrix to fixed WHEELS specs. |
| tools/artifacts/specs.py | Introduces WheelSpec and defines the two-wheel build set. |
| tools/artifacts/cli.py | Removes Python-tag selection; builds the fixed wheel set. |
| src/python/fastslide.cpp | Bumps Python extension __version__. |
| src/c/registry.cpp | Bumps C API version string. |
| rust/fastslide/src/lib.rs | Formatting-only changes. |
| rust/fastslide-sys/src/lib.rs | Formatting-only changes to extern declarations. |
| README.md | Updates wheel build instructions for cp312-abi3 + cp311. |
| python/fastslide/init.py | Bumps Python package __version__. |
| python/BUILD.bazel | Defines stable-ABI vs non-stable-ABI extension selection and two wheel targets. |
| pyproject.toml | Bumps version, raises minimum Python to >=3.11, updates meson-python requirement. |
| package/versions.json | Bumps packaged version string. |
| package/BUILD.bazel | Bumps package version constant. |
| MODULE.bazel | Updates default Python toolchain/pip parse to 3.12 and retains 3.11 for the cp311 wheel. |
| meson.build | Implements limited-API selection (>=3.12) and Windows link-dep workaround. |
| docs/source/guides/packages_and_releases.rst | Updates release docs for the two-wheel strategy and smoke tests. |
| docs/source/conf.py | Bumps docs release version. |
| docs/Doxyfile | Bumps Doxygen project number. |
| .github/workflows/release.yml | Adjusts cibuildwheel build matrix and smoke-test install logic for abi3. |
| .bazelrc | Sets default nanobind py-limited-api=cp312 for dev/test builds. |
Comments suppressed due to low confidence (1)
tools/versioned_py_wheel.bzl:50
ctx.attr.wheelis a single configured target (attr.label), not a list. Indexing it with[0]will fail at analysis time (provider lookup expects a Provider key, not an int), so this rule can't evaluate.
def _versioned_py_wheel_rule_impl(ctx):
inner = ctx.attr.wheel[0]
return [DefaultInfo(files = inner[DefaultInfo].files)]
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+64
to
+69
| for wheel in WHEELS: | ||
| label = f"{platform_key} {wheel.tag}" | ||
| print(f"\n▶︎ Building {wheel.tag} wheel for {platform_key} with {bazel_cmd}") | ||
|
|
||
| # Build all Python versions for this platform in a single Bazel | ||
| # invocation so Bazel can parallelise the four transitioned configs. | ||
| targets = [f"//python:fastslide_wheel_{t}" for t in python_tags] | ||
| tags_label = ", ".join(python_tags) | ||
| print(f"\n▶︎ Building {tags_label} wheels for {platform_key} with {bazel_cmd}") | ||
|
|
||
| try: | ||
| common.run([bazel_cmd, "build", *bazel_flags, *targets], env=env) | ||
| except subprocess.CalledProcessError: | ||
| for t in python_tags: | ||
| failures.append(f"{platform_key}:{t}") | ||
| print(f"❌ Build failed for {platform_key}") | ||
| if not keep_going: | ||
| return 1 | ||
| continue | ||
| try: | ||
| common.run([bazel_cmd, "build", *bazel_flags, wheel.target], env=env) |
GitOrigin-RevId: 1749ef36a503d757f20a5ca491e1c705bc367e99
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
tools/artifacts/wheels.py:75
- This now invokes
bazel buildonce per wheel (per platform), which can significantly increase build overhead and reduce Bazel’s ability to parallelize across transitioned configs. If the goal is only to build the fixed wheel set inWHEELS, consider building all wheel targets for a platform in a single Bazel invocation (and then collecting outputs per target) to restore parallelism and speed.
for wheel in WHEELS:
label = f"{platform_key} {wheel.tag}"
print(f"\n▶︎ Building {wheel.tag} wheel for {platform_key} with {bazel_cmd}")
try:
common.run([bazel_cmd, "build", *bazel_flags, wheel.target], env=env)
except subprocess.CalledProcessError:
failures.append(label)
print(f"❌ Build failed for {label}")
if not keep_going:
return 1
continue
Comment on lines
1
to
10
| { | ||
| "versions": [ | ||
| { | ||
| "display": "FastSlide", | ||
| "id": "fastslide", | ||
| "type": "primary", | ||
| "version": "0.8.0" | ||
| } | ||
| ] | ||
| "versions": [ | ||
| { | ||
| "display": "FastSlide", | ||
| "id": "fastslide", | ||
| "type": "primary", | ||
| "version": "0.8.1" | ||
| } | ||
| ] | ||
| } |
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.
GitOrigin-RevId: 91f7f866d7348690bdc5286477993c01d404f840