Skip to content

Removing deprecated API calls #798#803

Merged
apivarunas merged 1 commit into
PmagPy:masterfrom
apivarunas:pkg_resource-fix
Nov 4, 2025
Merged

Removing deprecated API calls #798#803
apivarunas merged 1 commit into
PmagPy:masterfrom
apivarunas:pkg_resource-fix

Conversation

@apivarunas

Copy link
Copy Markdown
Collaborator

This should fix #798, whererein the deprecated API pkg_resources was being used. Since this may be removed by November, and it seemed more difficult to pin to an older version of Setuptools, I rewrote using the most up-to-date API as discussed here: https://importlib-resources.readthedocs.io/en/latest/migration.html. The only slight oddity was that importlib_resources is itself a backport of importlib.resources, but that's something currently handled in the imports that could be fixed later.

I tested this by running the command:
import pmagpy.pmag as pmag
in the python interpreter, which used to raise the error, and the error is no longer raised.

@apivarunas apivarunas merged commit 89b12fc into PmagPy:master Nov 4, 2025
2 checks passed
@apivarunas apivarunas deleted the pkg_resource-fix branch November 4, 2025 17:50
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.

Warning about pkg_resources package removal

1 participant