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

Fix DeprecationWarning in pytest-xdist 3.0.2 #3357

Closed
JelleZijlstra opened this issue Oct 26, 2022 · 3 comments · Fixed by #3772
Closed

Fix DeprecationWarning in pytest-xdist 3.0.2 #3357

JelleZijlstra opened this issue Oct 26, 2022 · 3 comments · Fixed by #3772
Labels
C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases

Comments

@JelleZijlstra
Copy link
Collaborator

pytest-xdist 3.0.2 was released today and broke our CI with a DeprecationWarning. On a quick look I couldn't figure out how to fix it (we don't use the rsyncdir option explicitly), so I pinned pytest-xdist to <3.0.2 in #3356.

We should figure out how to fix the deprecation properly and unpin the package.

Output:

311 run-test: commands[2] | pytest tests --run-optional no_jupyter --numprocesses auto --cov
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/runner/work/black/black/.tox/311/lib/python3.11/site-packages/_pytest/main.py", line 266, in wrap_session
INTERNALERROR>     config._do_configure()
INTERNALERROR>   File "/home/runner/work/black/black/.tox/311/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1037, in _do_configure
INTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR>   File "/home/runner/work/black/black/.tox/311/lib/python3.11/site-packages/pluggy/_hooks.py", line 277, in call_historic
INTERNALERROR>     res = self._hookexec(self.name, self.get_hookimpls(), kwargs, False)
INTERNALERROR>           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/home/runner/work/black/black/.tox/311/lib/python3.11/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/home/runner/work/black/black/.tox/311/lib/python3.11/site-packages/pluggy/_callers.py", line [60](https://github.com/psf/black/actions/runs/3325521041/jobs/5498291478#step:5:61), in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>            ^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/home/runner/work/black/black/.tox/311/lib/python3.11/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/runner/work/black/black/.tox/311/lib/python3.11/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>           ^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR>   File "/home/runner/work/black/black/.tox/311/lib/python3.11/site-packages/xdist/plugin.py", line 214, in pytest_configure
INTERNALERROR>     config.issue_config_time_warning(warning, 2)
INTERNALERROR>   File "/home/runner/work/black/black/.tox/311/lib/python3.11/site-packages/_pytest/config/__init__.py", line 1394, in issue_config_time_warning
INTERNALERROR>     warnings.warn(warning, stacklevel=stacklevel)
INTERNALERROR> DeprecationWarning: The --rsyncdir command line argument and rsyncdirs config variable are deprecated.
INTERNALERROR> The rsync feature will be removed in pytest-xdist 4.0.
@JelleZijlstra JelleZijlstra added the C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases label Oct 26, 2022
@clavedeluna
Copy link

@JelleZijlstra looks like this is likely a bug on pytest-xdist's side pytest-dev/pytest-xdist#825

@JelleZijlstra
Copy link
Collaborator Author

Thanks for linking that! Seems like pinning for now is the right call, I'll follow along on the pytest-xdist issue to see what the next steps should be for us.

@ssbarnea
Copy link
Contributor

Root cause pytest-dev/pytest-cov#557

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: maintenance Related to project maintenance, e.g. CI, testing, policy changes, releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants