distutils.version LooseVersion is deprecated
Carreau opened this issue · 2 comments
Carreau commented
Since setuptools https://setuptools.pypa.io/en/latest/history.html#v59-6-0 it emits a deprecation warning.
darkdetect/darkdetect/__init__.py
Lines 13 to 14 in 6556925
This means that dependees that turn warnings into error will fail (for example in CI).
if V(platform.mac_ver()[0]) < V("10.14"):
../../miniconda3-intel/envs/napari/lib/python3.9/site-packages/setuptools/_distutils/version.py:53: in __init__
warnings.warn(
E DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
This can be worked around with a warning filter , for example:
[tool.pytest.ini_options]
filterwarnings = [
"ignore:.*distutils Version classes are deprecated::darkdetect",
]
It looks like you may not want dependencies, so I'm not if and how you wish to fix it.
albertosottile commented
Thanks for reporting this. I guess the suggested alternative would be to depend on packaging
... I will think about what to do, I might recode some small logic here instead of adding a non-standard-library dependency.
albertosottile commented
Fixed in 0.7.0.