Skip to content
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

pytest collection fails on recentish neurodebians: Argument(s) {'collection_path'} are declared in the hookimpl but can not be found in the hookspec #7555

Open
yarikoptic opened this issue Feb 3, 2024 · 3 comments

Comments

@yarikoptic
Copy link
Member

neurodebian@smaug ~/deb/builds/datalad/0.19.6-1 % grep "Argument(s) {'collection_path'} are declared in the hookimpl but can not be found in the hookspec" *build
datalad_0.19.6-1~nd110+1_amd64.build:E   Argument(s) {'collection_path'} are declared in the hookimpl but can not be found in the hookspec
datalad_0.19.6-1~nd22.04+1_amd64.build:E   Argument(s) {'collection_path'} are declared in the hookimpl but can not be found in the hookspec

so not the most recent, in detail:

I: pybuild base:240: cd /build/datalad-0.19.6/.pybuild/cpython3_3.10_datalad/build; python3.10 -m pytest -s -v -k 'not test_test and not test_subprocess_return_code_capture and not test_gracefull_death' -c /build/datalad-0.19.6/tox.ini
============================= test session starts ==============================
platform linux -- Python 3.10.4, pytest-6.2.5, py-1.10.0, pluggy-0.13.0 -- /usr/bin/python3.10
cachedir: .pytest_cache
rootdir: /build/datalad-0.19.6/.pybuild/cpython3_3.10_datalad/build, configfile: ../../../tox.ini
collecting ... collected 0 items / 1 error

==================================== ERRORS ====================================
________________________ ERROR collecting test session _________________________
/usr/lib/python3/dist-packages/pluggy/manager.py:125: in register
    self._verify_hook(hook, hookimpl)
/usr/lib/python3/dist-packages/pluggy/manager.py:250: in _verify_hook
    raise PluginValidationError(
E   pluggy.manager.PluginValidationError: Plugin '/build/datalad-0.19.6/.pybuild/cpython3_3.10_datalad/build/datalad/conftest.py' for hook 'pytest_ignore_collect'
E   hookimpl definition: pytest_ignore_collect(collection_path: pathlib.Path) -> bool
E   Argument(s) {'collection_path'} are declared in the hookimpl but can not be found in the hookspec
=========================== short test summary info ============================
ERROR  - pluggy.manager.PluginValidationError: Plugin '/build/datalad-0.19.6/...
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 0.16s ===============================

@jwodder -- rings any bells?

@jwodder
Copy link
Member

jwodder commented Feb 3, 2024

@yarikoptic The output states that you're using pytest 6.2.5, which is very old. Upgrade it.

@yarikoptic
Copy link
Member Author

That's the one those systems have ... I will look into backporting but might be tricky... and we did not define the lowest version of pytest for datalad. Is this message suggestive that we need at least 7.x version?

@jwodder
Copy link
Member

jwodder commented Feb 4, 2024

@yarikoptic Yes, pytest 7.0 seems to be the minimum required now, based on the fact that the old calling convention was deprecated in that version.

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

No branches or pull requests

2 participants