pytest: 3.7.0: Hookspec method signature regression
When upgrading from pytest 3.6.x to 3.7, it seems as though the signature for hookspec has changed:
Traceback (most recent call last):
File "<redacted>/python3.6/site-packages/_pytest/hookspec.py", line 27, in <module>
@hookspec(historic=True, warn_on_impl=PYTEST_NAMESPACE)
TypeError: __call__() got an unexpected keyword argument 'warn_on_impl'
ERROR: InvocationError for command '<redacted>/bin/pytest -x --pdb' (exited with code 1)
Reverting back to 3.6.4 fixes the issue.
Plugins being used:
pytest-mock
pytest-asyncio
pytest_profiling
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 25 (16 by maintainers)
Commits related to this issue
- setup,py,requirements.txt: add pytest pytest requires pluggy >= 0.7, while we always use pluggy 0.6, as specified by requirements.txt. as this version is good enough for tox. but in tox.ini, we do us... — committed to tchaikov/teuthology by tchaikov 6 years ago
- setup,py,requirements.txt: add pytest pytest requires pluggy >= 0.7, while we always use pluggy 0.6, as specified by requirements.txt. as this version is good enough for tox. but in tox.ini, we do us... — committed to tchaikov/teuthology by tchaikov 6 years ago
- Trying to diagnose a failure https://github.com/pytest-dev/pytest/issues/3753#issuecomment-411022974 — committed to nedbat/coveragepy by nedbat 6 years ago
- Attempt a release — committed to jarun/pdd by jarun 6 years ago
- pluggy>0.7 for https://github.com/pytest-dev/pytest/issues/3753 — committed to jedie/django-tools by jedie 6 years ago
- pluggy must be 0.7+ → https://github.com/pytest-dev/pytest/issues/3753 — committed to jhermann/rituals by jhermann 5 years ago
- [#221] Update pluggy version to appease pytest Based off discussion [here](https://github.com/pytest-dev/pytest/issues/3753) — committed to space-concordia-robotics/robotics-prototype by PeterGhimself 5 years ago
The problem seems to be that tox has this requirement:
pluggy<1,>=0.3.0and pip gets confused. I’ve solved it by adding “pluggy>=0.7” to my own requirements file.It might be
pipdependency resolver playing tricks then, because pytest 3.7 does requirepluggy>=0.7:https://github.com/pytest-dev/pytest/blob/253419316ce09b952862811db229a9e9383a332b/setup.py#L72
I suggest to try recreating the environment with
-rto see if the problem goes away.@RonnyPfannschmidt
Kenneth Reitz - Pipenv: The Future of Python Dependency Management - PyCon 2018pipenvpipplusvirtualenvsall in one box;)many thanks
@RonnyPfannschmidt ok, I trust this is what you were looking for 😉
My Hiccup
It’s possible that a system level install is shadowing the newer version ? YES
I am new to Python but not to nix, so decided I would use 3.6.
As all apps are easy to install, I only need ONE copy even thought I do have numerous user accounts.
sudo -H pip3 install --upgrade --force-reinstall pytest-covpytest-cov==2.5.1pytest==3.7.4pluggy==0.7.1Should have been all that I needed, But
pip[3] list |grep pluggyORpip[3] list |grep pytestpluggy==0.6.0lying around from disrto install or deb.pytest==3.6.4pluggy==0.6.0Looked for pytest & pluggy in
/usr/local/lib/python[x.x]/dist-packages/rm -rfto _ files dirs of pluggy & pytestCLEAN
sudo -H pip3 install --upgrade --force-reinstall pytest-covAll Good