Repository navigation
properly normalize / validate abiflags and include in environment signature - #3299
Merged
Merged
Conversation
messense
reviewed
Sep 9, 2026
messense
reviewed
Sep 9, 2026
Member
Author
|
Thanks, addressed both points. To keep the ordering consistent I simplified to either generate abiflags matching packaging if no flags present, otherwise I just validate the user-supplied flags at least match the sysconfigdata keys. |
Member
Author
|
conda bug looks possibly unrelated? |
messense
approved these changes
Sep 11, 2026
kylebarron
added a commit
to kylebarron/arro3
that referenced
this pull request
Oct 12, 2026
All entries in the test-python matrix shared one Swatinem/rust-cache key, so they restored the same `target/` directory. maturin (1.14 and 1.15) sets the same PYO3_ENVIRONMENT_SIGNATURE for 3.14 and 3.14t, and PYO3_PYTHON is `.venv/bin/python` in both jobs. So when 3.14t had saved the cache, pyo3's build script didn't rerun in the 3.14 job, and arro3 was built against the free-threaded config. Importing it failed with `undefined symbol: PyUnstable_Module_SetGIL`. Upstream maturin fixed the signature in PyO3/maturin#3299, which isn't released yet. A per-version cache key avoids the problem regardless. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
maturincurrently generatesPYO3_ENVIRONMENT_SIGNATUREwithout accounting for abiflags. This in particular means that builds switching between regular and free-threaded Python can fail to invalidatepyo3-ffi's cache and lead to compilation selecting the wrong ABI.This PR corrects the generated environment signature, and attempts to make abiflag handling correct throughout
maturin. In particular I found the following other deficiencies:PYO3_CONFIG_FILEdid not infer (or validate) missing ABI flags fromPy_GIL_DISABLEDorPy_DEBUG.PYO3_CONFIG_FILEomitted free-threaded and debug flags. (This would produce a wheel with an invalid extension for the free-threaded/debug interpreter.)ddebug abiflag.