fix(release): compare normalized prerelease versions - #1015
Merged
Conversation
bokelley
enabled auto-merge (squash)
August 5, 2026 02:47
Contributor
There was a problem hiding this comment.
LGTM. Reuses the release workflow's own normalizer instead of re-encoding the SemVer→PEP-440 rule in the test — the assertion now checks the same transform that actually runs on the wire.
Things I checked
- Root cause is real. Release Please stores
7.0.0-rc.1in.release-please-manifest.json; PEP 440 requires7.0.0rc1inpyproject.toml. The old raw-string compare blocked the RC release PR. - The fix imports
pep440_prereleasefromscripts/normalize_pyproject_prerelease.pyrather than duplicating the mapping — single source of truth with the code that normalizespyproject.tomlat release time. - Stable-version path unchanged:
pep440_prereleasereturns input verbatim when_SEMVER_PRERELEASE_REdoesn't match, so7.0.0/8.1.2still compare as raw strings (normalize_pyproject_prerelease.py:27-34). - Numbered prerelease maps correctly:
7.0.0-rc.1→7.0.0rc1,alpha/beta→a/b. Test-only diff, no source or public surface touched. - Test-only change → skip-everything list, no experts.
Minor nits (non-blocking)
- Numberless label passes through unnormalized. The regex requires
-(alpha|beta|rc)\.(\d+), so a manifest value like7.0.0-rc(no.N) returns unchanged — which is the current state of both files, so the assertion holds by identity rather than by normalization. Not this PR's job to fix, and release-please always emits the numbered form; worth a follow-up only if the manifest ever drifts to a bare label.
LGTM.
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.
Summary
Root cause
Release Please stores
7.0.0-rc.1in its manifest, while Python packaging correctly requires7.0.0rc1inpyproject.toml. The release configuration test compared these equivalent versions as raw strings, blocking the7.0.0-rc.1release PR.Validation
pytest tests/test_release_configuration.py tests/test_normalize_pyproject_prerelease.py: 6 passed