scientific-python / pytest-doctestplus

Pytest plugin providing advanced doctest features
Other
94 stars 38 forks source link

doctestplus fails with pytest==8.1.0 #239

Closed hagenw closed 7 months ago

hagenw commented 7 months ago

pytest v8.1.0 was released a few days ago, and with that new version our unit tests fail with:

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/_pytest/main.py", line 280, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1119, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pluggy/_hooks.py", line 523, in call_historic
INTERNALERROR>     res = self._hookexec(self.name, self._hookimpls.copy(), kwargs, False)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pluggy/_manager.py", line 119, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pluggy/_callers.py", line 138, in _multicall
INTERNALERROR>     raise exception.with_traceback(exception.__traceback__)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pluggy/_callers.py", line 102, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pytest_doctestplus/plugin.py", line 510, in pytest_configure
INTERNALERROR>     config.pluginmanager.register(
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/_pytest/config/__init__.py", line 497, in register
INTERNALERROR>     plugin_name = super().register(plugin, name)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pluggy/_manager.py", line 167, in register
INTERNALERROR>     self._verify_hook(hook, hookimpl)
INTERNALERROR>   File "/opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pluggy/_manager.py", line 342, in _verify_hook
INTERNALERROR>     raise PluginValidationError(
INTERNALERROR> pluggy._manager.PluginValidationError: Plugin 'doctestplus' for hook 'pytest_collect_file'
INTERNALERROR> hookimpl definition: pytest_collect_file(path, parent)
INTERNALERROR> Argument(s) {'path'} are declared in the hookimpl but can not be found in the hookspec

see https://github.com/audeering/audbackend/actions/runs/8138487619/job/22239475750?pr=190

effigies commented 7 months ago

It looks like this was fixed in #236, but the fix hasn't been released.

hagenw commented 7 months ago

Oh sorry, I just searched for a related issue, not related pull request ;)

For a user it would be nice to have a release soon then.

pllim commented 7 months ago

I can make a release.

pllim commented 7 months ago

pytest-doctestplus 1.2.0 is released.

But then again pytest 8.1 was also yanked. 🤷