-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
drop or relax dependency on pkg_resources? #356
Comments
(by the way, also importlib.metadata is incompatible with pyoxidizer because the latter strips all metadata...) I was looking at I was thinking, maybe we could set the default registry's load_extern=False if attempting to import pkg_resources fails, and thus we make pkg_resources (setuptools) itself an optional requirement? Of couse, making pkg_resources optional would also mean replacing its namespace-package machinery with the equivalent method that uses @willmcgugan would you be willing to let go of pkg_resources hard install requirement and make it optional or soft-required? So, if one wants to load plugin filesystems, one needs setuptools installed. Otherwise if only using core filesystem modules, then no setuptools would be needed. |
I know nothing about any of this, but would #13 (i.e. standalone commands) also affect it? 🤷♂️ |
@lurch no, that's completely unrelated issue. |
Sounds like a good idea. If we can maintain the current feature set with recommended libraries, then I'm for it. I'm traveling at the moment. I'll look in to it in more detail when I'm back. |
setuptools' pkg_resources is considered sort of deprecated nowadays, and it's being replaced by importlib.resources (added to python3.7 stdlib) and importlib.metadata (included in python3.8).
Both of the latter have backports on PyPI for previous pythons:
https://pypi.org/project/importlib_resources/
https://pypi.org/project/importlib-metadata/
As far as I understand, fs needs pkg_resources for two reasons:
For the first, the Python Packaging Authority's packaging guide recommends to use
pkgutil
-style namespace packages which allegedly work on both py2 and py3 (I have never used them though): https://packaging.python.org/guides/packaging-namespace-packages/#pkgutil-style-namespace-packagesFor the second point, I think
importlib.metadata
should support this. Other big projects like pytest have recently switched to using that (see pytest-dev/pluggy#199).My immediate issue is that I cannot package my app (https://github.com/googlefonts/fontmake) with PyObsidizer because the latter does not support pkg_resources:
indygreg/PyOxidizer#134
The text was updated successfully, but these errors were encountered: