Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-python-daemon for openSUSE:Factory checked in at 2022-01-13 23:21:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-python-daemon (Old) and /work/SRC/openSUSE:Factory/.python-python-daemon.new.1892 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-python-daemon" Thu Jan 13 23:21:11 2022 rev:25 rq:946125 version:2.3.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-python-daemon/python-python-daemon.changes 2021-04-24 23:09:51.523454670 +0200 +++ /work/SRC/openSUSE:Factory/.python-python-daemon.new.1892/python-python-daemon.changes 2022-01-13 23:21:51.680063966 +0100 @@ -1,0 +2,8 @@ +Thu Jan 13 12:30:48 UTC 2022 - Matej Cepl <mc...@suse.com> + +- Add remove_double_patch.patch and remove_safe_hasattr.patch to + fix https://pagure.io/python-daemon/issue/53 +- Remove pytest as the test runner (apparently, the package + requires python3 -munittest discovery). + +------------------------------------------------------------------- New: ---- remove_double_patch.patch remove_safe_hasattr.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-python-daemon.spec ++++++ --- /var/tmp/diff_new_pack.VOLABV/_old 2022-01-13 23:21:52.196064303 +0100 +++ /var/tmp/diff_new_pack.VOLABV/_new 2022-01-13 23:21:52.212064314 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-python-daemon # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -26,10 +26,14 @@ Group: Development/Languages/Python URL: https://pagure.io/python-daemon/ Source: https://files.pythonhosted.org/packages/source/p/python-daemon/python-daemon-%{version}.tar.gz +# PATCH-FIX-UPSTREAM remove_safe_hasattr.patch https://pagure.io/python-daemon/issue/53 mc...@suse.com +# testtools.helpers.safe_hasattr has been removed and should never be mentioned again +Patch0: remove_safe_hasattr.patch +# PATCH-FIX-UPSTREAM remove_double_patch.patch https://pagure.io/python-daemon/issue/62 mc...@suse.com +# some objects were mocked twice +Patch1: remove_double_patch.patch BuildRequires: %{python_module docutils} BuildRequires: %{python_module lockfile >= 0.10} -BuildRequires: %{python_module mock >= 1.3} -BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module testscenarios >= 0.4} BuildRequires: %{python_module testtools} @@ -49,7 +53,8 @@ process environment for the program; use the instance as a context manager to enter a daemon state. %prep -%setup -q -n python-daemon-%{version} +%autosetup -p1 -n python-daemon-%{version} + sed -i '/docutils/d' setup.py %build @@ -60,10 +65,7 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -# test_returns_standard_stream_file_descriptors fails -# test_returns_expected_result fails with distutils error -# Test suite is completely broken, https://pagure.io/python-daemon/issue/53 -%python_exec -m pytest -k 'not test_returns_standard_stream_file_descriptors and not test_returns_expected_result' || /bin/true +%pyunittest discover -v %files %{python_files} %license LICENSE.ASF-2 LICENSE.GPL-3 ++++++ remove_double_patch.patch ++++++ >From 0c67a3c6407fbf4483ccfc94a7a0d78cf3379296 Mon Sep 17 00:00:00 2001 From: Miro Hron??ok <m...@hroncok.cz> Date: Sep 29 2021 10:05:27 +0000 Subject: Remove incorrect double-patch of objects in test cases. The specific test cases relying on the patches, already are decorated to patch the specific attributes needed. We don't need a general patch of the attributes in the test case setup. Signed-off-by: Ben Finney <ben+pyt...@benfinney.id.au> --- --- ChangeLog | 4 ++++ test/test_pidfile.py | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,10 @@ Version 2.3.0 :Released: 2021-02-21 :Maintainer: Ben Finney <ben+pyt...@benfinney.id.au> +* Remove incorrect double-patch of objects in test cases. + + Closes: Pagure #62. Thanks to Miro Hron??ok for the report. + Removed: * Remove support for Python versions older than Python 3. --- a/test/test_pidfile.py +++ b/test/test_pidfile.py @@ -391,12 +391,6 @@ class TimeoutPIDLockFile_TestCase(scaffo pidlockfile_scenarios = make_pidlockfile_scenarios() self.pidlockfile_scenario = pidlockfile_scenarios['simple'] - for func_name in ['__init__', 'acquire']: - func_patcher = unittest.mock.patch.object( - lockfile.pidlockfile.PIDLockFile, func_name) - func_patcher.start() - self.addCleanup(func_patcher.stop) - self.scenario = { 'pidfile_path': self.pidlockfile_scenario['pidfile_path'], 'acquire_timeout': self.getUniqueInteger(), ++++++ remove_safe_hasattr.patch ++++++ --- test/test_metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/test/test_metadata.py +++ b/test/test_metadata.py @@ -44,7 +44,7 @@ class HasAttribute(testtools.matchers.Ma def match(self, instance): """ Assert the object `instance` has an attribute named `name`. """ result = None - if not testtools.helpers.safe_hasattr(instance, self.attribute_name): + if not hasattr(instance, self.attribute_name): result = AttributeNotFoundMismatch(instance, self.attribute_name) return result