Update PyPI platform tag validation#3187
Merged
Merged
Conversation
Sync validation with current Warehouse behavior for macOS platform tags and PEP 783 pyemscripten tags. Accept wasm32 Emscripten targets for PyPI when using `pyemscripten_*_wasm32`, and add focused tests for the updated rules.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates maturin’s internal PyPI platform tag validation to better match current PyPI/Warehouse rules, notably tightening macOS tag validation and allowing PEP 783 pyemscripten_*_wasm32 platform tags for Emscripten builds.
Changes:
- Adjust macOS validation to allow arbitrary minor versions only for macOS 10, and require minor
0for macOS 11+. - Accept
pyemscripten_{YEAR}_{PATCH}_wasm32platform tags (PEP 783) and treatwasm32-unknown-emscriptenas PyPI-supported at the target-arch level. - Add/extend unit tests to cover the new macOS and pyemscripten validation behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/target/pypi_tags.rs |
Updates platform-tag and target-arch validation logic; adds focused tests for macOS minor rules and pyemscripten tags. |
src/target/legacy_py.rs |
Refines macOS regex to capture minor version; adds pyemscripten platform regex and adjusts macOS major-version allowlist. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Sync validation with current Warehouse behavior for macOS platform tags and PEP 783 pyemscripten tags.
Accept wasm32 Emscripten targets for PyPI when using
pyemscripten_*_wasm32, and add focused tests for the updated rules.