-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
PEP 733: An Evaluation of Python's Public C API #3491
Conversation
great draft! In my opinion it's limiting to not list the CPython core developers as an explicit stakeholder group. CPython is a producer of the API, but it also consumes the API itself, and it has quite specific needs for what the API should look like that are different from everyone else. We should think about and list those specific needs and not leave them out as implicitly understood (I certainly don't completely understand them). |
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.
You can use PEP 732 733 (#3489 can take 732 as it was submitted first).
There is a very large number of authors (Victor also mentioned this on the PEP). I feel this means we should wait for all authors to confirm that they are OK with being listed as authors, since even if they contributed something to the problems repo, they may not necessarily want their name on this PEP.
An alternative could be to have only you (Irit) and maybe a few others as an author, and list everyone else in the Acknowledgments section.
@cfbolz there was some discussion around this here: capi-workgroup/problems#73 |
Thanks for the great write up @iritkatriel! For Stepan and me the Email addresses are Stepan Sindelar [email protected] and myself [email protected].
I would also think that's a good alternative if many others is too uncommon or not considered useful for other reasons. |
I've updated the top post with the checklist, please go through and check off things as they're done. |
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.
Thank you for putting this together!
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Co-authored-by: Hugo van Kemenade <[email protected]>
Any author who has no more comments can go ahead and approve. |
Co-authored-by: Antoine Pitrou <[email protected]>
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.
Looks good to me, with a number of minor suggestions.
Thanks @timfel, I had indeed not seen that. I don't want to rehash that discussion (even if I ultimately don't completely agree), so you can ignore my comment. |
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.
Overall this is in great shape, thanks for writing it up! I left a few comments, though many of them are informational rather than things in need of change here.
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.
Looks good.
A few comments, mostly about reference terminology.
I'll review this weekend. I'm missing a few things from the "Common Actions" section, in particular accessing existing objects and calling methods/functions on them (rather than only creating them and then calling them). I'm also missing a statement to address the concern I raised about the general focus of the C API in terms of consistency, completeness and usefulness (see the discussion in capi-workgroup/problems#71), but more on that in the next two days. |
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.
An items that I don't see captured that were relevant to this PEP were the lack of ability to construct derived classes for PyLong (which internally does hacks in which it constructs a PyLong and then copies it contents). This same hack has to be done to extend when with other language binds (such as JInt).
In general all types that one can extend from within Python should also be extendable within the CAPI with the same ease.
@malemburg sorry for the slow review. My laptop died 3 months ago and was unable to be replaced at work due to supply chain issues until this weekend. And as I am not permitted to bring my cell phone into perform the two factor authentication, I was locked out for participating. |
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.
Thank you for working through all those "problems" issues in the capi-workgroup repo and creating this writeup, @iritkatriel. I guess this will not be only PEP that'll get written on the topic, but it's definitely a good start in the right direction.
I left a few comments on the PEP, which may help improve it some more.
Then why select a illustration for project that did not contribute to the conversations of the PEP over one who did? There is already the perception problem for JPype that PyJNIus is a solution for Java. They currently serve different roles on paper, but they are incompatible thus just make for incompatible modules. I tried unsuccessfully in the past to merge the projects setting up a full demo of JPype that worked on Android that Gabriel Pettier and the KIvy project did not take action on. PyJNIus is a bare bones Java wrapper that can be easily seg fault through user actions vs JPype which is fully integrated with CPython and NumPy and very good stability (though not perfect stability because of defects this PEP is addressing). Hence many topics ( concrete vs abstract strings, stack frame reporting, memory management) in the PEP were problems found in JPype because it is integrated. None of these are relevant to PyJNIus because it just has the minimal required to use Java on Android.
If I had the time and support from the other Java wrappers to unify JPype, JEP, and PyJNIus I would but I was unable to get interest from others. Hence a divided community.
I would have no problem if PyJNIus was listed as the binding for “Android”, but listing it as the binding for “Java” is a bit much as it does minimal exposure and doesn’t integrate anything like Python buffers or IO which are required to use complex Python packages like numpy or matplotlib with Java.
|
Co-authored-by: Jelle Zijlstra <[email protected]>
I'll give this another day or two and if no more comments I'll remove the (few) authors who have not approved and merge. |
Co-authored-by: Stepan Sindelar <[email protected]>
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! I left one comment about stable_abi.toml
being a noteworthy source of machine-readable information about the C API.
Thank you everyone! |
Congrats @iritkatriel for managing to drive the writing of this very important document! |
Any author who has no more comments can go ahead and approve.
I'll make some efforts to chase those who don't approve, but if not successful I may have to remove them as authors.
Approving authors
Basic requirements (all PEP Types)
pep-NNNN.rst
), PR title (PEP 123: <Title of PEP>
) andPEP
headerAuthor
orSponsor
, and formally confirmed their approvalAuthor
,Status
(Draft
),Type
andCreated
headers filled out correctlyPEP-Delegate
,Topic
,Requires
andReplaces
headers completed if appropriate.github/CODEOWNERS
for the PEP📚 Documentation preview 📚: https://pep-previews--3491.org.readthedocs.build/pep-0733/