gh-140550: Docs notes for PEP 793#151661
Open
encukou wants to merge 5 commits into
Open
Conversation
This integrates content from PEP 793's Porting Guide section.
25 tasks
Documentation build overview
8 files changed ·
|
| 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.
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
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