You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems that pytest 8.1.0 (just released) breaks nbval 0.10.0:
alias test="docker run --rm python:3.11.8 /bin/bash -c"test"pip install nbval pytest && pytest --nbval"# ❌ PluginValidationError: Argument(s) {'path'} are declared in the hookimpl but can not be found in the hookspectest"pip install nbval==0.10.0 pytest==8.1.0 && pytest --nbval"# ❌ same as abovetest"pip install nbval==0.10.0 pytest==8.0.2 && pytest --nbval"# ✅ ok with pytest<8.1
As part of the py.path -> pathlib.Path transition, the py.path hook parameters have been deprecated in the 7.x series, changed to an error in 8.0, and finally removed in 8.1. It seems like the pytest_ignore_collect hook implementation in the pytest_filter_subpackage plugin still uses the deprecated path argument, should use collection_path instead (available since pytest 7.0.0).
If you can require pytest>=7, then can just replace path -> collection_path (and possibly adjust for py.path.local -> Path).
Example error output:
Traceback (most recent call last):
File "/usr/local/bin/pytest", line 8, in <module>
sys.exit(console_main())
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/_pytest/config/__init__.py", line 195, in console_main
code = main()
^^^^^^
File "/usr/local/lib/python3.11/site-packages/_pytest/config/__init__.py", line 153, in main
config = _prepareconfig(args, plugins)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/_pytest/config/__init__.py", line 335, in _prepareconfig
config = pluginmanager.hook.pytest_cmdline_parse(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pluggy/_hooks.py", line 501, in __call__
return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pluggy/_manager.py", line 119, in _hookexec
return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pluggy/_callers.py", line 138, in _multicall
raise exception.with_traceback(exception.__traceback__)
File "/usr/local/lib/python3.11/site-packages/pluggy/_callers.py", line 121, in _multicall
teardown.throw(exception) # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/_pytest/helpconfig.py", line 105, in pytest_cmdline_parse
config = yield
^^^^^
File "/usr/local/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall
res = hook_impl.function(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1141, in pytest_cmdline_parse
self.parse(args)
File "/usr/local/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1490, in parse
self._preparse(args, addopts=addopts)
File "/usr/local/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1377, in _preparse
self.pluginmanager.load_setuptools_entrypoints("pytest11")
File "/usr/local/lib/python3.11/site-packages/pluggy/_manager.py", line 415, in load_setuptools_entrypoints
self.register(plugin, name=ep.name)
File "/usr/local/lib/python3.11/site-packages/_pytest/config/__init__.py", line 497, in register
plugin_name = super().register(plugin, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pluggy/_manager.py", line 167, in register
self._verify_hook(hook, hookimpl)
File "/usr/local/lib/python3.11/site-packages/pluggy/_manager.py", line 342, in _verify_hook
raise PluginValidationError(
pluggy._manager.PluginValidationError: Plugin 'nbval' for hook 'pytest_collect_file'
hookimpl definition: pytest_collect_file(path, parent)
Argument(s) {'path'} are declared in the hookimpl but can not be found in the hookspec
The text was updated successfully, but these errors were encountered:
Seems that pytest 8.1.0 (just released) breaks nbval 0.10.0:
See pytest-dev/pytest#11779 (comment):
Example error output:
The text was updated successfully, but these errors were encountered: