Skip to content

Switch from pkg_resources to importlib.resources#1096

Merged
xylar merged 3 commits into
MPAS-Dev:developfrom
xylar:fix-pkg-resources
Jun 12, 2025
Merged

Switch from pkg_resources to importlib.resources#1096
xylar merged 3 commits into
MPAS-Dev:developfrom
xylar:fix-pkg-resources

Conversation

@xylar
Copy link
Copy Markdown
Collaborator

@xylar xylar commented Jun 11, 2025

This avoids deprecation warnings like:

/gpfs/fs1/home/ac.xylar/mpas_work/MPAS-Analysis/fix-custom-thermal-forcing/mpas_analysis/shared/html/pages.py:19: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources

This PR also includes a fix to the docstring for ClimatologyMapCustom, which had a glitchy bulletted list that was causing complaints when building the docs.

Checklist

  • Testing comment in the PR documents testing used to verify the changes

@xylar xylar force-pushed the fix-pkg-resources branch from 7e3bcc9 to 49635b4 Compare June 12, 2025 11:34
@xylar
Copy link
Copy Markdown
Collaborator Author

xylar commented Jun 12, 2025

Testing

I ran the test suite with this branch and the bug fixes from MPAS-Dev/MPAS-Tools#641. Everything completed successfully. Output is here:
https://web.lcrc.anl.gov/public/e3sm/diagnostic_output/ac.xasay-davis/analysis_testing/chrysalis/fix-pkg-resources/

@xylar xylar merged commit bc67fe8 into MPAS-Dev:develop Jun 12, 2025
5 checks passed
@xylar xylar deleted the fix-pkg-resources branch June 12, 2025 12:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant