Skip to content

Publish wheels for Python 3.12+ using abi3#14

Open
kampersanda wants to merge 9 commits into
mainfrom
later-version-support
Open

Publish wheels for Python 3.12+ using abi3#14
kampersanda wants to merge 9 commits into
mainfrom
later-version-support

Conversation

@kampersanda
Copy link
Copy Markdown
Member

@kampersanda kampersanda commented May 22, 2026

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
Copy link
Copy Markdown

Copilot AI left a comment

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
with:
command: upload
args: --skip-existing *
run: uv publish --trusted-publishing always
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.

Did you confirm the behavior of this command?

uv publish uploads dist/* by default, but it looks like artifacts are downloaded under dist/wheels-*/

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