Skip to content

Tests failing due to dependency incompatibility #1638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jaraco opened this issue Jan 17, 2019 · 3 comments · Fixed by #1772
Closed

Tests failing due to dependency incompatibility #1638

jaraco opened this issue Jan 17, 2019 · 3 comments · Fixed by #1772

Comments

@jaraco
Copy link
Member

jaraco commented Jan 17, 2019

Tests are failing with this error:

python runtests: commands[0] | pytest --cov-config=/Users/jaraco/code/main/setuptools/tox.ini --cov-report=
Traceback (most recent call last):
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/pluggy/manager.py", line 268, in load_setuptools_entrypoints
    plugin = ep.load()
  File "/Users/jaraco/code/main/setuptools/pkg_resources/__init__.py", line 2345, in load
    self.require(*args, **kwargs)
  File "/Users/jaraco/code/main/setuptools/pkg_resources/__init__.py", line 2368, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/Users/jaraco/code/main/setuptools/pkg_resources/__init__.py", line 789, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pytest 4.1.1 (/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages), Requirement.parse('pytest<4.0.0'), {'pytest-fixture-config', 'pytest-shutil'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/jaraco/code/main/setuptools/.tox/python/bin/pytest", line 11, in <module>
    sys.exit(main())
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/_pytest/config/__init__.py", line 61, in main
    config = _prepareconfig(args, plugins)
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/_pytest/config/__init__.py", line 196, in _prepareconfig
    pluginmanager=pluginmanager, args=args
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/pluggy/hooks.py", line 284, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/pluggy/manager.py", line 68, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/pluggy/manager.py", line 62, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/pluggy/callers.py", line 203, in _multicall
    gen.send(outcome)
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/_pytest/helpconfig.py", line 93, in pytest_cmdline_parse
    config = outcome.get_result()
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/_pytest/config/__init__.py", line 652, in pytest_cmdline_parse
    self.parse(args)
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/_pytest/config/__init__.py", line 838, in parse
    self._preparse(args, addopts=addopts)
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/_pytest/config/__init__.py", line 784, in _preparse
    self.pluginmanager.load_setuptools_entrypoints("pytest11")
  File "/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages/pluggy/manager.py", line 274, in load_setuptools_entrypoints
    message="Plugin %r could not be loaded: %s!" % (ep.name, e),
pluggy.manager.PluginValidationError: Plugin 'virtualenv' could not be loaded: (pytest 4.1.1 (/Users/jaraco/code/main/setuptools/.tox/python/lib/python3.7/site-packages), Requirement.parse('pytest<4.0.0'), {'pytest-fixture-config', 'pytest-shutil'})!

It seems pytest-virtualenv depends on pytest-shutil and pytest-shutil's latest release is incompatible with the latest release of pytest, but pip doesn't detect that condition so installs incompatible versions.

The underlying condition can be readily replicated thus:

$ pip-run -q pytest pytest-virtualenv -- -V                                                                                                                            
pytest-shutil 1.4.0 has requirement pytest<4.0.0, but you'll have pytest 4.1.1 which is incompatible.
pytest-fixture-config 1.4.0 has requirement pytest<4.0.0, but you'll have pytest 4.1.1 which is incompatible.
pytest-virtualenv 1.4.0 has requirement pytest<4.0.0, but you'll have pytest 4.1.1 which is incompatible.
Python 3.7.2
@jaraco
Copy link
Member Author

jaraco commented Jan 17, 2019

Filed upstream issue as man-group/pytest-plugins#110

jaraco added a commit that referenced this issue Jan 17, 2019
mergify bot added a commit that referenced this issue Jan 17, 2019
@jaraco jaraco closed this as completed Jan 18, 2019
@benoit-pierre benoit-pierre reopened this Jan 28, 2019
@benoit-pierre
Copy link
Member

Re-opening, until the issue is resolved upstream and the temporary pin can be removed.

@benoit-pierre
Copy link
Member

We can remove the pin, has a new version of the offending plugins as finally been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants