pytest-sugar
pytest-sugar copied to clipboard
0.9.4: `DeprecationWarning` warnings on use `pytest-sugar`
Looks like latest version emits DeprecationWarning warnings
: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
xdist_version = LooseVersion(xdist.__version__)
/usr/lib/python3.8/site-packages/pytest_sugar.py:170: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
It looks like this was fixed by ee02ada.
Just tested whole https://github.com/Teemu/pytest-sugar//pull/230 Here is result:
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-sugar-0.9.4-3.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-sugar-0.9.4-3.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra -p no:twisted -p no:xkill
Test session starts (platform: linux, Python 3.8.13, pytest 7.1.2, pytest-sugar 0.9.4)
rootdir: /home/tkloczko/rpmbuild/BUILD/pytest-sugar-0.9.4
plugins: sugar-0.9.4, forked-1.4.0, xdist-2.5.0, rerunfailures-10.2
collecting ...
test_sugar.py ✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓✓ 100% ██████████
============================================================================= warnings summary =============================================================================
test_sugar.py: 34 warnings
/home/tkloczko/rpmbuild/BUILDROOT/python-pytest-sugar-0.9.4-3.fc35.x86_64/usr/lib/python3.8/site-packages/pytest_sugar.py:250: PytestRemovedIn8Warning: The (startdir: py.path.local) argument is deprecated, please use (start_path: pathlib.Path)
see https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path
lines = self.config.hook.pytest_report_header(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
Results (6.38s):
28 passed
And if you are around 😋 Id it possible to sort out https://github.com/Teemu/pytest-sugar/issues/226 ?
I think this is fixed afaik