-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Re-land PyCapsule #52021
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
Re-land PyCapsule #52021
Conversation
…s-dev#51951)" This reverts commit 8487b2e.
This reverts commit c8ea34c.
This reverts commit 93b5135.
"accident" is a nice word for it. i jumped the gun. my bad. |
I renamed this, to avoid confusion. I've also changed my mind on backporting. |
Are we sure that this isn't breaking anything? |
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 - thanks!
This is the documented way to share C functions across extension modules. See https://docs.python.org/3/extending/extending.html#using-capsules |
That's not what I meant. This is a pretty big pr where it's easy to miss something |
The diff is a bit deceiving. The only real large addition to the code base is the 2 new include files. Everything else is just moving things to a better home (ex: function definitions of out parse_helper.h into pd_parser.c). This actually improves type safety; the parsers.pyx changes before were happy redeclaring functions that are really implemented as returning a double * to functions returning a float64_t *. Guessing Cython relied on letting the linker resolve symbols before, but that returns a compilation warning/error in the current design. |
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.
Blocking until we figure out whether this lands in 2.0 or 2.1.
If going in 2.1, it has to go in late (after no more 2.0.x). PRs in C/Cython land will be very hard to backport, since the headers and stuff are all different.
Hmm why would this make backporting Cython changes any different? |
The only file git doesn't correctly recognize as being moved is parse_helper.h which was last changed in 2020 |
Actually, looking at this again, I guess the only case backports would be affected are if a function was added/changed. IIUC, the new process with the PyCapsule, is to modify the function in the original file, change the declarations in I guess leaving it in only 2.1 could be fine, but wasn't sure if you were planning on refactoring more (in which case I'd expect this backported). In general, I like to keep CI/build stuff as close as possible between the main/release branch. |
The only things that I think would make an issue with a backport are:
I don't think 1. is likely to happen and 2. And 3. aren't really things we should backport |
Generally, if we:
|
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.
Makes sense. Thanks for clarifying.
Since it appears this is a reorganization, I suppose this could go in 2.0, but no strong preference on my end. Would you still prefer this go into 2.1 @lithomas1? |
No strong preference anymore, let's just put in in main for now, and see if it sticks this time. |
Looks like this was accidentally reverted #51952 (comment) #51951 (comment)