-
-
Notifications
You must be signed in to change notification settings - Fork 217
Allow '+' as a version number separator #1120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
why not 👍
|
|
Obviously, re.split() can also be used to parse |
|
I'm ok with removing it. |
|
The __version_info__ is useful for doing tuple comparisons and using
gpodder as a library, as you can do e.g. gpodder.__version_info__ >= (3,
10, 4).
As for the adaptive branch, why use “+” and not just e.g. a fourth
component?
Eric Le Lay ***@***.***> schrieb am Do. 5. Aug. 2021 um 20:46:
… I'm ok with removing it.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1120 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABBASLBNUUXYQ6NIKYYJC3T3LMAXANCNFSM5BRGO4CQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
|
@thp, the idea was to visually separate the adaptive revisions from the master branch releases, but as seen, this may cause more problems than it solves. The reasonable options are to use re.split('.|+') for splitting the version string everywhere (see the latest push) or I start to use '.' as the adaptive revision separator. Either way is fine for me, but I would prefer the first option. |
|
Using a +adaptive-N suffix would make it a local version, according to https://www.python.org/dev/peps/pep-0440/#development-release-separators. Is it what we're after? |
Handle public and local version parts of __version__ in version comparisons and when parsing __version_info__.
|
Interesting link. The latest push now handles the local version label as required in PEP 440 and leaves the public version part handling as it was. |
|
BTW, there's a Python library function for version number parsing called packaging.version.parse (also included in setuptools as pkg_resources.packaging.version.parse), but using that requires adding either packaging or setuptools as dependency. |
|
Adding the extra dependency seems a bit too much. Regarding versioning, what format do you intend to use: It seems to work as expected anyway: |
|
I'll leave the adaptive branch versioning as it is, ('3.10.21+1' etc.), unless there is good reason to change it. |
thp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me, but it's @elelay's call :)
|
That's it then :-) |
|
Thanks |
The adaptive branch currently has version numbers like '3.10.21+1', which breaks when trying to split() the version string on periods. This PR fixes or removes the version string splitting.
The unused variable
__version_info__is removed, and re.split() is used in util.get_update_info() which allows splitting also on '+'.