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.

@trexfeathers trexfeathers self-assigned this Sep 21, 2023
@trexfeathers trexfeathers moved this from In Progress to Todo in ⚠ Improving Iris' Warnings Handling Sep 22, 2023
@trexfeathers trexfeathers moved this from Todo to In Review in ⚠ Improving Iris' Warnings Handling Sep 22, 2023
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Sep 26, 2023
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Oct 11, 2023
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Oct 18, 2023
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Oct 24, 2023
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Oct 25, 2023
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Oct 26, 2023
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Oct 27, 2023
@scitools-ci scitools-ci bot removed this from 🚴 Peloton Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants