Switch from pkg_resources to importlib for future deprecation#72
Switch from pkg_resources to importlib for future deprecation#72CSchoel merged 1 commit intoCSchoel:v0.6from
Conversation
|
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? |
|
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. 😄 👍 |
|
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. |
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)