Skip to content

Publish wheels for Python 3.12+ using abi3#14

Merged
kampersanda merged 12 commits into
mainfrom
later-version-support
May 30, 2026
Merged

Publish wheels for Python 3.12+ using abi3#14
kampersanda merged 12 commits into
mainfrom
later-version-support

Conversation

@kampersanda

@kampersanda kampersanda commented May 22, 2026

Copy link
Copy Markdown
Member

Summary

This PR updates packaging and CI so vibrato can publish wheels usable on Python 3.12, 3.13, and 3.14.

It switches the extension module to PyO3 abi3 with a minimum supported Python version of 3.10, allowing one cp310-abi3 wheel to work across supported CPython versions instead of building a separate wheel for each minor version.

Changes

  • enable pyo3 abi3-py310
  • set requires-python = ">=3.10"
  • add dynamic = ["version"] for maturin
  • update the maturin build requirement to >=1,<2
  • test on Python 3.10 through 3.14
  • build release wheels once per platform/architecture
  • remove setup-python from the sdist job
  • update GitHub Actions to checkout@v6 and setup-python@v6
  • switch publishing from maturin upload to uv publish with Trusted Publishing
  • fix TokenIterator to fully implement the Python iterator protocol
  • update doctest version examples from 0.5.1 to 0.5.2

Requests

@kampersanda kampersanda linked an issue May 22, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the packaging and CI configuration for python-vibrato to publish a single cp38-abi3 wheel per platform (usable across newer CPython versions), while also aligning docs/examples and fixing iterator behavior in the PyO3 bindings.

Changes:

  • Enable PyO3 abi3-py38 and set requires-python >= 3.8 / dynamic = ["version"] for maturin-based builds.
  • Update GitHub Actions CI to test newer Python versions and build release artifacts once per platform/arch.
  • Fix TokenIterator to implement __iter__, and refresh doctest version strings.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/lib.rs Adds TokenIterator.__iter__ to satisfy Python iterator protocol.
Cargo.toml Enables PyO3 abi3-py38 for stable ABI wheels.
pyproject.toml Updates maturin build requirement, declares dynamic version, and sets requires-python.
README.md Updates doctest version string.
docs/source/examples.rst Updates doctest version string.
.gitignore Ignores Rust build artifacts and lockfile.
.github/workflows/CI.yml Expands Python test matrix and revises release packaging steps/artifact naming.
Comments suppressed due to low confidence (1)

.github/workflows/CI.yml:147

  • The release job downloads artifacts without specifying an output path. Depending on download-artifact defaults, this can create per-artifact subdirectories and make the later upload glob (*) brittle (e.g., attempting to upload directories). Consider downloading everything into a dedicated directory (like dist/) with merge-multiple: true, and uploading dist/* explicitly.
      - uses: actions/download-artifact@v4
        with:
          name: sdist
      - uses: actions/download-artifact@v4
        with:
          pattern: wheels-*
          merge-multiple: true
      - name: Publish to PyPI

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/CI.yml
Comment thread .github/workflows/CI.yml Outdated
Comment thread .github/workflows/CI.yml Outdated
kampersanda and others added 2 commits May 24, 2026 01:26
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@kampersanda kampersanda marked this pull request as ready for review May 23, 2026 16:45
@kampersanda kampersanda requested a review from vbkaisetsu May 23, 2026 16:45
Comment thread .github/workflows/CI.yml Outdated
Comment thread .github/workflows/CI.yml Outdated
Comment thread .github/workflows/CI.yml Outdated
@kampersanda kampersanda requested a review from vbkaisetsu May 24, 2026 11:02
Comment thread .github/workflows/CI.yml Outdated
@kampersanda kampersanda requested a review from vbkaisetsu May 29, 2026 10:02
@kampersanda

Copy link
Copy Markdown
Member Author

@vbkaisetsu I've fixed the code, and it's ready to review.

@vbkaisetsu vbkaisetsu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a specific reason you decided not to upload an sdist? We should probably include one so that users on platforms where we don't provide binaries can still build and use the package.

@kampersanda

Copy link
Copy Markdown
Member Author

@vbkaisetsu

There wasn't any strong reason in particular. I just thought uploading only wheels, as we had done before, would be sufficient. But, I agree that providing an sdist would be beneficial, since it allows users on unsupported platforms to install the package from source. I've updated the release process accordingly, as 2b719bf.

I've confirmed that the following artifacts are downloaded:

./sdist/vibrato-0.2.0.tar.gz
./wheels-linux-i686/vibrato-0.2.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
./wheels-linux-x86_64/vibrato-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
./wheels-macos-universal2/vibrato-0.2.0-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
./wheels-windows-x64/vibrato-0.2.0-cp310-abi3-win_amd64.whl
./wheels-windows-x86/vibrato-0.2.0-cp310-abi3-win32.whl

@kampersanda kampersanda requested a review from vbkaisetsu May 30, 2026 04:55
@kampersanda kampersanda merged commit c35cc22 into main May 30, 2026
20 checks passed
@kampersanda kampersanda deleted the later-version-support branch May 30, 2026 05:08
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.

Request wheel files for Python 3.12 and later

3 participants