Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-fudge for openSUSE:Factory checked in at 2021-01-19 16:03:06 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-fudge (Old) and /work/SRC/openSUSE:Factory/.python-fudge.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-fudge" Tue Jan 19 16:03:06 2021 rev:14 rq:864231 version:1.1.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-fudge/python-fudge.changes 2020-04-23 18:32:39.104341883 +0200 +++ /work/SRC/openSUSE:Factory/.python-fudge.new.28504/python-fudge.changes 2021-01-19 16:04:05.379551283 +0100 @@ -1,0 +2,9 @@ +Tue Jan 19 02:11:07 UTC 2021 - John Vandenberg <jay...@gmail.com> + +- Use python-modernize +- Reduce remove_nose.patch to modifications of tests only, + and re-enable two more tests +- Update URL +- Trim description + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-fudge.spec ++++++ --- /var/tmp/diff_new_pack.D46ZXU/_old 2021-01-19 16:04:06.111552383 +0100 +++ /var/tmp/diff_new_pack.D46ZXU/_new 2021-01-19 16:04:06.119552395 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-fudge # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -23,21 +23,20 @@ Summary: Module for replacing real objects with fakes (mocks, stubs, etc) while testing License: MIT Group: Development/Languages/Python -URL: http://farmdev.com/projects/fudge/ +URL: https://github.com/fudge-py/fudge Source: https://files.pythonhosted.org/packages/source/f/fudge/fudge-%{version}.tar.gz -# PATCH-FEATURE-UPSTREAM remove_nose.patch gh#fudge-py/fudge#11 mc...@suse.com -# Remove the need of using nose and port to py3k Patch0: remove_nose.patch +BuildRequires: %{python_module modernize} BuildRequires: %{python_module pytest} +BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-six BuildArch: noarch %python_subpackages %description -Complete documentation is available at http://farmdev.com/projects/fudge/ - Fudge is a Python module for using fake objects (mocks and stubs) to test real ones. In readable Python code, you declare what methods are available on your fake and @@ -51,6 +50,8 @@ %setup -q -n fudge-%{version} %autopatch -p1 +python-modernize -w fudge/*.py + %build %python_build @@ -60,8 +61,8 @@ %check # gh#fudge-py/fudge#11 -# Still unported tests -%pytest -k 'not (test_decorator_on_def or test_expectations_are_always_cleared or test_expectations_are_always_cleared or test_global_clear_expectations)' +# Two still unported tests +%pytest -k 'not (test_decorator_on_def or test_expectations_are_always_cleared)' %files %{python_files} %license LICENSE.txt ++++++ remove_nose.patch ++++++ --- /var/tmp/diff_new_pack.D46ZXU/_old 2021-01-19 16:04:06.147552438 +0100 +++ /var/tmp/diff_new_pack.D46ZXU/_new 2021-01-19 16:04:06.147552438 +0100 @@ -1,7 +1,4 @@ --- - fudge/__init__.py | 5 - fudge/inspector.py | 3 - fudge/patcher.py | 7 fudge/tests/test_fudge.py | 713 +++++++++++++++++++++--------------------- fudge/tests/test_inspector.py | 93 ++--- fudge/tests/test_patcher.py | 416 ++++++++++++------------ @@ -2221,7 +2218,7 @@ self.reg.remember_expected_call_order(exp_order) - eq_(self.reg.get_expected_call_order().keys(), [self.fake]) - -+ self.assertEqual(self.reg.get_expected_call_order().keys(), [self.fake]) ++ self.assertEqual(list(self.reg.get_expected_call_order().keys()), [self.fake]) + fudge.clear_expectations() - @@ -2292,76 +2289,6 @@ thread.start_new_thread(registry, (1,)) thread.start_new_thread(registry, (2,)) thread.start_new_thread(registry, (3,)) ---- a/fudge/__init__.py -+++ b/fudge/__init__.py -@@ -9,7 +9,10 @@ __version__ = '1.1.1' - import os - import re - import sys --import thread -+try: -+ import _thread as thread -+except ImportError: -+ import thread - import warnings - from fudge.exc import FakeDeclarationError - from fudge.patcher import * ---- a/fudge/patcher.py -+++ b/fudge/patcher.py -@@ -9,6 +9,7 @@ __all__ = ['patch_object', 'with_patched - - import sys - -+import six - import fudge - from fudge.util import wraps - -@@ -80,7 +81,7 @@ class patch(object): - except: - etype, val, tb = sys.exc_info() - self.__exit__(etype, val, tb) -- raise etype, val, tb -+ six.reraise(etype, val, tb) - else: - self.__exit__(None, None, None) - return value -@@ -239,7 +240,7 @@ def patch_object(obj, attr_name, patched - 'clean' - - """ -- if isinstance(obj, (str, unicode)): -+ if isinstance(obj, six.string_types): - obj_path = adjusted_path = obj - done = False - exc = None -@@ -259,7 +260,7 @@ def patch_object(obj, attr_name, patched - # We're at the top level module and it doesn't exist. - # Raise the first exception since it will make more sense: - etype, val, tb = exc -- raise etype, val, tb -+ six.reraise(etype, val, tb) - if not adjusted_path.count('.'): - at_top_level = True - for part in obj_path.split('.')[1:]: ---- a/fudge/inspector.py -+++ b/fudge/inspector.py -@@ -21,6 +21,7 @@ should end with the suffix ".jpg" - - """ - import warnings -+import six - - from fudge.util import fmt_val, fmt_dict_vals - -@@ -505,7 +506,7 @@ class Stringlike(ValueTest): - return self._make_argspec(fmt_val(self.part)) - - def stringlike(self, value): -- if isinstance(value, (str, unicode)): -+ if isinstance(value, six.string_types): - return value - else: - return str(value) --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ email without actually sending email::