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

DeprecationWarning associated with pkg_resources #903

Closed
Andrew-S-Rosen opened this issue Jan 3, 2024 · 0 comments · Fixed by #905
Closed

DeprecationWarning associated with pkg_resources #903

Andrew-S-Rosen opened this issue Jan 3, 2024 · 0 comments · Fixed by #905

Comments

@Andrew-S-Rosen
Copy link
Member

Andrew-S-Rosen commented Jan 3, 2024

Problem

The following DeprecationWarnings exists on importing maggma.

/home/rosen/software/miniconda/envs/quacc/lib/python3.10/site-packages/maggma/__init__.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import DistributionNotFound, get_distribution

Proposed Solution

Use of pkg_resources is deprecated in favor of importlib.resources, importlib.metadata and their backports (importlib_resources, importlib_metadata). Some useful APIs are also provided by packaging (e.g. requirements and version parsing). Users should refrain from new usage of pkg_resources and should work to port to importlib-based solutions.

Alternatives

No response

@Andrew-S-Rosen Andrew-S-Rosen changed the title DeprecationWarning on pkg_resources DeprecationWarning associated with pkg_resources Jan 3, 2024
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

Successfully merging a pull request may close this issue.

1 participant