diff --git a/python-nose-py311.patch b/python-nose-py311.patch index 71fdaf3..1fcb6d9 100644 --- a/python-nose-py311.patch +++ b/python-nose-py311.patch @@ -48,3 +48,40 @@ index 2a9f69b..560b9c2 100644 else: # this is a dumb test for 2.4- assert '' in result +diff --git a/nose/plugins/manager.py b/nose/plugins/manager.py +index 4d2ed22..daa9edb 100644 +--- a/nose/plugins/manager.py ++++ b/nose/plugins/manager.py +@@ -105,7 +105,7 @@ class PluginProxy(object): + meth = getattr(plugin, call, None) + if meth is not None: + if call == 'loadTestsFromModule' and \ +- len(inspect.getargspec(meth)[0]) == 2: ++ len(inspect.getfullargspec(meth)[0]) == 2: + orig_meth = meth + meth = lambda module, path, **kwargs: orig_meth(module) + self.plugins.append((plugin, meth)) +diff --git a/nose/util.py b/nose/util.py +index 80ab1d4..21770ae 100644 +--- a/nose/util.py ++++ b/nose/util.py +@@ -449,15 +449,15 @@ def try_run(obj, names): + if type(obj) == types.ModuleType: + # py.test compatibility + if isinstance(func, types.FunctionType): +- args, varargs, varkw, defaults = \ +- inspect.getargspec(func) ++ args, varargs, varkw, defaults, *_ = \ ++ inspect.getfullargspec(func) + else: + # Not a function. If it's callable, call it anyway + if hasattr(func, '__call__') and not inspect.ismethod(func): + func = func.__call__ + try: +- args, varargs, varkw, defaults = \ +- inspect.getargspec(func) ++ args, varargs, varkw, defaults, *_ = \ ++ inspect.getfullargspec(func) + args.pop(0) # pop the self off + except TypeError: + raise TypeError("Attribute %s of %r is not a python " diff --git a/python-nose.spec b/python-nose.spec index 627dd66..090cbd8 100644 --- a/python-nose.spec +++ b/python-nose.spec @@ -33,6 +33,7 @@ Patch6: python-nose-no-use_2to3.patch # Import unittest.TextTestResult instead of removed unittest._TextTestResult # Use ConfigParser.read_file() instead of .readfp() # Adapt test_xunit to tracebacks/exceptions with ^^^^^^^^ lines +# Migrate from removed inspect.getargspec() to inspect.getfullargspec() Patch7: python-nose-py311.patch BuildRequires: dos2unix