Skip to content
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

ee_extra is using pkg_resources as an API which is deprecated. #53

Open
12rambau opened this issue Mar 14, 2024 · 1 comment
Open

ee_extra is using pkg_resources as an API which is deprecated. #53

12rambau opened this issue Mar 14, 2024 · 1 comment

Comments

@12rambau
Copy link

I get the following error from multiple package CI/CD depending on ee_extra, I don't really know what to add, I'll have a look to your source code, I hope it's an easy fix.

========================================================================================================== warnings summary ===========================================================================================================
.nox/test/lib/python3.9/site-packages/ee_extra/ImageCollection/core.py:8
  /mnt/e/WSL/Users/rambap/azure/LDCGEETools/.nox/test/lib/python3.9/site-packages/ee_extra/ImageCollection/core.py:8: DeprecationWarning:
  
  pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
@12rambau
Copy link
Author

I checked the lib and there is a very small amount of calls to package_resources and it's mostly used to access package files. I never used this interface myself, I always rely on the __file__ variable and it seems it's a very common practice in the Python community: https://discuss.python.org/t/easy-and-recommended-way-to-get-path-of-datafile-within-package/20581/8

Do you have any use case that would make it impossible ? It would simplify the code base and avoid calls to the importlib context manager.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant