Skip to content

Remove use of pkg_resources when not supporting Python 3.7 any more #1234

Closed
@felixdivo

Description

@felixdivo

Currently, a fallback to pkg_resources.iter_entry_points is used in can/interfaces/__init__.py. However, the setuptools docs state:

Use of pkg_resources is discouraged in favor of importlib.resources, importlib.metadata, and their backports (resources, metadata). Please consider using those libraries instead of pkg_resources.

On Python 3.8+, importlib.metadata is part of the standard library, so there should be no need to keep pkg_resources.iter_entry_points around, right?

The PR #1110 is related.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QAabout improving and maintaining the quality of the libraryapiminor

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions