Version classes are deprecated in setuputils > 59.5.0
christophert opened this issue · comments
Chris Tran commented
It looks like the version classes used in apispec.utils
were deprecated with setuptools since 59.5.: pypa/setuptools@1701579 from source change: pypa/distutils#75
.tox/py37/lib/python3.7/site-packages/apispec/__init__.py:3: in <module>
from .core import APISpec
.tox/py37/lib/python3.7/site-packages/apispec/core.py:13: in <module>
from .utils import OpenAPIVersion, deepupdate, COMPONENT_SUBSECTIONS, build_reference
.tox/py37/lib/python3.7/site-packages/apispec/utils.py:76: in <module>
class OpenAPIVersion(version.LooseVersion):
.tox/py37/lib/python3.7/site-packages/apispec/utils.py:94: in OpenAPIVersion
MIN_INCLUSIVE_VERSION = version.LooseVersion("2.0")
.tox/py37/lib/python3.7/site-packages/setuptools/_distutils/version.py:57: in __init__
stacklevel=2,
E DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
Can apispec.utils
be migrated to packaging.version with little disruption?
Jérôme Lafréchoux commented
Technically, the fix is a breaking change. We can do it in next major.
No rush because it is currently just a deprecation warning.
It is in the TODO list but no issue was created. Thanks for the heads up.