mozilla / PyFxA

Python library for interacting with the Firefox Accounts ecosystem
Other
31 stars 20 forks source link

Migrate from `pkg_resources` to `importlib` #97

Closed robhudson closed 2 months ago

robhudson commented 10 months ago

The Python docs say:

Use of `pkg_resources` is deprecated in favor of `importlib.resources`, `importlib.metadata`
and their backports (`importlib_resources`, `importlib_metadata`). Some useful APIs are also
provided by packaging (e.g. requirements and version parsing). Users should refrain from new
usage of `pkg_resources` and should work to port to importlib-based solutions.

This caused a hiccup in our effort to upgrade Basket to Python 3.12. The workaround solution was to install setuptools into our virtualenv so PyFxA could continue to use it but this may not work long-term.

robhudson commented 2 months ago

This should be completed with the move to pyproject.toml.