Only suppress imports of optional external dependencies#550
Merged
dstansby merged 4 commits intozarr-developers:mainfrom Dec 3, 2024
dstansby:consistent-suppress
Merged
Only suppress imports of optional external dependencies#550dstansby merged 4 commits intozarr-developers:mainfrom dstansby:consistent-suppress
dstansby merged 4 commits intozarr-developers:mainfrom
dstansby:consistent-suppress
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #550 +/- ##
==========================================
- Coverage 99.92% 99.92% -0.01%
==========================================
Files 62 62
Lines 2736 2732 -4
==========================================
- Hits 2734 2730 -4
Misses 2 2
|
Contributor
|
Thanks for this @dstansby! This seems like the right behavior to me. But it's a significant change. I'd want to get @jakirkham's opinion before merging. Perhaps John has some context on the original intended behavior? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This makes the suppression of import errors consistent with which codecs depend on optional external packages. If a codec doesn't depend on any code external to
numcodecs, then import errors shouldn't be suppressed as they are indicating an issue withnumcodecsitself.I looked in
git blameand there doesn't seem to be any commentary/reason given for these suppressions, and they all seem to have been added in the original PRs where each codec was added.This came up over at zarr-developers/zarr-python#2032.