Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-sure for openSUSE:Factory checked in at 2022-05-06 18:58:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-sure (Old) and /work/SRC/openSUSE:Factory/.python-sure.new.1538 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sure" Fri May 6 18:58:08 2022 rev:9 rq:974868 version:2.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-sure/python-sure.changes 2021-12-16 21:20:25.514546649 +0100 +++ /work/SRC/openSUSE:Factory/.python-sure.new.1538/python-sure.changes 2022-05-06 18:58:11.493281274 +0200 @@ -1,0 +2,8 @@ +Wed May 4 08:38:45 UTC 2022 - [email protected] + +- do not require mock for build nor runtime +- added patches + fix https://github.com/gabrielfalcao/sure/pull/161 + + python-sure-no-mock.patch + +------------------------------------------------------------------- New: ---- python-sure-no-mock.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-sure.spec ++++++ --- /var/tmp/diff_new_pack.AHNt9b/_old 2022-05-06 18:58:12.557282438 +0200 +++ /var/tmp/diff_new_pack.AHNt9b/_new 2022-05-06 18:58:12.565282447 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-sure # -# 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 @@ -25,14 +25,14 @@ Group: Development/Languages/Python URL: https://github.com/gabrielfalcao/sure Source: https://files.pythonhosted.org/packages/source/s/sure/sure-%{version}.tar.gz +# https://github.com/gabrielfalcao/sure/pull/161 +Patch0: python-sure-no-mock.patch BuildRequires: %{python_module mock >= 2.0.0} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six >= 1.10.0} BuildRequires: fdupes BuildRequires: python-rpm-macros -# regarding mock: https://github.com/gabrielfalcao/sure/pull/161 -Requires: python-mock >= 2.0.0 Requires: python-six >= 1.10.0 Requires(post): update-alternatives Requires(postun):update-alternatives @@ -45,6 +45,7 @@ %prep %setup -q -n sure-%{version} +%patch0 -p1 sed -i '/^#!/d' sure/*.py sed -i 's/--cov=sure//' setup.cfg ++++++ python-sure-no-mock.patch ++++++ --- a/sure/core.py +++ b/sure/core.py @@ -21,7 +21,10 @@ try: from mock import _CallList except ImportError: - from mock.mock import _CallList + try: + from mock.mock import _CallList + except ImportError: + from unittest.mock import _CallList import inspect from six import ( @@ -40,6 +43,7 @@ class Anything(object): def __eq__(self, _): return True + anything = Anything()
