Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-specfile for openSUSE:Factory checked in at 2024-09-22 11:06:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-specfile (Old) and /work/SRC/openSUSE:Factory/.python-specfile.new.29891 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-specfile" Sun Sep 22 11:06:18 2024 rev:25 rq:1202277 version:0.32.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-specfile/python-specfile.changes 2024-07-29 21:55:08.267401216 +0200 +++ /work/SRC/openSUSE:Factory/.python-specfile.new.29891/python-specfile.changes 2024-09-22 11:06:38.758153050 +0200 @@ -1,0 +2,7 @@ +Fri Sep 20 22:05:27 UTC 2024 - Joshua Smith <smolsh...@opensuse.org> + +- Update to 0.32.2: + * Explicitly invalidate the global parse hash when a SpecParser + instance is created to prevent this issue. + +------------------------------------------------------------------- Old: ---- specfile-0.32.1.tar.gz New: ---- specfile-0.32.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-specfile.spec ++++++ --- /var/tmp/diff_new_pack.QNNINR/_old 2024-09-22 11:06:39.234172711 +0200 +++ /var/tmp/diff_new_pack.QNNINR/_new 2024-09-22 11:06:39.234172711 +0200 @@ -17,7 +17,7 @@ Name: python-specfile -Version: 0.32.1 +Version: 0.32.2 Release: 0 Summary: A library for parsing and manipulating RPM spec files License: MIT ++++++ specfile-0.32.1.tar.gz -> specfile-0.32.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.32.1/.pre-commit-config.yaml new/specfile-0.32.2/.pre-commit-config.yaml --- old/specfile-0.32.1/.pre-commit-config.yaml 2024-07-29 17:20:52.000000000 +0200 +++ new/specfile-0.32.2/.pre-commit-config.yaml 2024-09-15 22:55:08.000000000 +0200 @@ -50,7 +50,7 @@ - id: mypy args: [--show-error-codes, --ignore-missing-imports] additional_dependencies: - [types-pkg_resources, types-requests, types-python-dateutil] + [types-setuptools, types-requests, types-python-dateutil] - repo: https://github.com/teemtee/tmt.git rev: 1.31.0 hooks: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.32.1/CHANGELOG.md new/specfile-0.32.2/CHANGELOG.md --- old/specfile-0.32.1/CHANGELOG.md 2024-07-29 17:20:52.000000000 +0200 +++ new/specfile-0.32.2/CHANGELOG.md 2024-09-15 22:55:08.000000000 +0200 @@ -1,3 +1,7 @@ +# 0.32.2 + +- Explicitly invalidate the global parse hash when a SpecParser instance is created to prevent this issue. (#409) + # 0.32.1 - Fixed two issues related to condition parsing. (#405) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.32.1/PKG-INFO new/specfile-0.32.2/PKG-INFO --- old/specfile-0.32.1/PKG-INFO 2024-07-29 17:21:03.178768200 +0200 +++ new/specfile-0.32.2/PKG-INFO 2024-09-15 22:55:14.697744400 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: specfile -Version: 0.32.1 +Version: 0.32.2 Summary: A library for parsing and manipulating RPM spec files. Home-page: https://github.com/packit/specfile Author: Red Hat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.32.1/epel8/python-specfile.spec new/specfile-0.32.2/epel8/python-specfile.spec --- old/specfile-0.32.1/epel8/python-specfile.spec 2024-07-29 17:20:52.000000000 +0200 +++ new/specfile-0.32.2/epel8/python-specfile.spec 2024-09-15 22:55:08.000000000 +0200 @@ -4,7 +4,7 @@ in a minimal diff.} -%global base_version 0.32.1 +%global base_version 0.32.2 #global prerelease rc1 %global package_version %{base_version}%{?prerelease:~%{prerelease}} @@ -68,6 +68,9 @@ %changelog +* Fri Sep 13 2024 Packit Team <he...@packit.dev> - 0.32.2-1 +- New upstream release 0.32.2 + * Mon Jul 29 2024 Packit Team <he...@packit.dev> - 0.32.1-1 - New upstream release 0.32.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.32.1/fedora/python-specfile.spec new/specfile-0.32.2/fedora/python-specfile.spec --- old/specfile-0.32.1/fedora/python-specfile.spec 2024-07-29 17:20:52.000000000 +0200 +++ new/specfile-0.32.2/fedora/python-specfile.spec 2024-09-15 22:55:08.000000000 +0200 @@ -7,7 +7,7 @@ in a minimal diff.} -%global base_version 0.32.1 +%global base_version 0.32.2 #global prerelease rc1 %global package_version %{base_version}%{?prerelease:~%{prerelease}} @@ -77,6 +77,9 @@ %changelog +* Fri Sep 13 2024 Packit Team <he...@packit.dev> - 0.32.2-1 +- New upstream release 0.32.2 + * Mon Jul 29 2024 Packit Team <he...@packit.dev> - 0.32.1-1 - New upstream release 0.32.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.32.1/plans/packit-integration.fmf new/specfile-0.32.2/plans/packit-integration.fmf --- old/specfile-0.32.1/plans/packit-integration.fmf 2024-07-29 17:20:52.000000000 +0200 +++ new/specfile-0.32.2/plans/packit-integration.fmf 2024-09-15 22:55:08.000000000 +0200 @@ -24,7 +24,7 @@ - how: install package: python3-pip - how: shell - script: pip3 install build deepdiff + script: pip3 install build 'deepdiff < 8.0.0' # version 8.0.0 depends on numpy, avoid it - when: "distro == rhel-8 or distro == centos-8 or distro == centos-stream-8" because: "packit doesn't support EL 8" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.32.1/specfile/spec_parser.py new/specfile-0.32.2/specfile/spec_parser.py --- old/specfile-0.32.1/specfile/spec_parser.py 2024-07-29 17:20:52.000000000 +0200 +++ new/specfile-0.32.2/specfile/spec_parser.py 2024-09-15 22:55:08.000000000 +0200 @@ -57,6 +57,10 @@ self.force_parse = force_parse self.spec = None self.tainted = False + # explicitly invalidate the global parse hash, this `SpecParser` instance could have + # been assigned the same id as a previously deleted one and parsing could be + # improperly skipped + SpecParser._last_parse_hash = None def __eq__(self, other: object) -> bool: if not isinstance(other, SpecParser): @@ -71,9 +75,12 @@ def __repr__(self) -> str: return f"SpecParser({self.sourcedir!r}, {self.macros!r}, {self.force_parse!r})" + def id(self) -> int: + return id(self) + def __deepcopy__(self, memo: Dict[int, Any]) -> "SpecParser": result = self.__class__.__new__(self.__class__) - memo[id(self)] = result + memo[self.id()] = result for k, v in self.__dict__.items(): if k in ["spec", "tainted"]: continue @@ -359,7 +366,7 @@ """ # calculate hash of all input parameters payload = ( - id(self), + self.id(), self.sourcedir, self.macros, self.force_parse, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.32.1/specfile.egg-info/PKG-INFO new/specfile-0.32.2/specfile.egg-info/PKG-INFO --- old/specfile-0.32.1/specfile.egg-info/PKG-INFO 2024-07-29 17:21:03.000000000 +0200 +++ new/specfile-0.32.2/specfile.egg-info/PKG-INFO 2024-09-15 22:55:14.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: specfile -Version: 0.32.1 +Version: 0.32.2 Summary: A library for parsing and manipulating RPM spec files. Home-page: https://github.com/packit/specfile Author: Red Hat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/specfile-0.32.1/tests/integration/test_specfile.py new/specfile-0.32.2/tests/integration/test_specfile.py --- old/specfile-0.32.1/tests/integration/test_specfile.py 2024-07-29 17:20:52.000000000 +0200 +++ new/specfile-0.32.2/tests/integration/test_specfile.py 2024-09-15 22:55:08.000000000 +0200 @@ -580,6 +580,16 @@ flexmock(SpecParser).should_call("_do_parse").once() assert spec1.expanded_name == "test" assert spec1.expanded_version == "28.1.2~rc2" + flexmock(SpecParser).should_receive("id").and_return(12345) + flexmock(SpecParser).should_call("_do_parse").once() + spec = Specfile(spec_macros) + flexmock(SpecParser).should_call("_do_parse").never() + assert spec.expanded_name == "test" + spec = None + flexmock(SpecParser).should_call("_do_parse").once() + spec = Specfile(spec_macros) + flexmock(SpecParser).should_call("_do_parse").never() + assert spec.expanded_name == "test" @pytest.mark.skipif(