Skip to content

feat: python >= 3.12 stable ABI - #74

Merged
jonasteuwen merged 2 commits into
mainfrom
sync/monorepo/internal
Jul 27, 2026
Merged

feat: python >= 3.12 stable ABI#74
jonasteuwen merged 2 commits into
mainfrom
sync/monorepo/internal

Conversation

@jonasteuwen

Copy link
Copy Markdown
Contributor

GitOrigin-RevId: 91f7f866d7348690bdc5286477993c01d404f840

GitOrigin-RevId: 91f7f866d7348690bdc5286477993c01d404f840
Copilot AI review requested due to automatic review settings July 27, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-api setting for wheel builds.
  • Update wheel build tooling/docs/CI to build and smoke-test a cp312-abi3 wheel plus a cp311 wheel (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.wheel is 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 thread tools/artifacts/wheels.py
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
Copilot AI review requested due to automatic review settings July 27, 2026 14:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 build once 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 in WHEELS, 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 thread package/versions.json
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"
}
]
}
@jonasteuwen
jonasteuwen merged commit 9277811 into main Jul 27, 2026
57 checks passed
@jonasteuwen
jonasteuwen deleted the sync/monorepo/internal branch July 27, 2026 15:48
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