Repository navigation
Closed
Labels
testsUnit tests and/or continuous integration
Description
We're seeing failures like
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/_pytest/main.py", line 266, in wrap_session
INTERNALERROR> config._do_configure()
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/_pytest/config/__init__.py", line 1037, in _do_configure
INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/pluggy/_hooks.py", line 277, in call_historic
INTERNALERROR> res = self._hookexec(self.name, self.get_hookimpls(), kwargs, False)
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/xdist/plugin.py", line 192, in pytest_configure
INTERNALERROR> from xdist.dsession import DSession
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 168, in exec_module
INTERNALERROR> exec(co, module.__dict__)
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/xdist/dsession.py", line 5, in <module>
INTERNALERROR> from xdist.scheduler import (
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 168, in exec_module
INTERNALERROR> exec(co, module.__dict__)
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/xdist/scheduler/__init__.py", line 1, in <module>
INTERNALERROR> from xdist.scheduler.each import EachScheduling # noqa
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/_pytest/assertion/rewrite.py", line 168, in exec_module
INTERNALERROR> exec(co, module.__dict__)
INTERNALERROR> File "/usr/share/miniconda3/envs/test-environment/lib/python3.10/site-packages/xdist/scheduler/each.py", line 1, in <module>
INTERNALERROR> from py.log import Producer
INTERNALERROR> ModuleNotFoundError: No module named 'py.log'; 'py' is not a packageon main. For an example of this in action see this CI build
Metadata
Metadata
Assignees
Labels
testsUnit tests and/or continuous integration
Activity
jakirkham commentedon Oct 25, 2022
Copying my comment ( #9596 (comment) ) here:
jrbourbeau commentedon Oct 25, 2022
Here's the upstream issue in
pytestpytest-dev/pytest#10422 / pytest-dev/pytest#10420. Looks like this is related topytest-benchmarknot declaring a dependency (xref ionelmc/pytest-benchmark#227) -- though I don't think we havepytest-benchmarkinstalled in our CI environments. Folks upstream inpytestare pointing to thispytest-benchmarkfix ionelmc/pytest-benchmark#227. I'll try pinningpytestin CI to see if that works as a temporary fix.jrbourbeau commentedon Oct 25, 2022
Ah, it looks like various
pytest-*packages are impacted by an upstreampytestchange (xref pytest-dev/pytest#10396). In our case, I think it'spytest-xdist(xref pytest-dev/pytest-xdist#832)jakirkham commentedon Oct 25, 2022
We can just install
pyon our CI while they work through these issues (which probably will take some time)jrbourbeau commentedon Oct 25, 2022
Yeah, I was just coming around to that. Do you think it's worth add
pyupstream in thepytestconda-forge recipe?jakirkham commentedon Oct 25, 2022
We could raise that in a feedstock issue and see what the maintainers say
jrbourbeau commentedon Oct 25, 2022
Closing as fixed (xref #9596 (comment))
The-Compiler commentedon Oct 26, 2022
With my pytest maintainer hat on: Please don't add
pyas hard dependency topytestitself - the whole point of the change in pytest is to get rid of the dependency where it's not actually needed. That various plugins usepywithout directly declaring it as a dependency is unfortunate, but that should be fixed in those plugins (or in their package, if necessary as a workaround), and not by installingpyin all pytest installs.