Skip to content

Fix build for PyO3 0.28 and maturin 1.x - #32

Merged
shenanigansd merged 1 commit into
mainfrom
fix/pyo3-bound-api
Nov 27, 2026
Merged

shenanigansd merged 1 commit into
mainfrom
fix/pyo3-bound-api

Conversation

@shenanigansd

Copy link
Copy Markdown
Member

Before: every CI run fails on Linux, macOS and Windows, including Dependabot's #30 and #31. src/lib.rs still uses the &PyModule module signature that PyO3 removed in 0.23, and the workflow passes maturin flags that maturin 1.x no longer accepts.

After: the extension builds again on PyO3 0.28, and the three build jobs can upload their wheels side by side.

How: the module function takes &Bound<'_, PyModule>. The Windows and macOS jobs drop --no-sdist and swap --universal2 for --target universal2-apple-darwin. Each job uploads wheels-<os> (upload-artifact v4+ rejects three uploads under one name) and the release job downloads them with pattern: wheels-*. The build-system pin moves from maturin<0.13 to >=1.0,<2.0. Built and imported a Linux wheel locally with maturin 1.16.0. Once this merges, #30 and #31 should go green after a rebase.


Generated by Claude Code

Port the module function to the Bound API (the &PyModule form was
removed in PyO3 0.23), drop maturin flags removed in 1.x (--no-sdist,
--universal2), give each job's wheel artifact a unique name, and let
the sdist build with maturin 1.x.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shenanigansd
shenanigansd merged commit 27b9add into main Nov 27, 2026
10 checks passed
@shenanigansd
shenanigansd deleted the fix/pyo3-bound-api branch November 27, 2026 15:31
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