pytest-sugar
pytest-sugar copied to clipboard
DeprecationWarning for LooseVersion usage
This is mostly just a "heads up", using this with Python 3.10, I'm getting a Deprecation warning that looks like the following:
/Users/juliant/Library/Caches/pypoetry/virtualenvs/ops-template-wDb_TPtP-py3.10/lib/python3.10/site-packages/pytest_sugar.py:168: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.version import LooseVersion
It's pretty noisy in my test output, hope it can be fixed.
The way the issue can be fixed can be found here: https://github.com/marshmallow-code/marshmallow/commit/a63c28edde1e3f1f522aab8a7de231230786ebc1 (there was a similar problem).
I'm looking for a workaround to disable this warning and wondering if anyone has done it?
This appears to only be related to warnings in the user code. I tried it anyways and didn't change output.
Other failed attempts:
-
pytest --verbose --disable-pytest-warnings
-
pytest --verbose --disable-warnings
-
pytest --verbose -W ignore:pytest_sugar:DeprecationWarning
(probably same results as putting inpytest.ini
)
Am I missing something or is this just not possible?
Fixed by #230