Skip to content

Switch from pkg_resources to importlib for future deprecation#72

Merged
CSchoel merged 1 commit intoCSchoel:v0.6from
LucaCerina:pkg_resources_deprecation
Nov 30, 2025
Merged

Switch from pkg_resources to importlib for future deprecation#72
CSchoel merged 1 commit intoCSchoel:v0.6from
LucaCerina:pkg_resources_deprecation

Conversation

@LucaCerina
Copy link

Hi,
the pkg_resources package is going to be deprecated. I changed the code to reflect the future API that uses importlib instead. This prevents warnings like The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.

importlib.resources is present since Python 3.7, so it should be working fine also with previous Python versions (tests passed on v3.12.11)

@LucaCerina
Copy link
Author

Sorry, I just noticed you have also a dev branch (might be useful to note it in the Readme). Do you want me to switch the PR towards that branch?

@CSchoel
Copy link
Owner

CSchoel commented Aug 31, 2025

Hi Luca! 👋 Thank you for this contribution! This fits perfectly into my plans to modernize the nolds codebase for an eventual version 1.0 release. In fact, the deprecation of pkg_resources is already addressed in #67, which I aim to merge soon™.

I'll close this without merging for now, but in case I can't get at least a pre-release of 1.0 out until the deprecation deadline, I might come back to it to merge it into the v0.6 branch.

I'll also make a note do add a proper CONTRIBUTING.md. Didn't have many PRs yet, so there was no need until now, but I agree that it would be good to have it. 😄 👍

@CSchoel CSchoel closed this Aug 31, 2025
@CSchoel CSchoel reopened this Nov 30, 2025
@CSchoel CSchoel changed the base branch from main to v0.6 November 30, 2025 13:33
@CSchoel
Copy link
Owner

CSchoel commented Nov 30, 2025

Actually did end up revisting this as I didn't get out 1.0 in time and the implementaiton in #79 didn't work. Thanks again @LucaCerina for this PR.

@CSchoel CSchoel merged commit d95c219 into CSchoel:v0.6 Nov 30, 2025
0 of 4 checks passed
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.

2 participants