Skip to content

gh-140550: Docs notes for PEP 793#151661

Merged
encukou merged 5 commits into
python:mainfrom
encukou:pep793-create-migration-note
Jun 24, 2026
Merged

gh-140550: Docs notes for PEP 793#151661
encukou merged 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>
@encukou encukou merged commit 763cc22 into python:main Jun 24, 2026
30 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Jun 24, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@bedevere-app

bedevere-app Bot commented Jun 24, 2026

Copy link
Copy Markdown

GH-152064 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Jun 24, 2026
@encukou encukou deleted the pep793-create-migration-note branch June 24, 2026 12:00
encukou added a commit that referenced this pull request Jun 24, 2026
…-152064)

gh-140550: Docs additions & fixups for PEP 793 (GH-151661)
(cherry picked from commit 763cc22)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
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

docs Documentation in the Doc dir skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants