gh-140550: Docs notes for PEP 793#151661
Conversation
This integrates content from PEP 793's Porting Guide section.
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 |
There was a problem hiding this comment.
There's a :term:`free-threaded build` term for this.
| function may be called without the :term:`GIL` held even if the extension | ||
| specifies that the GIL is required. |
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.
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>
|
Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.15. |
|
GH-152064 is a backport of this pull request to the 3.15 branch. |
Here are a few more things for the docs of PEP 793:
abi3tmigration guidePyObject_GetTypeData/Py_TYPEwarning