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

pkg_resources is deprecated, reccomends porting to importlib.resources #5491

Closed
Tracked by #5466
acchamber opened this issue Sep 12, 2023 · 0 comments · Fixed by #5511
Closed
Tracked by #5466

pkg_resources is deprecated, reccomends porting to importlib.resources #5491

acchamber opened this issue Sep 12, 2023 · 0 comments · Fixed by #5511

Comments

@acchamber
Copy link
Contributor

📰 Custom Issue

When the iris pytests are ran, the following DeprecationWarnings appear

unit/experimental/ugrid/mesh/test_Connectivity.py:17
  /net/home/h05/achamber/git/iris/lib/iris/tests/unit/experimental/ugrid/mesh/test_Connectivity.py:17: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import parse_version

../../../../../../../../../home/h05/achamber/.conda/envs/iris-dev/lib/python3.11/site-packages/pkg_resources/__init__.py:2871
  /home/h05/achamber/.conda/envs/iris-dev/lib/python3.11/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('mpl_toolkits')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

../../../../../../../../../home/h05/achamber/.conda/envs/iris-dev/lib/python3.11/site-packages/pkg_resources/__init__.py:2871
  /home/h05/achamber/.conda/envs/iris-dev/lib/python3.11/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('ruamel')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

../../../../../../../../../home/h05/achamber/.conda/envs/iris-dev/lib/python3.11/site-packages/pkg_resources/__init__.py:2871
../../../../../../../../../home/h05/achamber/.conda/envs/iris-dev/lib/python3.11/site-packages/pkg_resources/__init__.py:2871
../../../../../../../../../home/h05/achamber/.conda/envs/iris-dev/lib/python3.11/site-packages/pkg_resources/__init__.py:2871
../../../../../../../../../home/h05/achamber/.conda/envs/iris-dev/lib/python3.11/site-packages/pkg_resources/__init__.py:2871
../../../../../../../../../home/h05/achamber/.conda/envs/iris-dev/lib/python3.11/site-packages/pkg_resources/__init__.py:2871
  /home/h05/achamber/.conda/envs/iris-dev/lib/python3.11/site-packages/pkg_resources/__init__.py:2871: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('sphinxcontrib')`.
  Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
    declare_namespace(pkg)

Looking at the pkg_resources documentation it reccomends a shift to the inbuilt importlib.resources. I have not investigated fully if this fits Iris's needs or not.

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

Successfully merging a pull request may close this issue.

3 participants