Add noexcept to _utils C-equiv functions#641
Merged
dstansby merged 5 commits intozarr-developers:mainfrom Nov 18, 2024
Merged
Conversation
The functions in `_utils` are effectively straight C functions. In Cython 0.x, these would have been treated as `noexcept` by default. However in Cython 3.x all functions are treated as potentially raising exceptions (including these). While that is a sensible default in general, these functions still won't raise exceptions. So tidy things up by adding `noexcept` to turn off the additional Cython checks emitted in and around them.
a59e045 to
52e74ba
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #641 +/- ##
=======================================
Coverage 99.88% 99.88%
=======================================
Files 62 62
Lines 2723 2723
=======================================
Hits 2720 2720
Misses 3 3 |
Member
Author
|
Failures seen here are unrelated and seen elsewhere xref: #642 (comment) |
Member
Author
|
Closing and reopening for CI (coverage) |
dstansby
approved these changes
Nov 17, 2024
Fixes a Cython warning when using the opposite ordering.
Contributor
|
pre-commit.ci autofix |
dstansby
approved these changes
Nov 18, 2024
Contributor
dstansby
left a comment
There was a problem hiding this comment.
LGTM - @jakirkham feel free to self merge if tests pass fine
Member
Author
|
Thanks David! 🙏 |
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.
The functions in
_utilsare effectively straight C functions. In Cython 0.x, these would have been treated asnoexceptby default. However in Cython 3.x all functions are treated as potentially raising exceptions (including these). While that is a sensible default in general, these functions still won't raise exceptions. So tidy things up by addingnoexceptto turn off the additional Cython checks emitted in and around them.TODO: