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

AttributeError: 'WorkerController' object has no attribute 'slaveinput' #577

Closed
bruceduhamel opened this issue Aug 14, 2020 · 5 comments
Closed

Comments

@bruceduhamel
Copy link

I recently upgraded from pytest-xdist 1.34.0 to 2.0.0 and found that tests always fail with the new version. I pinned the previous version as a workaround.

I've tested on Ubuntu 18.04 and the circle CI docker image for python 3.7.6

If I remove --cov=project_folder (project_folder was redacted), the tests run successfully.

pytest --numprocesses=auto --cov=project_folder test itest

============================= test session starts ==============================
platform linux -- Python 3.7.6, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
rootdir: /root/repo
plugins: xdist-2.0.0, forked-1.3.0, cov-2.10.0
gw0 C / gw1 I / gw2 I / gw3 I / gw4 I / gw5 I / gw6 I / gw7 I / gw8 I / gw9 I / gw10 I / gw11 I / gw12 I / gw13 I / gw14 I / gw15 I / gw16 I / gw17 IINTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/_pytest/main.py", line 238, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/xdist/dsession.py", line 78, in pytest_sessionstart
INTERNALERROR>     nodes = self.nodemanager.setup_nodes(putevent=self.queue.put)
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/xdist/workermanage.py", line 65, in setup_nodes
INTERNALERROR>     return [self.setup_node(spec, putevent) for spec in self.specs]
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/xdist/workermanage.py", line 65, in <listcomp>
INTERNALERROR>     return [self.setup_node(spec, putevent) for spec in self.specs]
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/xdist/workermanage.py", line 73, in setup_node
INTERNALERROR>     node.setup()
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/xdist/workermanage.py", line 260, in setup
INTERNALERROR>     self.config.hook.pytest_configure_node(node=self)
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pytest_cov/plugin.py", line 239, in pytest_configure_node
INTERNALERROR>     self.cov_controller.configure_node(node)
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pytest_cov/engine.py", line 274, in configure_node
INTERNALERROR>     workerinput(node).update({
INTERNALERROR>   File "/root/repo/venv/lib/python3.7/site-packages/pytest_cov/compat.py", line 42, in fn
INTERNALERROR>     return getattr(obj, attr, *args)
INTERNALERROR> AttributeError: 'WorkerController' object has no attribute 'slaveinput'
@graingert
Copy link
Member

hello @bruceduhamel this is an issue in pytest-cov, fixed in the unreleased pytest-dev/pytest-cov#412

@ssbarnea
Copy link
Member

I can confirm the same breakage. I think this should have not being release without assuring it works with pytest-cov. Based on how many are affected it would make sense to remove the release from pip, and avoid ruining this weekend.

A major release should not be made on Friday.

@The-Compiler
Copy link
Member

Closing this as this needs to be fixed from pytest-cov's side (looks like only a new release is needed).

@graingert
Copy link
Member

to remove the release from pip

a yank?

@nicoddemus
Copy link
Member

nicoddemus commented Aug 14, 2020

A major release should not be made on Friday.

To be fair, we really did our homework in #541 by contacting all affected repositories, contributing PRs, etc. And that has been resolved for awhile now.

It would be great if pytest-cov could make a new release to fix this, and avoid further noise by having to yank that version from PyPI.

cc @ionelmc

Nevermind, I see that this is already in the works: pytest-dev/pytest-cov#422, thanks @ionelmc for the quick response here. 👍

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

5 participants