-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
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
gh-127253: Note that Stable ABI is about ABI stability #127254
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.
For whatever reason, this is causing Sphinx to spam reference target not found
warnings. Is that related, or a known issue?
Known issue: the page lists all of the limited API, some of which is still undocumented. |
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, with one small comment.
The Stable ABI prevents ABI issues, like linker errors due to missing | ||
symbols or data corruption due to changes in structure layouts or function | ||
signatures. | ||
However, other changes in Python can change the *behavior* of extensions. |
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.
It might be worth adding a small example here (e.g., reference counts, per the motivating issue).
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.
I don't think one example would do. Reference counts are less of a motivating issue and more of the straw that broke the camel's back.
@@ -66,7 +66,7 @@ Limited C API | |||
|
|||
Python 3.2 introduced the *Limited API*, a subset of Python's C API. | |||
Extensions that only use the Limited API can be | |||
compiled once and work with multiple versions of Python. | |||
compiled once and be loaded on multiple versions of Python. |
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.
It would be better to use ABI Compatible
here instead of loaded on
as the latter means that extension module can be loaded which may not be the case if the extension uses any function which now raises error while importing.
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 for the suggestion.
This intro is meant to communicate the intent of the limited API, rather than give the precise description. I'd rather leave the term “ABI Compatible” to the sections below, which should also clear up which “multiple versions” the extension will work with.
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
GH-127557 is a backport of this pull request to the 3.13 branch. |
GH-127558 is a backport of this pull request to the 3.12 branch. |
📚 Documentation preview 📚: https://cpython-previews--127254.org.readthedocs.build/