Skip to content

Remove pkg_resources as a dependency#286

Open
FelipeGdM wants to merge 5 commits intohaosulab:masterfrom
FelipeGdM:remove-pkg-resources
Open

Remove pkg_resources as a dependency#286
FelipeGdM wants to merge 5 commits intohaosulab:masterfrom
FelipeGdM:remove-pkg-resources

Conversation

@FelipeGdM
Copy link

The pkg_resources module from setuptools have been deprecated and removed in python 3.12. It's still possible to use it downgrading setuptools to version 81.0.0, but a long term solution would be to replace it entirely

In this context, the goal of this PR is to replace the use of the pkg_resources along SAPIEN source code

In order to accomplish this gaol, the recommended alternatives are importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata)

The importlib.resources library provides a useful migration guide in order to move away from pkg_resources, so the implementation is pretty straightforward

As SAPIEN aims to support python 3.8, it's also needed to perform a conditional import, as importlib.resources is only available for python 3.9 or newer

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