Uploaded image for project: 'Nuxeo Python Client'
  1. Nuxeo Python Client
  2. NXPY-80

Stick with pytest < 4 to prevent internal error due to the use of deprecated pytest_namespace

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.5
    • Component/s: None

      Description

      Starting with pytest 4.0.0, using pytest_namespace to share global variables is deprecated. Now that we are running pytest 4.1, tests fail on:

      [INFO]      [exec] collecting ... INTERNALERROR> Traceback (most recent call last):
      [INFO]      [exec] INTERNALERROR>   File "nuxeo-python-client-master/.eggs/pytest-4.1.1-py2.7.egg/_pytest/main.py", line 203, in wrap_session
      [INFO]      [exec] INTERNALERROR>     session.exitstatus = doit(config, session) or 0
      [INFO]      [exec] INTERNALERROR>   File "nuxeo-python-client-master/.eggs/pytest-4.1.1-py2.7.egg/_pytest/main.py", line 242, in _main
      [INFO]      [exec] INTERNALERROR>     config.hook.pytest_collection(session=session)
      [INFO]      [exec] INTERNALERROR>   File "nuxeo-python-client-master/.eggs/pluggy-0.8.1-py2.7.egg/pluggy/hooks.py", line 284, in __call__
      [INFO]      [exec] INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
      [INFO]      [exec] INTERNALERROR>   File "nuxeo-python-client-master/.eggs/pluggy-0.8.1-py2.7.egg/pluggy/manager.py", line 68, in _hookexec
      [INFO]      [exec] INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
      [INFO]      [exec] INTERNALERROR>   File "nuxeo-python-client-master/.eggs/pluggy-0.8.1-py2.7.egg/pluggy/manager.py", line 62, in <lambda>
      [INFO]      [exec] INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
      [INFO]      [exec] INTERNALERROR>   File "nuxeo-python-client-master/.eggs/pluggy-0.8.1-py2.7.egg/pluggy/callers.py", line 208, in _multicall
      [INFO]      [exec] INTERNALERROR>     return outcome.get_result()
      [INFO]      [exec] INTERNALERROR>   File "nuxeo-python-client-master/.eggs/pluggy-0.8.1-py2.7.egg/pluggy/callers.py", line 81, in get_result
      [INFO]      [exec] INTERNALERROR>     _reraise(*ex)  # noqa
      [INFO]      [exec] INTERNALERROR>   File "nuxeo-python-client-master/.eggs/pluggy-0.8.1-py2.7.egg/pluggy/callers.py", line 187, in _multicall
      [INFO]      [exec] INTERNALERROR>     res = hook_impl.function(*args)
      [INFO]      [exec] INTERNALERROR>   File "nuxeo-python-client-master/.eggs/pytest-4.1.1-py2.7.egg/_pytest/main.py", line 252, in pytest_collection
      [INFO]      [exec] INTERNALERROR>     return session.perform_collect()
      [INFO]      [exec] INTERNALERROR>   File "nuxeo-python-client-master/.eggs/pytest-4.1.1-py2.7.egg/_pytest/main.py", line 466, in perform_collect
      [INFO]      [exec] INTERNALERROR>     self.config.pluginmanager.check_pending()
      [INFO]      [exec] INTERNALERROR>   File "nuxeo-python-client-master/.eggs/pluggy-0.8.1-py2.7.egg/pluggy/manager.py", line 251, in check_pending
      [INFO]      [exec] INTERNALERROR>     % (name, hookimpl.plugin),
      [INFO]      [exec] INTERNALERROR> PluginValidationError: unknown hook 'pytest_namespace' in plugin <module 'tests.conftest' from 'nuxeo-python-client-master/tests/conftest.py'>
      

      From the commit that removed it:

      DEPRECATED: this hook causes direct monkeypatching on pytest, its use is strongly discouraged.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 15 minutes
                  15m

                    PagerDuty

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.