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

COMP: Remove pkg_resources import from base.py #4165

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

thewtex
Copy link
Member

@thewtex thewtex commented Aug 20, 2023

To address:

../../../../../../bin/micromamba/envs/itk-wasm/lib/python3.11/site-packages/itk/support/base.py:26
  pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

../../../../../../bin/micromamba/envs/itk-wasm/lib/python3.11/site-packages/pkg_resources/__init__.py:2871
  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

This was brought it by b7b6638 to work around an xarray import issue, but with xarray-2023.8.0, the tests pass.

To address:

```
../../../../../../bin/micromamba/envs/itk-wasm/lib/python3.11/site-packages/itk/support/base.py:26
  pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

../../../../../../bin/micromamba/envs/itk-wasm/lib/python3.11/site-packages/pkg_resources/__init__.py:2871
  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
```

This was brought it by InsightSoftwareConsortium@b7b6638
to work around an xarray import issue, but with xarray-2023.8.0, the
tests pass.
@github-actions github-actions bot added type:Compiler Compiler support or related warnings area:Python wrapping Python bindings for a class labels Aug 20, 2023
Copy link
Member

@jhlegarreta jhlegarreta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pkg_resources is also deprecated in favor of importlib.resources, importlib.metadata. See the warning below:
https://setuptools.pypa.io/en/latest/pkg_resources.html#package-discovery-and-resource-access-using-pkg-resources

Thanks Matt.

@thewtex thewtex merged commit 434eacc into InsightSoftwareConsortium:master Aug 21, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:Python wrapping Python bindings for a class type:Compiler Compiler support or related warnings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants