Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-dunamai for openSUSE:Factory checked in at 2025-03-24 13:27:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-dunamai (Old) and /work/SRC/openSUSE:Factory/.python-dunamai.new.2696 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-dunamai" Mon Mar 24 13:27:45 2025 rev:9 rq:1255081 version:1.23.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-dunamai/python-dunamai.changes 2024-11-18 20:03:20.506480893 +0100 +++ /work/SRC/openSUSE:Factory/.python-dunamai.new.2696/python-dunamai.changes 2025-03-24 13:27:56.757033204 +0100 @@ -1,0 +2,7 @@ +Fri Mar 21 17:00:43 UTC 2025 - Richard Rahl <rra...@opensuse.org> + +- update to 1.23.1: + * Fixed: Version.__lt__ checked if all fields were less than the other + instance + +------------------------------------------------------------------- Old: ---- python-dunamai-1.23.0.tar.gz New: ---- python-dunamai-1.23.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-dunamai.spec ++++++ --- /var/tmp/diff_new_pack.SVanZU/_old 2025-03-24 13:27:57.697072372 +0100 +++ /var/tmp/diff_new_pack.SVanZU/_new 2025-03-24 13:27:57.701072539 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-dunamai # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-dunamai -Version: 1.23.0 +Version: 1.23.1 Release: 0 Summary: Dynamic version generation License: MIT ++++++ python-dunamai-1.23.0.tar.gz -> python-dunamai-1.23.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunamai-1.23.0/CHANGELOG.md new/dunamai-1.23.1/CHANGELOG.md --- old/dunamai-1.23.0/CHANGELOG.md 2024-11-18 00:58:44.661152000 +0100 +++ new/dunamai-1.23.1/CHANGELOG.md 2025-03-21 03:23:35.796795600 +0100 @@ -1,3 +1,8 @@ +## v1.23.1 (2025-03-20) + +* Fixed: `Version.__lt__` checked if *all* fields were less than the other instance, + rather than using the proper field precedence and version ordering. + ## v1.23.0 (2024-11-17) * Added: `{major}`, `{minor}`, and `{patch}` format placeholders. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunamai-1.23.0/PKG-INFO new/dunamai-1.23.1/PKG-INFO --- old/dunamai-1.23.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/dunamai-1.23.1/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: dunamai -Version: 1.23.0 +Version: 1.23.1 Summary: Dynamic version generation Home-page: https://github.com/mtkennerly/dunamai License: MIT diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunamai-1.23.0/dunamai/__init__.py new/dunamai-1.23.1/dunamai/__init__.py --- old/dunamai-1.23.0/dunamai/__init__.py 2024-11-17 23:06:24.719510600 +0100 +++ new/dunamai-1.23.1/dunamai/__init__.py 2025-03-21 02:17:09.085182000 +0100 @@ -654,19 +654,47 @@ import packaging.version as pv - return ( - pv.Version(self.base) < pv.Version(other.base) - and _blank(self.stage, "") < _blank(other.stage, "") - and _blank(self.revision, 0) < _blank(other.revision, 0) - and _blank(self.distance, 0) < _blank(other.distance, 0) - and _blank(self.commit, "") < _blank(other.commit, "") - and bool(self.dirty) < bool(other.dirty) - and _blank(self.tagged_metadata, "") < _blank(other.tagged_metadata, "") - and _blank(self.epoch, 0) < _blank(other.epoch, 0) - and _blank(self.branch, "") < _blank(other.branch, "") - and _blank(self.timestamp, dt.datetime(0, 0, 0, 0, 0, 0)) - < _blank(other.timestamp, dt.datetime(0, 0, 0, 0, 0, 0)) - ) + parsable = True + try: + us = pv.Version(self.serialize(metadata=False)) + them = pv.Version(other.serialize(metadata=False)) + if us < them: + return True + elif us > them: + return False + except Exception: + parsable = False + + common_pairs = [ + (_blank(self.distance, 0), _blank(other.distance, 0)), + (_blank(self.commit, ""), _blank(other.commit, "")), + (bool(self.dirty), bool(other.dirty)), + (_blank(self.tagged_metadata, ""), _blank(other.tagged_metadata, "")), + (_blank(self.branch, ""), _blank(other.branch, "")), + ( + _blank(self.timestamp, dt.datetime(1, 1, 1, 0, 0, 0)), + _blank(other.timestamp, dt.datetime(1, 1, 1, 0, 0, 0)), + ), + ] + + if parsable: + pairs = common_pairs + else: + pairs = [ + (_blank(self.epoch, 0), _blank(other.epoch, 0)), + (pv.Version(self.base), pv.Version(other.base)), + (_blank(self.stage, ""), _blank(other.stage, "")), + (_blank(self.revision, 0), _blank(other.revision, 0)), + *common_pairs, + ] + + for (a, b) in pairs: + if a < b: # type: ignore + return True + elif a > b: # type: ignore + return False + + return False def serialize( self, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunamai-1.23.0/pyproject.toml new/dunamai-1.23.1/pyproject.toml --- old/dunamai-1.23.0/pyproject.toml 2024-11-18 00:58:38.477429000 +0100 +++ new/dunamai-1.23.1/pyproject.toml 2025-03-21 03:23:56.146729200 +0100 @@ -1,6 +1,6 @@ [tool.poetry] name = "dunamai" -version = "1.23.0" +version = "1.23.1" description = "Dynamic version generation" license = "MIT" authors = ["Matthew T. Kennerly <mtkenne...@gmail.com>"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/dunamai-1.23.0/tests/unit/test_dunamai.py new/dunamai-1.23.1/tests/unit/test_dunamai.py --- old/dunamai-1.23.0/tests/unit/test_dunamai.py 2024-11-17 19:47:14.446717000 +0100 +++ new/dunamai-1.23.1/tests/unit/test_dunamai.py 2025-03-21 02:04:11.501139600 +0100 @@ -130,6 +130,14 @@ assert Version("0.1.0") != Version("0.1.0", dirty=True) assert Version("0.1.0") != Version("0.1.0", dirty=False) + assert Version("0.2.0") < Version("0.2.1") + assert Version("1.1.0") < Version("1.2.0") + assert Version("1.0.0", stage=("rc", 1)) < Version("1.0.0") + assert Version("1.0.0", stage=("a", 1)) < Version("1.0.0", stage=("b", 1)) + assert Version("1.0.0") < Version("1.0.0", stage=("post", 1)) + assert Version("1.0.0", epoch=1) < Version("1.0.0", epoch=2) + assert Version("1.0.0", stage=("bar", 1)) < Version("1.0.0", stage=("foo", 1)) + def test__version__serialize__pep440() -> None: assert Version("0.1.0").serialize() == "0.1.0"