Skip to content

unknown hook 'pytest_namespace' #1670

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
nim65s opened this issue Jan 23, 2019 · 7 comments
Closed

unknown hook 'pytest_namespace' #1670

nim65s opened this issue Jan 23, 2019 · 7 comments

Comments

@nim65s
Copy link
Contributor

nim65s commented Jan 23, 2019

Issue description

running make check on master on ArchLinux raises the following exception:


================================================= test session starts =================================================
platform linux -- Python 3.7.2, pytest-4.1.1, py-1.7.0, pluggy-0.8.1
rootdir: /pybind11/tests, inifile: pytest.ini
collecting 131 items / 13 errors                                                                                      INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/_pytest/main.py", line 203, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/_pytest/main.py", line 242, in _main
INTERNALERROR>     config.hook.pytest_collection(session=session)
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/hooks.py", line 284, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/manager.py", line 68, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/manager.py", line 62, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/_pytest/main.py", line 252, in pytest_collection
INTERNALERROR>     return session.perform_collect()
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/_pytest/main.py", line 466, in perform_collect
INTERNALERROR>     self.config.pluginmanager.check_pending()
INTERNALERROR>   File "/usr/lib/python3.7/site-packages/pluggy/manager.py", line 251, in check_pending
INTERNALERROR>     % (name, hookimpl.plugin),
INTERNALERROR> pluggy.manager.PluginValidationError: unknown hook 'pytest_namespace' in plugin <module 'conftest' from '/pybind11/tests/conftest.py'>

============================================== 14 error in 4.79 seconds ===============================================

Reproducible example code

Here is a Dockerfile to reproduce it:

FROM base/archlinux

RUN pacman -Syu --noconfirm base-devel git cmake python-pytest
RUN git clone https://github.com/pybind/pybind11.git

RUN mkdir /build
WORKDIR /build

RUN cmake /pybind11
RUN make check -j 4
@bstaletic
Copy link
Collaborator

Yes, the latest pytest broke pybind. That's why the builds are broken on master. Unfortunately I have no idea what is going on or how to fix it.

@nim65s
Copy link
Contributor Author

nim65s commented Jan 23, 2019

I see, this comes from pytest-dev/pytest#4421

@Feng137
Copy link

Feng137 commented Nov 13, 2019

Try to install a earlier pytest. I have change the pytest version from 5.2.2 to 4.6.6, and it works.

@VidyaCK
Copy link

VidyaCK commented Feb 26, 2020

@azrael0fog, I installed latest version. But, It couldn't resolve my issue.

@turkus
Copy link

turkus commented Apr 5, 2020

Please take a look at:
https://stackoverflow.com/a/61048783/6734406

@akozyreva
Copy link

Please take a look at:
https://stackoverflow.com/a/61048783/6734406

Is it somewhere documented??

@turkus
Copy link

turkus commented Apr 8, 2020

@akozyreva
Yes, of course, there is a link under the phrase changelog in the answer on stackoverflow.
Sorry for the new issue, miss click.

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

6 participants