Expand description
C API Compatibility Shims
Some CPython C API functions added in recent versions of Python are inherently safer to use than older C API constructs. This module exposes functions available on all Python versions that wrap the old C API on old Python versions and wrap the function directly on newer Python versions.
Functions§
- PyDict_
GetItem ⚠Ref docsrsor non-Py_3_13 - PyImport_
AddModule ⚠Ref docsrsor non-Py_3_13 - PyList_
Clear ⚠docsrsor non-Py_3_13 - PyList_
Extend ⚠docsrsor non-Py_3_13 - PyList_
GetItem ⚠Ref docsrsor non-Py_3_13 - PyObject_
Call ⚠Method NoArgs Py_3_9and neitherPyPynorGraalPy - PyObject_
Call ⚠NoArgs Non- PyPyand non-GraalPyand (Py_3_10, or non-Py_LIMITED_APIandPy_3_9) - PyWeakref_
GetRef ⚠docsrsor non-Py_3_13 - Py_
NewRef ⚠Py_3_10and (non-Py_LIMITED_APIorPyPy) - Py_
XNew ⚠Ref Py_3_10and (non-Py_LIMITED_APIorPyPy)