Hello community,
here is the log from the commit of package python-semantic_version for
openSUSE:Leap:15.2 checked in at 2020-03-27 16:48:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-semantic_version (Old)
and /work/SRC/openSUSE:Leap:15.2/.python-semantic_version.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-semantic_version"
Fri Mar 27 16:48:35 2020 rev:12 rq:789046 version:2.8.4
Changes:
--------
---
/work/SRC/openSUSE:Leap:15.2/python-semantic_version/python-semantic_version.changes
2020-03-02 13:22:35.122306267 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.python-semantic_version.new.3160/python-semantic_version.changes
2020-03-27 16:48:38.331951468 +0100
@@ -1,0 +2,11 @@
+Wed Mar 18 13:38:47 UTC 2020 - [email protected]
+
+- version update to 2.8.4
+ * `#89 <https://github.com/rbarrois/python-semanticversion/issues/89>`_:
+ Properly coerce versions with leading zeroes in components (e.g.
+ ``1.01.007``)
+ - Add `Clause.prettyprint()` for debugging
+ * `#86 <https://github.com/rbarrois/python-semanticversion/issues/86>`_:
+ Fix handling of prerelease ranges within `NpmSpec`
+
+-------------------------------------------------------------------
Old:
----
semantic_version-2.8.2.tar.gz
New:
----
semantic_version-2.8.4.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-semantic_version.spec ++++++
--- /var/tmp/diff_new_pack.3jqpSk/_old 2020-03-27 16:48:38.631951645 +0100
+++ /var/tmp/diff_new_pack.3jqpSk/_new 2020-03-27 16:48:38.635951647 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-semantic_version
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,13 +18,14 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-semantic_version
-Version: 2.8.2
+Version: 2.8.4
Release: 0
Summary: A library implementing the 'SemVer' scheme
License: BSD-2-Clause
Group: Development/Languages/Python
URL: https://github.com/rbarrois/python-semanticversion
Source:
https://files.pythonhosted.org/packages/source/s/semantic_version/semantic_version-%{version}.tar.gz
+BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@@ -46,7 +47,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
-%python_exec setup.py test
+%pytest
%files %{python_files}
%license LICENSE
++++++ semantic_version-2.8.2.tar.gz -> semantic_version-2.8.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/semantic_version-2.8.2/ChangeLog
new/semantic_version-2.8.4/ChangeLog
--- old/semantic_version-2.8.2/ChangeLog 2019-09-06 13:11:22.000000000
+0200
+++ new/semantic_version-2.8.4/ChangeLog 2019-12-21 16:02:29.000000000
+0100
@@ -1,6 +1,28 @@
ChangeLog
=========
+2.8.4 (2019-12-21)
+------------------
+
+*Bugfix:*
+
+ * `#89 <https://github.com/rbarrois/python-semanticversion/issues/89>`_:
+ Properly coerce versions with leading zeroes in components (e.g.
+ ``1.01.007``)
+
+
+2.8.3 (2019-11-21)
+------------------
+
+*New:*
+ - Add `Clause.prettyprint()` for debugging
+
+*Bugfix:*
+
+ * `#86 <https://github.com/rbarrois/python-semanticversion/issues/86>`_:
+ Fix handling of prerelease ranges within `NpmSpec`
+
+
2.8.2 (2019-09-06)
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/semantic_version-2.8.2/PKG-INFO
new/semantic_version-2.8.4/PKG-INFO
--- old/semantic_version-2.8.2/PKG-INFO 2019-09-06 13:11:22.000000000 +0200
+++ new/semantic_version-2.8.4/PKG-INFO 2019-12-21 16:02:29.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: semantic_version
-Version: 2.8.2
+Version: 2.8.4
Summary: A library implementing the 'SemVer' scheme.
Home-page: https://github.com/rbarrois/python-semanticversion
Author: Raphaël Barrois
@@ -179,8 +179,8 @@
>>> s = SimpleSpec('>=0.1.1') # At least 0.1.1
>>> s.match(Version('0.1.1'))
True
- >>> s.match(Version('0.1.1-alpha1')) # pre-release satisfy
version spec
- True
+ >>> s.match(Version('0.1.1-alpha1')) # pre-release doesn't
satisfy version spec
+ False
>>> s.match(Version('0.1.0'))
False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/semantic_version-2.8.2/README.rst
new/semantic_version-2.8.4/README.rst
--- old/semantic_version-2.8.2/README.rst 2019-09-06 13:11:22.000000000
+0200
+++ new/semantic_version-2.8.4/README.rst 2019-12-21 16:02:29.000000000
+0100
@@ -171,8 +171,8 @@
>>> s = SimpleSpec('>=0.1.1') # At least 0.1.1
>>> s.match(Version('0.1.1'))
True
- >>> s.match(Version('0.1.1-alpha1')) # pre-release satisfy version spec
- True
+ >>> s.match(Version('0.1.1-alpha1')) # pre-release doesn't satisfy
version spec
+ False
>>> s.match(Version('0.1.0'))
False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/semantic_version-2.8.2/docs/changelog.rst
new/semantic_version-2.8.4/docs/changelog.rst
--- old/semantic_version-2.8.2/docs/changelog.rst 2019-09-06
13:11:22.000000000 +0200
+++ new/semantic_version-2.8.4/docs/changelog.rst 2019-12-21
16:02:29.000000000 +0100
@@ -1,6 +1,28 @@
ChangeLog
=========
+2.8.4 (2019-12-21)
+------------------
+
+*Bugfix:*
+
+ * `#89 <https://github.com/rbarrois/python-semanticversion/issues/89>`_:
+ Properly coerce versions with leading zeroes in components (e.g.
+ ``1.01.007``)
+
+
+2.8.3 (2019-11-21)
+------------------
+
+*New:*
+ - Add `Clause.prettyprint()` for debugging
+
+*Bugfix:*
+
+ * `#86 <https://github.com/rbarrois/python-semanticversion/issues/86>`_:
+ Fix handling of prerelease ranges within `NpmSpec`
+
+
2.8.2 (2019-09-06)
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/semantic_version-2.8.2/docs/index.rst
new/semantic_version-2.8.4/docs/index.rst
--- old/semantic_version-2.8.2/docs/index.rst 2019-09-06 13:11:22.000000000
+0200
+++ new/semantic_version-2.8.4/docs/index.rst 2019-12-21 16:02:29.000000000
+0100
@@ -171,8 +171,8 @@
>>> s = SimpleSpec('>=0.1.1') # At least 0.1.1
>>> s.match(Version('0.1.1'))
True
- >>> s.match(Version('0.1.1-alpha1')) # pre-release satisfy version spec
- True
+ >>> s.match(Version('0.1.1-alpha1')) # pre-release doesn't satisfy
version spec
+ False
>>> s.match(Version('0.1.0'))
False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/semantic_version-2.8.2/docs/reference.rst
new/semantic_version-2.8.4/docs/reference.rst
--- old/semantic_version-2.8.2/docs/reference.rst 2019-09-06
13:11:22.000000000 +0200
+++ new/semantic_version-2.8.4/docs/reference.rst 2019-12-21
16:02:29.000000000 +0100
@@ -470,7 +470,7 @@
* A clause of ``<=XXX`` will match versions that match ``<XXX`` or
``==XXX``
* A clause of ``>0.1.2`` will match versions strictly above ``0.1.2``,
including all prereleases of ``0.1.3``.
* A clause of ``>0.1.2-rc.3`` will match versions strictly above
``0.1.2-rc.3``, including matching prereleases of ``0.1.2``: ``0.1.2-rc.10`` is
included;
- * A clause of ``<=XXX`` will match versions that match ``>XXX`` or
``==XXX``
+ * A clause of ``>=XXX`` will match versions that match ``>XXX`` or
``==XXX``
.. rubric:: Extensions
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/semantic_version-2.8.2/semantic_version/__init__.py
new/semantic_version-2.8.4/semantic_version/__init__.py
--- old/semantic_version-2.8.2/semantic_version/__init__.py 2019-09-06
13:11:22.000000000 +0200
+++ new/semantic_version-2.8.4/semantic_version/__init__.py 2019-12-21
16:02:29.000000000 +0100
@@ -7,4 +7,4 @@
__author__ = "Raphaël Barrois <[email protected]>"
-__version__ = '2.8.2'
+__version__ = '2.8.4'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/semantic_version-2.8.2/semantic_version/base.py
new/semantic_version-2.8.4/semantic_version/base.py
--- old/semantic_version-2.8.2/semantic_version/base.py 2019-09-06
13:11:22.000000000 +0200
+++ new/semantic_version-2.8.4/semantic_version/base.py 2019-12-21
16:02:29.000000000 +0100
@@ -244,6 +244,14 @@
while version.count('.') < 2:
version += '.0'
+ # Strip leading zeros in components
+ # Version is of the form nn, nn.pp or nn.pp.qq
+ version = '.'.join(
+ # If the part was '0', we end up with an empty string.
+ part.lstrip('0') or '0'
+ for part in version.split('.')
+ )
+
if match.end() == len(version_string):
return Version(version, partial=partial)
@@ -673,6 +681,19 @@
def __eq__(self, other):
raise NotImplementedError()
+ def prettyprint(self, indent='\t'):
+ """Pretty-print the clause.
+ """
+ return '\n'.join(self._pretty()).replace('\t', indent)
+
+ def _pretty(self):
+ """Actual pretty-printing logic.
+
+ Yields:
+ A list of string. Indentation is performed with \t.
+ """
+ yield repr(self)
+
def __ne__(self, other):
return not self == other
@@ -733,6 +754,15 @@
def __repr__(self):
return 'AnyOf(%s)' % ', '.join(sorted(repr(c) for c in self.clauses))
+ def _pretty(self):
+ yield 'AnyOF('
+ for clause in self.clauses:
+ lines = list(clause._pretty())
+ for line in lines[:-1]:
+ yield '\t' + line
+ yield '\t' + lines[-1] + ','
+ yield ')'
+
class AllOf(Clause):
__slots__ = ['clauses']
@@ -789,6 +819,15 @@
def __repr__(self):
return 'AllOf(%s)' % ', '.join(sorted(repr(c) for c in self.clauses))
+ def _pretty(self):
+ yield 'AllOF('
+ for clause in self.clauses:
+ lines = list(clause._pretty())
+ for line in lines[:-1]:
+ yield '\t' + line
+ yield '\t' + lines[-1] + ','
+ yield ')'
+
class Matcher(Clause):
__slots__ = []
@@ -1242,7 +1281,7 @@
prerelease_policy=Range.PRERELEASE_ALWAYS,
))
elif clause.operator in (Range.OP_LT, Range.OP_LTE):
- prerelease_clauses.append(cls.range(
+ prerelease_clauses.append(Range(
operator=Range.OP_GTE,
target=Version(
major=clause.target.major,
@@ -1250,6 +1289,7 @@
patch=0,
prerelease=(),
),
+ prerelease_policy=Range.PRERELEASE_ALWAYS,
))
prerelease_clauses.append(clause)
non_prerel_clauses.append(cls.range(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/semantic_version-2.8.2/semantic_version.egg-info/PKG-INFO
new/semantic_version-2.8.4/semantic_version.egg-info/PKG-INFO
--- old/semantic_version-2.8.2/semantic_version.egg-info/PKG-INFO
2019-09-06 13:11:22.000000000 +0200
+++ new/semantic_version-2.8.4/semantic_version.egg-info/PKG-INFO
2019-12-21 16:02:29.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 1.2
Name: semantic-version
-Version: 2.8.2
+Version: 2.8.4
Summary: A library implementing the 'SemVer' scheme.
Home-page: https://github.com/rbarrois/python-semanticversion
Author: Raphaël Barrois
@@ -179,8 +179,8 @@
>>> s = SimpleSpec('>=0.1.1') # At least 0.1.1
>>> s.match(Version('0.1.1'))
True
- >>> s.match(Version('0.1.1-alpha1')) # pre-release satisfy
version spec
- True
+ >>> s.match(Version('0.1.1-alpha1')) # pre-release doesn't
satisfy version spec
+ False
>>> s.match(Version('0.1.0'))
False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/semantic_version-2.8.2/tests/test_base.py
new/semantic_version-2.8.4/tests/test_base.py
--- old/semantic_version-2.8.2/tests/test_base.py 2019-09-06
13:11:22.000000000 +0200
+++ new/semantic_version-2.8.4/tests/test_base.py 2019-12-21
16:02:29.000000000 +0100
@@ -569,7 +569,7 @@
examples = {
# Dict of target: [list of equivalents]
'0.0.0': ('0', '0.0', '0.0.0', '0.0.0+', '0-'),
- '0.1.0': ('0.1', '0.1+', '0.1-', '0.1.0'),
+ '0.1.0': ('0.1', '0.1+', '0.1-', '0.1.0', '0.01.0',
'000.0001.0000000000'),
'0.1.0+2': ('0.1.0+2', '0.1.0.2'),
'0.1.0+2.3.4': ('0.1.0+2.3.4', '0.1.0+2+3+4', '0.1.0.2+3+4'),
'0.1.0+2-3.4': ('0.1.0+2-3.4', '0.1.0+2-3+4', '0.1.0.2-3+4',
'0.1.0.2_3+4'),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/semantic_version-2.8.2/tests/test_npm.py
new/semantic_version-2.8.4/tests/test_npm.py
--- old/semantic_version-2.8.2/tests/test_npm.py 2019-09-06
13:11:22.000000000 +0200
+++ new/semantic_version-2.8.4/tests/test_npm.py 2019-12-21
16:02:29.000000000 +0100
@@ -40,6 +40,10 @@
['1.2.3-alpha.3', '1.2.3-alpha.7', '3.4.5'],
['1.2.3-alpha.2', '3.4.5-alpha.9'],
),
+ '>1.2.3-alpha <1.2.3-beta': (
+ ['1.2.3-alpha.0', '1.2.3-alpha.1'],
+ ['1.2.3', '1.2.3-beta.0', '1.2.3-bravo'],
+ ),
'1.2.3 - 2.3.4': (
['1.2.3', '1.2.99', '2.2.0', '2.3.4', '2.3.4+b42'],
['1.2.0', '1.2.3-alpha.1', '2.3.5'],