-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python: pkg_resources is deprecated #2039
Comments
Thanks for filing! This sounds like a good proposal, though I think we should keep the pkg_resources code for older versions of Python where importlib is not available (if this is relevant). Fpm can then choose to use importlib or pkg_resources depending on what is supported by the local Python. |
Not needed. There is a "shim" for old Python versions ... I've done quite a few 'pkg_resources' migrations already and haven't had any issues so far. I'll see if I can find some time to prepare a PR EDIT: |
how old are we talking? I don’t have any measurement of what versions of Python folks are using with fpm, but the Python docs report that importlib requires Python 3, and I’m not sure how many folks (Python 2 isn’t quite dead?) will be negatively impacted by such a change. this said, it’s been a while since I’ve been active in a Python project and my familiarity is lacking for its tooling and supported versions. |
Correct. Importlib is 100% Python 3 only. Aiming for Python 2 compatibility would be a deal breakerin that case. I personally haven't seen Python 2 code in many years. Even in the large enterprise space, which I left in 2019, I didn't really see that much Python 2 around anymore. That's not to say that there will always be a number of Python 2 project which will simply never be migrated to Python 3. The issues caused by
I think the PyPI telemetry is the only source to go by for making some overall guesses. That dataset basically contains information about what people are downloading with |
Issue
pkg_resources is deprecated
https://setuptools.pypa.io/en/latest/pkg_resources.html
Action
fpm should start migrating away from
pkg_resources
toimportlib.resources
andimportlib.metadata
The text was updated successfully, but these errors were encountered: