fix(version): recognize PEP 440 development tags#2026
Open
ychampion wants to merge 1 commit into
Open
Conversation
Keep development-release tags discoverable across sequential bumps while preserving custom tag embedding and existing suffix behavior. Constraint: Preserve custom tag formats and SemVer-compatible parsing. Rejected: Replace the shared parser with the anchored PEP 440 reference regex | it breaks embedded tag formats and unrelated schemes. Confidence: high Scope-risk: narrow Directive: Keep generated version forms round-trippable through TagRules. Tested: uv run poe all; 446 focused tag, version, bump, and changelog tests; exact uv-provider sequential bump regression; git diff --check. Not-tested: Full tox matrix across every supported Python version and operating system.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2026 +/- ##
=======================================
Coverage 98.23% 98.23%
=======================================
Files 61 61
Lines 2784 2784
=======================================
Hits 2735 2735
Misses 49 49 ☔ View full report in Codecov by Harness. |
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.
Description
Fixes #1367.
The default
$versionparser rejected.devNtags that Commitizen itself creates. This keeps generated PEP 440 prerelease, development, and local-version combinations discoverable so the next incremental changelog can find the previous tag.Checklist
Was generative AI tooling used to co-author this PR?
Generated-by: OpenAI Codex following the guidelines
Code Changes
uv-provider bumpsuv run poe alllocallyExpected Behavior
After creating
0.2.0.dev0, a subsequent--devrelease 1bump should recognize that tag and generate the0.2.0.dev1changelog, tag,pyproject.toml, anduv.lockupdates.Steps to Test This Pull Request
uvversion provider withupdate_changelog_on_bumpandchangelog_incrementalenabled.cz bump --devrelease 0 --yesafter a feature commit.cz bump --devrelease 1 --yes.0.2.0.dev1to the tag, changelog,pyproject.toml, anduv.lock.