Skip to content

gh-146636: PEP 803: Reference documentation - #148013

Merged
encukou merged 12 commits into
python:mainfrom
encukou:803-docs
Apr 16, 2026
Merged

gh-146636: PEP 803: Reference documentation#148013
encukou merged 12 commits into
python:mainfrom
encukou:803-docs

Conversation

@encukou

@encukouencukou commented Apr 2, 2026

Copy link
Copy Markdown
Member

Comment threadDoc/whatsnew/3.15.rst Outdated
Comment threadDoc/whatsnew/3.15.rst Outdated

@ZeroIntensityZeroIntensity left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Congrats on the PEP acceptance :)

Mostly editorial comments from me. The content generally looks good.

Comment threadDoc/c-api/module.rst Outdated
Comment threadDoc/c-api/stable.rst Outdated
Comment threadDoc/c-api/stable.rst
Comment on lines +221 to +223
Note that compiling for Stable ABI is *not* a complete guarantee that code will
be compatible with the expected Python versions.
Stable ABI prevents *ABI* issues, like linker errors due to missing

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we need to precede "Stable ABI" with "the"?

Suggested change
Note that compiling for Stable ABI is *not* a complete guarantee that code will
be compatible with the expected Python versions.
Stable ABI prevents *ABI* issues, like linker errors due to missing
Note that compiling for the Stable ABI is *not* a complete guarantee that code will
be compatible with the expected Python versions.
The Stable ABI prevents *ABI* issues, like linker errors due to missing

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Even if there's two of them?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, not too sure about the rules here. What about "the Stable ABIs"?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

The way I wrote it still sounds best to me...

Comment threadDoc/c-api/stable.rst Outdated
Comment threadDoc/whatsnew/3.15.rst Outdated
Comment threadDoc/whatsnew/3.15.rst Outdated
Comment threadDoc/whatsnew/3.15.rst Outdated
Comment threadDoc/whatsnew/3.15.rst Outdated
Comment threadDoc/whatsnew/3.15.rst Outdated
Comment threadDoc/whatsnew/3.15.rst
@StanFromIreland

Copy link
Copy Markdown
Member

The new check caught removals: https://github.com/python/cpython/actions/runs/23907059205/job/69719041532?pr=148013 (and on your PR out of everyone's ;-)

Comment threadDoc/c-api/stable.rst Outdated
Comment threadDoc/c-api/stable.rst Outdated
Comment threadDoc/c-api/stable.rst Outdated
Comment threadDoc/c-api/stable.rst Outdated
Comment threadDoc/c-api/stable.rst Outdated
Comment threadDoc/c-api/stable.rst Outdated
Comment threadDoc/c-api/stable.rst Outdated
Comment threadDoc/whatsnew/3.15.rst Outdated
Comment threadDoc/whatsnew/3.15.rst Outdated
Comment threadDoc/whatsnew/3.15.rst Outdated

@ngoldbaumngoldbaum left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for putting this together! I left a few comments inline, please take them or leave them as you see fit.

Comment threadDoc/c-api/module.rst Outdated
Comment threadDoc/c-api/stable.rst Outdated
When using a build tool (for example, ``setuptools``), the tool is
generally responsible for setting macros and synchronizing them with
extension filenames and other metadata.
Prefer using the tool's options over defining the macros manually.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe setuptools is a poor example to use above then? Because setuptools expects users to set the build flags manually...

You could delete the "(For example, SetupTools)" above, or maybe refer to meson-python or scikit-build-core instead? These days that's what I recommend to people depending on if they already use CMake or not.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

AFAIK Setuptools is the most widely known build tool; the example is there to clarify what kind of “build tool” I'm talking about.

Setuptools has a --py_limited_api argument. All tools will ideally need an update for abi3t.

Comment threadDoc/c-api/stable.rst
Comment threadDoc/c-api/stable.rst Outdated

The goal for the Limited API is to allow everything that is possible with the
- define both :c:macro:`!Py_LIMITED_API` and :c:macro:`!Py_TARGET_ABI3T`, or
- define only :c:macro:`!Py_LIMITED_API` and build for free-threaded Python.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
- define only :c:macro:`!Py_LIMITED_API` and build for free-threaded Python.
- Define only :c:macro:`!Py_LIMITED_API` and define :c:macro:`!Py_GIL_DISABLED`.
This happens automatically with a free-threaded interpreter, except on Windows.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I think defining Py_GIL_DISABLED "manually" is still only supported on Windows.

Comment threadDoc/whatsnew/3.15.rst Outdated
encukouand others added 2 commits April 6, 2026 12:06
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@encukouencukou mentioned this pull request Apr 7, 2026
Comment threadDoc/c-api/stable.rst Outdated
@encukou

Copy link
Copy Markdown
MemberAuthor

I've addressed the comments; does anyone want to re-review?
If not I'll merge around Thursday.

@encukou
encukou merged commit 0fcf2b7 into python:mainApr 16, 2026
39 checks passed
@encukou
encukou deleted the 803-docs branch April 16, 2026 12:17
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Sign up for freeto 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

@encukou@StanFromIreland@hugovk@ngoldbaum@da-woods@ZeroIntensity@AIdjis