You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using pytest-cov I didn't expect to see warnings. A warning appears due to usage of rsyncdir which is deprecated.
py.test -n=auto --cov=test
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/usr/local/google/home/partheniou/.pyenv/versions/3.12.0/envs/testpycov/lib/python3.12/site-packages/_pytest/main.py", line 267, in wrap_session
INTERNALERROR> config._do_configure()
INTERNALERROR> File "/usr/local/google/home/partheniou/.pyenv/versions/3.12.0/envs/testpycov/lib/python3.12/site-packages/_pytest/config/__init__.py", line 1053, in _do_configure
INTERNALERROR> self.hook.pytest_configure.call_historic(kwargs=dict(config=self))
INTERNALERROR> File "/usr/local/google/home/partheniou/.pyenv/versions/3.12.0/envs/testpycov/lib/python3.12/site-packages/pluggy/_hooks.py", line 514, in call_historic
INTERNALERROR> res = self._hookexec(self.name, self._hookimpls, kwargs, False)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/usr/local/google/home/partheniou/.pyenv/versions/3.12.0/envs/testpycov/lib/python3.12/site-packages/pluggy/_manager.py", line 115, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/usr/local/google/home/partheniou/.pyenv/versions/3.12.0/envs/testpycov/lib/python3.12/site-packages/pluggy/_callers.py", line 113, in _multicall
INTERNALERROR> raise exception.with_traceback(exception.__traceback__)
INTERNALERROR> File "/usr/local/google/home/partheniou/.pyenv/versions/3.12.0/envs/testpycov/lib/python3.12/site-packages/pluggy/_callers.py", line 77, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> ^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> File "/usr/local/google/home/partheniou/.pyenv/versions/3.12.0/envs/testpycov/lib/python3.12/site-packages/xdist/plugin.py", line 252, in pytest_configure
INTERNALERROR> config.issue_config_time_warning(warning, 2)
INTERNALERROR> File "/usr/local/google/home/partheniou/.pyenv/versions/3.12.0/envs/testpycov/lib/python3.12/site-packages/_pytest/config/__init__.py", line 1465, 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.
Reproducer
Create a pytest.ini file to treat warnings as errors
[pytest]
filterwarnings =
# treat all warnings as errors
error
Make sure you include complete output of tox if you use it (it will show versions of various things).
Config
Include your tox.ini, pytest.ini, .coveragerc, setup.cfg or any relevant configuration.
pytest.ini
[pytest]
filterwarnings =
# treat all warnings as errors
error
.coveragerc
[run]
branch = True
omit =
gapic/cli/*.py
*_pb2.py
[report]
fail_under = 100
show_missing = True
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
# Enable an English version.
Impossible; skip coverage checks.
# Ignore debug-only repr
def __repr__
# Abstract methods by definition are not invoked
@abstractmethod
@abc.abstractmethod
Code
Link to your repository, gist, pastebin or just paste raw code that illustrates the issue.
I tested this in https://github.com/googleapis/python-bigquery-storage but I can produce the issue in other repositories as well.
If you paste raw code make sure you quote it, eg:
deffoobar():
pass
The text was updated successfully, but these errors were encountered:
Summary
This issue is related to #557 which is closed.
The
rsyncdir
argument is deprecated and will be removed in pytest-xdist 4.0. It's currently used in the line below:pytest-cov/src/pytest_cov/engine.py
Line 272 in 2c9f217
See other usage here:
https://github.com/search?q=repo%3Apytest-dev%2Fpytest-cov%20rsyncdir&type=code
Expected vs actual result
When using
pytest-cov
I didn't expect to see warnings. A warning appears due to usage ofrsyncdir
which is deprecated.Reproducer
Create a
pytest.ini
file to treat warnings as errorsVersions
Output of relevant packages
pip list
,python --version
,pytest --version
etc.Make sure you include complete output of
tox
if you use it (it will show versions of various things).Config
Include your
tox.ini
,pytest.ini
,.coveragerc
,setup.cfg
or any relevant configuration.pytest.ini
.coveragerc
Code
Link to your repository, gist, pastebin or just paste raw code that illustrates the issue.
I tested this in https://github.com/googleapis/python-bigquery-storage but I can produce the issue in other repositories as well.
If you paste raw code make sure you quote it, eg:
The text was updated successfully, but these errors were encountered: