Skip to content

pkg_resources removed from Setuptools in v82.0.0 #33

@billwallis

Description

@billwallis

Summary

This application relies on pkg_resources (which is installed via setuptools):

import pkg_resources

However, as of Setuptools v82.0.0, pkg_resources has been removed:

pkg_resources has been removed from Setuptools. Most common uses of pkg_resources have been superseded by the importlib.resources and importlib.metadata projects. Projects and environments relying on pkg_resources for namespace packages or other behavior should depend on older versions of setuptools. (#3085)

This means that running this application with a setuptools version of v82.0.0 or greater will raise a ModuleNotFoundError:

ModuleNotFoundError: No module named 'pkg_resources'

Resolution

I think it would be sufficient to just limit the setuptools version in the setup.py config:

- install_requires=['coverage', 'setuptools'],
+ install_requires=['coverage', 'setuptools<82.0.0'],

Alternatively, refactoring to rely on importlib.resources or importlib.metadata might be more future-proof 🤷

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions