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 docsrs
or non-Py_3_13
- PyImport_
AddModule ⚠Ref docsrs
or non-Py_3_13
- PyList_
Clear ⚠docsrs
or non-Py_3_13
- PyList_
Extend ⚠docsrs
or non-Py_3_13
- PyList_
GetItem ⚠Ref docsrs
or non-Py_3_13
- PyObject_
Call ⚠Method NoArgs docsrs
or not (Py_3_9
and neitherPy_LIMITED_API
norPyPy
norGraalPy
) - PyObject_
Call ⚠NoArgs docsrs
or not (non-PyPy
and non-GraalPy
and (Py_3_10
, or non-Py_LIMITED_API
andPy_3_9
)) - PyWeakref_
GetRef ⚠docsrs
or non-Py_3_13
- Py_
NewRef ⚠docsrs
or non-Py_3_10
- Py_
XNew ⚠Ref docsrs
or non-Py_3_10