[GH-ISSUE #223] Replace usage of pkg_resources with importlib_resources #172

Closed
opened 2026-02-27 22:08:26 +03:00 by kerem · 1 comment
Owner

Originally created by @khmikkelsen on GitHub (Aug 22, 2021).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/223

Replace pkg_resources with importlib_resources as ytmusicapi's usage is limited to the scope of importlib_resources's, and pkg_resources have issues related to python 3.9 with LegacyVersion being deprecated and defaulting to this as mentioned in:

While the issue has been known for a while, fixes are not merged yet.
Motivation for this issue: https://github.com/AppDaemon/appdaemon/issues/1336

Originally created by @khmikkelsen on GitHub (Aug 22, 2021). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/223 Replace `pkg_resources` with [importlib_resources](https://github.com/python/importlib_resources) as ytmusicapi's usage is limited to the scope of `importlib_resources`'s, and `pkg_resources` have issues related to python 3.9 with `LegacyVersion `being deprecated and defaulting to this as mentioned in: - <https://github.com/pypa/packaging/issues/368> - <https://github.com/pypa/setuptools/issues/2497> - <https://github.com/pypa/setuptools/issues/2466> - <https://github.com/pypa/setuptools/issues/2497> - <https://github.com/pypa/packaging/pull/407> While the issue has been known for a while, fixes are not merged yet. Motivation for this issue: <https://github.com/AppDaemon/appdaemon/issues/1336>
kerem closed this issue 2026-02-27 22:08:26 +03:00
Author
Owner

@sigma67 commented on GitHub (Aug 26, 2021):

I like your suggestion to use importlib_resources, but it requires an additional dependency for older Python versions which wasn't needed before. I've chosen to go with an alternate approach that will eliminate the need for pkg_resources.

<!-- gh-comment-id:906644864 --> @sigma67 commented on GitHub (Aug 26, 2021): I like your suggestion to use `importlib_resources`, but it requires an additional dependency for older Python versions which wasn't needed before. I've chosen to go with an alternate approach that will eliminate the need for `pkg_resources`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ytmusicapi#172
No description provided.