Skip to content

gh-102304: Enhance Simple ABI doc #105351

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

Merged
merged 2 commits into from
Jun 6, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Doc/c-api/stable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ CPython development and spend extra effort adjusting to changes.
Stable Application Binary Interface
===================================

For simplicity, this document talks about *extensions*, but the Limited API
and Stable ABI work the same way for all uses of the API – for example,
embedding Python.

.. _limited-c-api:

Limited C API
Expand Down Expand Up @@ -96,10 +100,6 @@ The Stable ABI contains symbols exposed in the :ref:`Limited API
<limited-c-api>`, but also other ones – for example, functions necessary to
support older versions of the Limited API.

(For simplicity, this document talks about *extensions*, but the Limited API
and Stable ABI work the same way for all uses of the API – for example,
embedding Python.)

On Windows, extensions that use the Stable ABI should be linked against
``python3.dll`` rather than a version-specific library such as
``python39.dll``.
Expand Down
1 change: 1 addition & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,7 @@ regen-limited-abi: all
# - Lib/test/test_stable_abi_ctypes.py
# - Modules/_testcapi_feature_macros.inc
# - PC/python3dll.c
# https://devguide.python.org/developer-workflow/c-api/#adding-a-new-definition-to-the-limited-api
Copy link
Member

Choose a reason for hiding this comment

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

Could you remove the list of files, which will become outdated in time?

Copy link
Member

Choose a reason for hiding this comment

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

Or: why is this needed? I can keep it up to date if there's a need for it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I like to know which files are generated by make by reading the Makefile. I would prefer to not have to open a web browser. Moreover, the linked URL doesn't list which files are modified.

Copy link
Member

Choose a reason for hiding this comment

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

The commnand to list them is ./python Tools/build/stable_abi.py --list . (and with #105355 the dot will be unnecessary.)
Is that enough? If not I can add a check to make sure Makefile is up to date.

Copy link
Member Author

Choose a reason for hiding this comment

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

You seem to worry more than me that such comment can be outdated. I can survive without this comment, so I just removed it. I would like to backport my C API doc change to 3.12 to unblock PR #105352 fix.

$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/build/stable_abi.py --generate-all $(srcdir)/Misc/stable_abi.toml

############################################################################
Expand Down