summaryrefslogtreecommitdiff
path: root/semantic_version/base.py
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2019-08-24 14:57:46 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2019-08-26 21:37:10 +0200
commit870060605e3955114766a979de1afadbea4dc603 (patch)
tree87c6a0e3656ad0eb3758f2b14cfceadde689188b /semantic_version/base.py
parent5c1abbef4d86bcd1ec68cf5deb90b559faf25502 (diff)
downloadsemantic-version-870060605e3955114766a979de1afadbea4dc603.tar.gz
Deprecate support for 'partial' versions.rba/pre-2.8
Their comparison semantics were ill-defined, and mostly an implementation detail for the old, 'native' specs.
Diffstat (limited to 'semantic_version/base.py')
-rw-r--r--semantic_version/base.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/semantic_version/base.py b/semantic_version/base.py
index 0e036ae..fb8205c 100644
--- a/semantic_version/base.py
+++ b/semantic_version/base.py
@@ -91,6 +91,12 @@ class Version:
prerelease=None,
build=None,
partial=False):
+ if partial:
+ warnings.warn(
+ "Partial versions will be removed in 3.0; use SimpleSpec('1.x.x') instead.",
+ DeprecationWarning,
+ stacklevel=2,
+ )
has_text = version_string is not None
has_parts = not (major is minor is patch is prerelease is build is None)
if not has_text ^ has_parts: