{{ message }}
gh-140550: Docs notes for PEP 793 - #151661
Merged
Merged
Conversation
This integrates content from PEP 793's Porting Guide section.
encukou
requested review from
FFY00,
ZeroIntensity,
brettcannon,
ericsnowcurrently,
ncoghlan and
warsaw
as code owners
June 18, 2026 15:06
25 tasks
| 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 |
Member
There was a problem hiding this comment.
There's a :term:`free-threaded build` term for this.
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. |
Member
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
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.
brettcannon
removed their request for review
June 18, 2026 20:09
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
|
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15. |
encukou
added a commit
that referenced
this pull request
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Here are a few more things for the docs of PEP 793:
abi3tmigration guidePyObject_GetTypeData/Py_TYPEwarning