PEP-440 local versions not accepted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PBR |
Triaged
|
Wishlist
|
Greg Hellings |
Bug Description
From 0.11.0 release, It can't parse version when build metadata is exist.
for example, our python-
python-
__version__ = pbr.version.
This code cause below error, so every openstack project can't start.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pbr/version.py", line 457, in version_string
return self.semantic_
File "pbr/version.py", line 452, in semantic_version
self._semantic = self._get_
File "pbr/version.py", line 440, in _get_version_
return SemanticVersion
File "pbr/version.py", line 203, in from_pip_string
prerelease_
File "pbr/version.py", line 181, in _parse_type
return prerelease_type, int(prerelease)
ValueError: invalid literal for int() with base 10: ''
I think our tag is compliant with Linux/Python Compatible Semantic Versioning 3.0.0.
(http://
In Semver no.12, It describe about build metadata and pbr can't parse version when tag contain build metadata.
description: | updated |
Changed in pbr: | |
assignee: | Kevin L. Mitchell (klmitch) → Greg Hellings (greg-hellings) |
Changed in pbr: | |
importance: | High → Wishlist |
status: | In Progress → Triaged |
That is a PEP-440 compliant version, but we haven't developed or tested using those with pbr.
I think this is something moderately important to fix - but we need to design out the interactions with this with version calculation - e.g. 'none, we accept it but any change discards it', and we need to consider this with the context of vendor versions too (which + might be used for). Sorry!
Your version number is perhaps not what you think it is though:
>>> from packaging import version parse(' 1.3.0+test2. 0.dev479' ).local
>>> version.
'test2.0.dev479'
I think you want 1.3.0.dev479+ test2.0