Hi.
Looks like pbr does not evaluate X.dev0 package correctly, it seems to confuse it as being equal to X.
Example: from_pip_string("1.0.0.dev0") == from_pip_string("1.0.0").
According to PEP440, 1.2.dev == 1.2.dev0 but both are < 1.2.
>>> SemanticVersion.from_pip_string("1.2.0") pbr.version.SemanticVersion(1.2.0) >>> SemanticVersion.from_pip_string("1.2.0.dev1") pbr.version.SemanticVersion(1.2.0.dev1) >>> SemanticVersion.from_pip_string("1.2.0.dev0") pbr.version.SemanticVersion(1.2.0) >>> SemanticVersion.from_pip_string("1.2.0.dev") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/az02065/Projects/Alton/nestor_build_info/.venv/lib/python3.7/site-packages/pbr/version.py", line 145, in from_pip_string return klass._from_pip_string_unsafe(version_string) File "/Users/az02065/Projects/Alton/nestor_build_info/.venv/lib/python3.7/site-packages/pbr/version.py", line 215, in _from_pip_string_unsafe dev_count = int(component[3:]) ValueError: invalid literal for int() with base 10: ''
Expected behavior:
>>> SemanticVersion.from_pip_string("1.2.0.dev0") pbr.version.SemanticVersion(1.2.0.dev0) >>> SemanticVersion.from_pip_string("1.2.0.dev") pbr.version.SemanticVersion(1.2.0.dev)
Hi.
Looks like pbr does not evaluate X.dev0 package correctly, it seems to confuse it as being equal to X.
Example: from_pip_ string( "1.0.0. dev0") == from_pip_ string( "1.0.0" ).
According to PEP440, 1.2.dev == 1.2.dev0 but both are < 1.2.
>>> SemanticVersion .from_pip_ string( "1.2.0" ) SemanticVersion (1.2.0) .from_pip_ string( "1.2.0. dev1") SemanticVersion (1.2.0. dev1) .from_pip_ string( "1.2.0. dev0") SemanticVersion (1.2.0) .from_pip_ string( "1.2.0. dev") az02065/ Projects/ Alton/nestor_ build_info/ .venv/lib/ python3. 7/site- packages/ pbr/version. py", line 145, in from_pip_string from_pip_ string_ unsafe( version_ string) az02065/ Projects/ Alton/nestor_ build_info/ .venv/lib/ python3. 7/site- packages/ pbr/version. py", line 215, in _from_pip_ string_ unsafe
pbr.version.
>>> SemanticVersion
pbr.version.
>>> SemanticVersion
pbr.version.
>>> SemanticVersion
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/
return klass._
File "/Users/
dev_count = int(component[3:])
ValueError: invalid literal for int() with base 10: ''
Expected behavior:
>>> SemanticVersion .from_pip_ string( "1.2.0. dev0") SemanticVersion (1.2.0. dev0) .from_pip_ string( "1.2.0. dev") SemanticVersion (1.2.0. dev)
pbr.version.
>>> SemanticVersion
pbr.version.