-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add noexcept
to _utils
C-equiv functions
#641
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
|
Failures seen here are unrelated and seen elsewhere xref: #642 (comment) |
Closing and reopening for CI (coverage) |
Fixes a Cython warning when using the opposite ordering.
pre-commit.ci autofix |
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.
LGTM - @jakirkham feel free to self merge if tests pass fine
Thanks David! 🙏 |
The functions in
_utils
are effectively straight C functions. In Cython 0.x, these would have been treated asnoexcept
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 addingnoexcept
to turn off the additional Cython checks emitted in and around them.TODO: