forward port #9608: handle invalid and dev versions in version parser#9653
Merged
ThomasWaldmann merged 1 commit intoMay 17, 2026
Merged
Conversation
…borgbackup#9014 - `src/borg/__init__.py`: The `setuptools_scm` fallback version `0.1.dev1` was incorrectly bypassing the assertion check (as `0` and `1` are valid integers), which hid the intended helpful error message when building from source without tags. Added an explicit check for the `0.1.dev` prefix. - `src/borg/version.py`: `parse_version` and `format_version` have been updated to correctly understand `setuptools_scm`'s `.dev` or `dev` prefixes. These dev releases are now properly encoded in the version tuple as `-9` (which logically makes them older than alphas `-4`, betas `-3`, rcs `-2`, and final `-1`), and correctly reformatted to `.dev` strings. (cherry picked from commit 232ccab)
59dd5b1 to
da0a2ff
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #9653 +/- ##
=======================================
Coverage 83.08% 83.08%
=======================================
Files 90 90
Lines 15653 15653
Branches 2356 2356
=======================================
Hits 13006 13006
Misses 1887 1887
Partials 760 760 ☔ View full report in Codecov by Sentry. |
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.
Forward port of #9608 to master.