Skip to content

Replace pkg_resources with importlib.metadata - #269

Open
raineszm wants to merge 1 commit into
canonical:masterfrom
raineszm:fix/remove_pkg_resources
Open

Replace pkg_resources with importlib.metadata#269
raineszm wants to merge 1 commit into
canonical:masterfrom
raineszm:fix/remove_pkg_resources

Conversation

@raineszm

@raineszm raineszm commented Apr 2, 2026

Copy link
Copy Markdown

pkg_resources was removed in setuptools 82 forcing any dependency to pin
setuptools <82 if using pkg_resources. This change replaces the one
function used from pkg_resources with the equivalent from
importlib.metadata so that reactive charms don't have to pin setuptools.

The implementation just writes a thin shim for iter_entry_points, taking into account version differences for importlib.metadata.

pkg_resources was removed in setuptools 82 forcing any dependency to pin
setuptools <82 if using pkg_resources. This change replaces the one
function used from pkg_resources with the equivalent from
importlib.metadata so that reactive charms don't have to pin setuptools.

Signed-off-by: Zachary Raines <zachary.raines@canonical.com>
@raineszm

raineszm commented Apr 8, 2026

Copy link
Copy Markdown
Author

It looks like attempting to test on 3.7 is breaking the CI test suite. Is it acceptable to change the tests to 3.8+ since <3.8 hasn't been supported since bionic?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant