-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
MNT: Mark all nogil
functions as noexcept
#53379
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
Conversation
@h-vetinari could you run tests over this PR using Cython3.0 b3? Unittests are failing on my computer but I am not 100% convinced that it is caused by changes in this PR. |
Running in conda-forge/pandas-feedstock#162 |
Ah, I should have said: I'm running the changes of this PR on top of 2.0.1. If we need everything that's in main as well, then I'll have to do it differently... |
So, on top of 2.0.1, the only failure on unix is |
What does something being nogil have to do with its error handling? I think this is OK but not sure I follow the reasoning in the OP; want to make sure we don't lose exception handling we actually want |
It has nothing to do with nogil, but with Cython 3 now propagating exceptions by default, and it being beneficial to mark those functions that will not raise as |
Cool makes sense and thanks for the info. This lgtm - assuming we can look at non-nogil functions in a follow up? |
Let me explain it using following function from PR: pandas/pandas/_libs/window/aggregations.pyx Lines 115 to 116 in 8cf4ab4
|
Thanks @matusvalo |
* MNT: Mark all `nogil` functions as `noexcept` * Make linter happy
* MNT: Mark all `nogil` functions as `noexcept` * Make linter happy
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.This PR marks all
nogil
functions asnoexcept
because:pandas/pandas/_libs/tslibs/ccalendar.pyx
Line 158 in 75daea4
void
were missed in MNT: Explicitly set cdef functions as noexcept #53144