You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bump_version.py drops the rc/beta suffix when bumping a dev counter on a pre-release #2459
util/bump_version.py's dev-counter bump doesn't preserve a pre-release segment: bump('1.6.0rc1.dev2') returns '1.6.0.dev3', silently dropping rc1. Under PEP 440, 1.6.0.dev3 sorts before1.6.0rc1.dev2, so this is a version regression, not just a cosmetic loss.
Repro
fromutil.bump_versionimportbumpbump('1.6.0rc1.dev2') # -> '1.6.0.dev3', expected something like '1.6.0rc1.dev3'
Surfaced during #2452's cross-review while checking is_devrelease/is_prerelease interactions; predates that PR and is unrelated to its gate logic.
Proposed fix
The dev-counter increment should preserve any pre-release segment already present (aN/bN/rcN) rather than reconstructing the version from just the release segment.
Activity
fix(util): keep the pre-release AND post-release segments when bump_v…
fix(util): keep the pre-release AND post-release segments when bump_v…