Skip to content
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

Fix plugins not working with new versions of setuptools #2177

Merged
merged 4 commits into from Aug 15, 2022

Conversation

djhoese
Copy link
Member

@djhoese djhoese commented Aug 15, 2022

See pypa/setuptools#3527 for details. Bottom line is that pkg_resources is kind of deprecated and Satpy was using undocumented function like the .dist.module_path property. This PR updates Satpy to use importlib which has the necessary functionality as of Python 3.8 and is the minimum version of Python that Satpy supports. This also should fix the CI issues in pytroll/satpy-composites-plugin-example#2.

  • Closes #xxxx
  • Tests added
  • Fully documented

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some lost print statements I think...

satpy/composites/config_loader.py Outdated Show resolved Hide resolved
satpy/composites/config_loader.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 15, 2022

Codecov Report

Merging #2177 (1e29ebc) into main (589f087) will decrease coverage by 0.00%.
The diff coverage is 93.33%.

@@            Coverage Diff             @@
##             main    #2177      +/-   ##
==========================================
- Coverage   94.03%   94.03%   -0.01%     
==========================================
  Files         289      289              
  Lines       44541    44564      +23     
==========================================
+ Hits        41884    41904      +20     
- Misses       2657     2660       +3     
Flag Coverage Δ
behaviourtests 4.74% <20.00%> (+0.01%) ⬆️
unittests 94.69% <93.33%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
satpy/_config.py 95.29% <83.33%> (-3.30%) ⬇️
satpy/tests/test_config.py 97.18% <100.00%> (+0.10%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@mraspaud mraspaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Feel free to merge when ci passes.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.004%) to 94.638% when pulling 1e29ebc on djhoese:bugfix-plugins-importlib into 589f087 on pytroll:main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants