RDFLib / pySHACL

A Python validator for SHACL
Apache License 2.0
245 stars 63 forks source link

pySHACL uses deprecated distutils package #146

Closed tcmitchell closed 2 years ago

tcmitchell commented 2 years ago

When pySHACL is used with Python 3.10 a DeprecationWarning is raised in certain environments:

$ PYTHONWARNINGS=default::DeprecationWarning python3 test.py
/private/tmp/venv19/lib/python3.10/site-packages/pyshacl/monkey/__init__.py:3: 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
pyshacl version 0.19.0

Deprecation warnings are muted by default, so this warning is not always seen.

PEP 632 suggests using setuptools instead of distutils. On the Porting from Distutils page the suggestion is to use packaging.version.* instead of distutils.version.*.

ashleysommer commented 2 years ago

@tcmitchell PR #147 was included in today's release v0.19.1 Thanks