Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-python-afl for 
openSUSE:Factory checked in at 2021-10-26 20:14:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-python-afl (Old)
 and      /work/SRC/openSUSE:Factory/.python-python-afl.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-python-afl"

Tue Oct 26 20:14:02 2021 rev:8 rq:927489 version:0.7.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-python-afl/python-python-afl.changes      
2021-06-09 21:52:53.674538105 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-python-afl.new.1890/python-python-afl.changes
    2021-10-26 20:14:47.962044849 +0200
@@ -1,0 +2,6 @@
+Tue Oct 26 03:31:21 UTC 2021 - Steve Kowalik <[email protected]>
+
+- Add remove-nose.patch:
+  * Stop using nose methods, using bare asserts instead. 
+
+-------------------------------------------------------------------

New:
----
  remove-nose.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-python-afl.spec ++++++
--- /var/tmp/diff_new_pack.pTqBP3/_old  2021-10-26 20:14:48.458045110 +0200
+++ /var/tmp/diff_new_pack.pTqBP3/_new  2021-10-26 20:14:48.462045113 +0200
@@ -27,6 +27,7 @@
 Source:         
https://files.pythonhosted.org/packages/source/p/python-afl/python-afl-%{version}.tar.gz
 # PATCH-FIX-OPENSUSE
 Patch0:         
https://github.com/jwilk/python-afl/compare/%{version}...sebix:0.7.2-fix-setup-tests.patch#/Use-setuptools-and-use-test-command-for-setup.patch
+Patch1:         remove-nose.patch
 BuildRequires:  %{python_module Cython >= 0.19}
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
@@ -38,7 +39,6 @@
 # name with _ automatically redirected by pypi to name with -
 Provides:       python-python_afl
 # SECTION test requirements
-BuildRequires:  %{python_module nose}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  afl >= 2
 BuildRequires:  procps
@@ -52,7 +52,7 @@
 
 %prep
 %setup -q -n python-afl-%{version}
-%patch0 -p1
+%autopatch -p1
 
 %build
 export CFLAGS="%{optflags}"

++++++ remove-nose.patch ++++++
Index: python-afl-0.7.3/tests/tools.py
===================================================================
--- python-afl-0.7.3.orig/tests/tools.py
+++ python-afl-0.7.3/tests/tools.py
@@ -31,29 +31,20 @@ import tempfile
 import traceback
 import warnings
 
-import nose.tools
+from unittest import SkipTest
 
-from nose import SkipTest
+def assert_equal(first, second):
+    assert first == second
 
-from nose.tools import (
-    assert_equal,
-    assert_not_equal,
-    assert_true,
-)
+def assert_not_equal(first, second):
+    assert first != second
+
+def assert_true(first, msg):
+    assert first is True, msg
 
 def assert_fail(msg):
     assert_true(False, msg=msg)  # pylint: disable=redundant-unittest-assert
 
-def noseimport(vmaj, vmin, name=None):
-    def wrapper(f):
-        if f.__module__ == 'unittest.case':
-            return f
-        if sys.version_info >= (vmaj, vmin):
-            return getattr(nose.tools, name or f.__name__)
-        return f
-    return wrapper
-
-@noseimport(2, 7)
 class assert_raises(object):
     def __init__(self, exc_type):
         self._exc_type = exc_type
@@ -76,28 +67,19 @@ class assert_raises(object):
         self.exception = exc_value
         return True
 
-@noseimport(2, 7, 'assert_raises_regexp')
-@noseimport(3, 2)
 @contextlib.contextmanager
 def assert_raises_regex(exc_type, regex):
     with assert_raises(exc_type) as ecm:
         yield
     assert_regex(str(ecm.exception), regex)
 
-@noseimport(2, 7, 'assert_regexp_matches')
-@noseimport(3, 2)
 def assert_regex(text, regex):
-    try:
-        str_types = basestring
-    except NameError:
-        str_types = (str, bytes)
-    if isinstance(regex, str_types):
+    if isinstance(regex, (str, bytes)):
         regex = re.compile(regex)
     if not regex.search(text):
         message = "Regex didn't match: {0!r} not found in 
{1!r}".format(regex.pattern, text)
         assert_fail(msg=message)
 
-@noseimport(3, 2)
 @contextlib.contextmanager
 def assert_warns_regex(exc_type, regex):
     with warnings.catch_warnings(record=True) as wlog:

Reply via email to