nagiosplugin
nagiosplugin copied to clipboard
test_examples.py:2: DeprecationWarning: pkg_resources is deprecated as an API
Hi,
It looks like setuptools will eventually remove pkg_resources so the following will fail:
https://github.com/mpounsett/nagiosplugin/blob/050651a39c3ad986367bf93d817fa62a47c15de2/tests/test_examples.py#L19
Running the test suite results in:
tests/test_examples.py:2
/var/tmp/portage/dev-python/nagiosplugin-1.3.3/work/nagiosplugin-1.3.3/tests/test_examples.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resource
s.html
import pkg_resources
There is documentation here that explains how to migrate to importlib.resources: https://importlib-resources.readthedocs.io/en/latest/migration.html#pkg-resources-resource-filename
Thanks. I'll have a look at that. I need to migrate everything to more modern packaging for 3.12 anyway, I think.