Skip to content

gh-140550: Docs notes for PEP 793#151661

Open
encukou wants to merge 5 commits into
python:mainfrom
encukou:pep793-create-migration-note
Open

gh-140550: Docs notes for PEP 793#151661
encukou wants to merge 5 commits into
python:mainfrom
encukou:pep793-create-migration-note

Conversation

@encukou

@encukou encukou commented Jun 18, 2026

Copy link
Copy Markdown
Member

Here are a few more things for the docs of PEP 793:

  • Update slot-related advice in the abi3t migration guide
  • Note that inittab doesn't use the PEP 793 API
  • Add caveats for code in the export function
  • Fix class name in the PyObject_GetTypeData/Py_TYPE warning

@encukou encukou added docs Documentation in the Doc dir needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Jun 18, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Jun 18, 2026
@bedevere-app bedevere-app Bot mentioned this pull request Jun 18, 2026
25 tasks
@read-the-docs-community

read-the-docs-community Bot commented Jun 18, 2026

Copy link
Copy Markdown

Comment thread Doc/c-api/extension-modules.rst Outdated
If you need to use any Python C API, it is recommended to call
:c:func:`PyABIInfo_Check` first to raise an exception,
rather than crash, in common cases of ABI mismatch.
Also, note that in :term:`free-threaded <free threading>` builds the export

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.

There's a :term:`free-threaded build` term for this.

Comment thread Doc/c-api/extension-modules.rst Outdated
Comment on lines +110 to +111
function may be called without the :term:`GIL` held even if the extension
specifies that the GIL is required.

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.

Could you clarify what this means? "Calling with the GIL held" sounds like the old terminology for calling without an attached thread state. If export functions just need synchronization, then let's just say that.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's really the GIL here: Py_MOD_GIL_USED (or leaving Py_mod_gil out) only takes effect when Python sees it, after the hook returns.
Agree that it's confusing (and I missed a caveat, too!)
I'll expand this.

Comment thread Doc/howto/abi3t-migration.rst Outdated
@brettcannon brettcannon removed their request for review June 18, 2026 20:09
encukou and others added 2 commits June 19, 2026 09:39
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review docs Documentation in the Doc dir needs backport to 3.15 pre-release feature fixes, bugs and security fixes skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants