summaryrefslogtreecommitdiff
path: root/semantic_version
diff options
context:
space:
mode:
authorMartin Ek <mail@ekmartin.com>2016-03-07 13:22:13 +0100
committerMartin Ek <mail@ekmartin.com>2016-03-07 13:22:13 +0100
commit2d3f694f852ac1619d673b67b115cb9bbb352c5e (patch)
tree57cc02af9977f44a43dc1c98b77c70820ffc341b /semantic_version
parentb08014a65eabfa8dfe372bdf0aa8195309f6e736 (diff)
downloadsemantic-version-2d3f694f852ac1619d673b67b115cb9bbb352c5e.tar.gz
Fix a bug with compatible release clauses and patch versions
Previously, if the patch version was 0 (i.e. as in ~=2.2.0), this would cause the range to be interpreted as ~=2.2.
Diffstat (limited to 'semantic_version')
-rw-r--r--semantic_version/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/semantic_version/base.py b/semantic_version/base.py
index 83a9c25..0f4e11b 100644
--- a/semantic_version/base.py
+++ b/semantic_version/base.py
@@ -470,7 +470,7 @@ class SpecItem(object):
elif self.kind == self.KIND_TILDE:
return self.spec <= version < self.spec.next_minor()
elif self.kind == self.KIND_COMPATIBLE:
- if self.spec.patch:
+ if self.spec.patch is not None:
upper = self.spec.next_minor()
else:
upper = self.spec.next_major()