pypa / readme_renderer

Safely render long_description/README files in Warehouse
Apache License 2.0
158 stars 88 forks source link

Replace `pkg_resources` usage #279

Closed miketheman closed 1 year ago

miketheman commented 1 year ago

Using pkg_resources.get_distribution with Python 3.11 raises a warning:

DeprecationWarning: pkg_resources is deprecated as an API

Triggering from here: https://github.com/pypa/readme_renderer/blob/8f1fb590afd3d763c069d63b1403bf28e6efcf5a/readme_renderer/__main__.py#L27

Ref: https://setuptools.pypa.io/en/latest/pkg_resources.html

Action: Refactor code to take advantage of importlib.resources. Ensure backwards compat support is added for older Python versions with backport packages.