Skip to content

Conversation

@iritkatriel
Copy link
Member

No description provided.

Copy link
Contributor

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if you fix the few typos and maybe rephase what I pointed out. Overall, it LGTM.

iritkatriel and others added 2 commits July 28, 2023 18:51
Co-authored-by: Victor Stinner <[email protected]>
Co-authored-by: Domenico Andreoli <[email protected]>
**Extension writers**

These are the traditional users of the C API, and their requirements
are listed above.
Copy link
Contributor

@steve-s steve-s Jul 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to expand on other than functional aspects of the API? Extension users may have different requirements regarding stability and necessity to rebuild from sources for different Python versions and interpreters (backwards: will extension compiled on 3.10 work on 3.8, and forwards: will extension compiled today work on 3.15?).

CPython developers, which is maybe a stakeholder that's worth mentioning here (as long as we have not agreed on completely separating API for "the internal interface between CPython's interpreter" and API for Python extensions), do not need to care about stability that much and do not need to care about rebuilding at all, because internal code is rebuilt for each new version by definition. Another difference is the CPython internal code will never be meant to run on alternative Python wheres extension author may see that as an advantage (if it could run on alternative Pythons, more so if it did not require recompiling).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about it more, I think the CPython developers section is more than desirable because one of the IMO major issues of the current C API is that the compatibility requirements are holding CPython back from changing its internal implementation.

The Let’s get rid of the stable ABI, but keep the limited API threads comes to mind.

Another example: significant part of the current and the past GIL-removal attempts has been to work around scalability issues with reference counting. And they had to deal with that partly also because reference counting is exposed by the C API, otherwise alternative memory management approach could have been a viable solution.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good points. Let me merge this and then you can make another PR.

@iritkatriel iritkatriel merged commit 238aa18 into capi-workgroup:main Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants