Skip to content

Apply fix from #446 to replace pkg_resources with importlib #485

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dnerini
Copy link
Member

@dnerini dnerini commented Jul 6, 2025

Close #484

@dnerini dnerini requested a review from ritvje July 6, 2025 07:35
@dnerini dnerini linked an issue Jul 6, 2025 that may be closed by this pull request
Copy link

codecov bot commented Jul 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.57%. Comparing base (8c4e510) to head (1cac989).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #485      +/-   ##
==========================================
- Coverage   84.58%   84.57%   -0.01%     
==========================================
  Files         162      162              
  Lines       13471    13468       -3     
==========================================
- Hits        11394    11391       -3     
  Misses       2077     2077              
Flag Coverage Δ
unit_tests 84.57% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ritvje
Copy link
Contributor

ritvje commented Jul 7, 2025

Thanks for the super quick action! The first warning is now gone, but there is apparently another use of pkg_resources in postprocessing module:

.../pysteps/pysteps/postprocessing/interface.py:88: 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
/home/ritvanen/miniconda3/envs/pysteps_dev/lib/python3.13/importlib/__init__.py:129: 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.
  _bootstrap._exec(spec, module)

If I fix that locally, the warnings go away.

@dnerini dnerini changed the title Re-apply fix from #446 to replace pkg_resources with importlib Apply fix from #446 to replace pkg_resources with importlib Jul 8, 2025
@dnerini
Copy link
Member Author

dnerini commented Jul 8, 2025

thanks for spotting it @ritvje , you mind having a final look before merging?

@ritvje
Copy link
Contributor

ritvje commented Jul 9, 2025

Works now, thanks!

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.

pkg_resources deprecation warning at import
2 participants