-
Notifications
You must be signed in to change notification settings - Fork 23
[bump minor] Clean-up pkg_resources #1114
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
Conversation
|
Note that we'll need to push an update to Vega at the same time as this is merged to maintain compatibility, because Vega directly calls |
|
I replaced its functionality by switching to importlib in TrueContinuum. For the tests, I used an alternative solution using |
corentinravoux
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes are minor, and it seems like the removed part is an unused blinding strategy.
Since this is passing all tests, I approve the PR.
|
@andreicuceu , if you are happy with the changes we can merge this branch. Are you doing it to coordinate the Vega update? |
|
After sofware telecon: This will be merge along with a new vega public version that will contain similar changes |
We need to stop using pkg_resources, as it's deprecated. This error has been appearing for a while, and it's now critical that we address it.
picca/py/picca/constants.py:10: 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.As far as I can tell, there are 3 places we use it:
I started this pull request to clean up the first instance because this also gets called from Vega. The part of the code that uses this function is very outdated, so I decided to remove that functionality entirely. This relates to an old blinding setup that was used at the level of the correlation function.
@iprafols could you please have a look at the other two instances? I think in the case of the true continuum, we still need the functionality, so we need to find a replacement. I recommend switching to pathlib, and having something like this function from lyatools: https://github.com/andreicuceu/lyatools/blob/main/lyatools/submit_utils.py#L194-L231. Also tagging @p-slash in case he has knows another clean way to replace it.