Skip to content

Conversation

@adenwuts
Copy link

Use of pkg_resources is deprecated in favour of
importlib.resources and importlib.metadata according to https://setuptools.pypa.io/en/latest/pkg_resources.html. Running Deluge currently triggers warnings that the pkg_resources library is likely to be removed as early as October 2025.

Our plugin system still relies on .egg files, and has relied on pkg_resources to expose plugin metadata and resource files. We can use the pkg_info to pull the metadata from the .egg files and importlib for the rest. This allows for users to continue using legacy plugins while a more modern plugin framework is developed.

This does unfortunately necessitate the inclusion of the pkg_info library, however this seems like a reasonable trade off given that it is (currently) well maintained. There may also be other possible solutions using the importlib.metadata library or reimplementing a minimal version of the pkg_info BDist functionality.

Use of `pkg_resources` is deprecated in favour of
`importlib.resources` and `importlib.metadata` according to
https://setuptools.pypa.io/en/latest/pkg_resources.html.
Running Deluge currently triggers warnings that the `pkg_resources`
library is likely to be removed as early as October 2025.

Our plugin system still relies on `.egg` files, and has relied on
`pkg_resources` to expose plugin metadata and resource files. We
can use the `pkg_info` to pull the metadata from the .egg files
and importlib for the rest. This allows for users to continue using
legacy plugins while a more modern plugin framework is developed.

This does unfortunately necessitate the inclusion of the `pkg_info`
library, however this seems like a reasonable trade off given that
it is (currently) well maintained. There may also be other possible
solutions using the importlib.metadata library or reimplementing a
minimal version of the `pkg_info` `BDist` functionality.
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