Merge "Convert =0 version specs to ==0 specs"
This commit is contained in:
commit
a54072af73
@ -275,6 +275,12 @@ def parse_version_spec(version_spec):
|
||||
if not version_spec:
|
||||
version_spec = '0'
|
||||
version_spec = re.sub('\s+', '', str(version_spec))
|
||||
|
||||
# NOTE(kzaitsev): semantic_version 2.3.X thinks that '=0' is not
|
||||
# a valid version spec and only accepts '==0', this regexp adds
|
||||
# an extra '=' before such specs
|
||||
version_spec = re.sub(r'^=(\d)', r'==\1', version_spec)
|
||||
|
||||
if version_spec[0].isdigit():
|
||||
version_spec = '==' + str(version_spec)
|
||||
version_spec = semantic_version.Spec(version_spec)
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
fixes:
|
||||
- It is now possible to use version specifications like '=0.0.0' when
|
||||
``semantic_version`` library version '2.3.1' is installed. Previously
|
||||
such specifications caused an error and '==0.0.0' had to be used.
|
Loading…
Reference in New Issue
Block a user