pbr - 4-level version number
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PBR |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hi,
I am using pbr 3.1.1 on Python 2.7.13 on Debian 9.2 "stretch" and have issues with version numbers with 4 levels.
My setup.cfg contains:
[metadata]
version = 1.2.3.4
and according to PEP-440 those should be valid.
I am not trying to do a development-
Unfortunately, pbr fails on `python setup.py install` with
ERROR:root:Error parsing
Traceback (most recent call last):
File "/usr/lib/
attrs = util.cfg_
File "/usr/lib/
pbr.
File "/usr/lib/
metadata_
File "/usr/lib/
self.hook()
File "/usr/lib/
self.
File "/usr/lib/
version = _get_version_
File "/usr/lib/
pre_version)
File "/usr/lib/
return klass._
File "/usr/lib/
prerelease_
File "/usr/lib/
return prerelease_type, int(prerelease)
ValueError: invalid literal for int() with base 10: ''
error in setup command: Error parsing /home/axel/
is this a bug in pbr?
-------
Release: 3.1.2.dev36 on 2017-11-20 09:34
SHA: 73cc4189caa8b8e
Source: https:/
URL: https:/
PBR docs try to cover this but PBR explicitly uses a version of semver that is pep440 compatible. This means That versions should have three sets of numbers for major.minor.patch. Details are in the PBR docs at https:/ /docs.openstack .org/pbr/ latest/ user/semver. html.
I think the bug here is that PBR should probably generate a better error message to describe this situation.