Skip to content

Bump large numeric identifiers without integer conversion - #494

Open
muneikh wants to merge 2 commits into
python-semver:masterfrom
muneikh:fix-large-identifier-bumps
Open

muneikh wants to merge 2 commits into
python-semver:masterfrom
muneikh:fix-large-identifier-bumps

Conversation

@muneikh

@muneikh muneikh commented Oct 11, 2026 •

Copy link
Copy Markdown

Numeric prerelease and build identifiers accepted by Version.parse can still fail when bumped: a 5000-digit identifier raises Python's integer string conversion ValueError. The comparison path already avoids that limit following #487/#488.

Increment ASCII decimal strings directly and reuse the helper for prerelease bumps, build bumps, and the old-style rc3 branch of next_version. Carry propagation works without changing the process-wide conversion limit. Existing build zero padding and constructor Unicode-digit behavior are preserved.

Regression tests cover all three paths with no carry, a carry chain, and an extra output digit; all nine fail before the fix. Full test/doctest suites pass under tox on Python 3.10 through 3.15 (498 passed, 1 skipped per interpreter). The repository-wide ruff check currently fails with existing diagnostics; comparing the unmodified source and this patch produces the same 160 diagnostics and no new diagnostics. The pr494.bugfix.rst changelog fragment is included; tox changelog check and draft build pass.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant