diff --git a/README.md b/README.md index e02581a..3962a3e 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,10 @@ This version of ``nose`` is compatible with Python 3.6+ (including 3.12 & up). Changes in ``pynose`` from legacy ``nose`` include: * Fixes "AttributeError: module 'collections' has no attribute 'Callable'." -* Fixes all ``flake8`` issues from the original ``nose``. +* Fixes "AttributeError: module 'inspect' has no attribute 'getargspec'." * Fixes "ImportError: cannot import name '_TextTestResult' from 'unittest'." * Fixes "RuntimeWarning: TestResult has no addDuration method." +* Fixes all ``flake8`` issues from the original ``nose``. * Replaces the ``imp`` module with the newer ``importlib`` module. * The default logging level now hides "debug" logs for less noise. * The ``-s`` option is always active to see the output of ``print()``. diff --git a/nose/__version__.py b/nose/__version__.py index cc791bb..359565f 100755 --- a/nose/__version__.py +++ b/nose/__version__.py @@ -1,2 +1,2 @@ # pynose nose package -__version__ = "1.4.4" +__version__ = "1.4.5" diff --git a/nose/plugins/manager.py b/nose/plugins/manager.py index 5ffdc40..674edeb 100644 --- a/nose/plugins/manager.py +++ b/nose/plugins/manager.py @@ -49,6 +49,8 @@ __all__ = ['DefaultPluginManager', 'PluginManager', 'EntryPointPluginManager', 'BuiltinPluginManager', 'RestrictedPluginManager'] log = logging.getLogger(__name__) +if not hasattr(inspect, "getargspec"): + inspect.getargspec = lambda func: inspect.getfullargspec(func)[:4] class PluginProxy(object): diff --git a/nose/util.py b/nose/util.py index a402eb8..b357eb5 100644 --- a/nose/util.py +++ b/nose/util.py @@ -16,6 +16,8 @@ skip_pattern = ( r"(?:\.svn)|(?:[^.]+\.py[co])|(?:.*~)|(?:.*\$py\.class)|(?:__pycache__)" ) +if not hasattr(inspect, "getargspec"): + inspect.getargspec = lambda func: inspect.getfullargspec(func)[:4] try: set() except NameError: @@ -422,8 +424,9 @@ def try_run(obj, names): ): func = func.__call__ try: - args, varargs, varkw, defaults = \ + args, varargs, varkw, defaults = ( inspect.getargspec(func) + ) args.pop(0) # pop the self off except TypeError: raise TypeError("Attribute %s of %r is not a python "