Publish wheels for Python 3.12+ using abi3#14
Conversation
There was a problem hiding this comment.
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-py38and setrequires-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
TokenIteratorto 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 ondownload-artifactdefaults, 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 (likedist/) withmerge-multiple: true, and uploadingdist/*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.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…blish command for wheels
…t versions in CI workflow
|
@vbkaisetsu I've fixed the code, and it's ready to review. |
vbkaisetsu
left a comment
There was a problem hiding this comment.
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.
|
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 I've confirmed that the following artifacts are downloaded: |
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
pyo3abi3-py310requires-python = ">=3.10"dynamic = ["version"]formaturinmaturinbuild requirement to>=1,<2setup-pythonfrom thesdistjobcheckout@v6andsetup-python@v6maturin uploadtouv publishwith Trusted PublishingTokenIteratorto fully implement the Python iterator protocol0.5.1to0.5.2Requests