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

Remove use of pkg_resources package #3069

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

paulromano
Copy link
Contributor

Description

I noticed that running tests now gives the following warning:

conftest.py:3
  /home/romano/openmc/tests/regression_tests/conftest.py:3: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import parse_version

This PR addresses this by replacing use of the pkg_resources package with importlib.resources and packaging, which are the recommended replacements.

Checklist

  • I have performed a self-review of my own code
  • I have run clang-format (version 15) on any C++ source files (if applicable)
  • I have followed the style guidelines for Python source files (if applicable)
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works (if applicable)

Copy link
Contributor

@pshriwise pshriwise left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks @paulromano.

Placing the link in the PR description here for future reference if needed:
https://setuptools.pypa.io/en/latest/pkg_resources.html

@pshriwise pshriwise enabled auto-merge (squash) July 18, 2024 16:29
@pshriwise pshriwise merged commit 32440ad into openmc-dev:develop Jul 18, 2024
15 checks passed
@paulromano paulromano deleted the remove-pkg-resources branch July 18, 2024 17:26
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 this pull request may close these issues.

None yet

2 participants