Skip to content

test_examples.py:2: DeprecationWarning: pkg_resources is deprecated as an API #50

@sbraz

Description

@sbraz

Hi,
It looks like setuptools will eventually remove pkg_resources so the following will fail:

sys.executable, pkg_resources.resource_filename(

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingminor

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions