-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
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
BLD: Add Cython Coverage option #54453
Conversation
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.
Thanks so much for doing this! 🙌
Do I just set the environment variable CYTHON_COVERAGE=1
to use it?
You need to specify it as a option. For debug builds and Cython Coverage enabled you can do
|
@@ -325,7 +325,7 @@ cdef double round_trip_wrapper(const char *p, char **q, char decimal, | |||
|
|||
cdef void* buffer_rd_bytes_wrapper(void *source, size_t nbytes, | |||
size_t *bytes_read, int *status, | |||
const char *encoding_errors) noexcept: | |||
const char *encoding_errors) noexcept nogil: |
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.
Needed to mark this as nogil or we would segfault since the tracing code would try to use GIL requiring code (and this function would be called in a nogil block).
I'm pretty sure the C code can acquire the GIL for itself when it needs it so nogil isn't needed?
cc @WillAyd
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.
Yea it looks like the C code does ensure the GIL. I'm a little unclear then though - isn't marking this nogil incorrect since it actually uses the GIL?
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
Closing to clear the queue, but feel free to reopen if you have time to circle back |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.