#8156·RustPython

C-API tracking: missing Stable ABI functions in crates/capi

Author: bschoenmaeckersCreated Jun 24, 2026Updated Sep 17, 2026

Latest update: 2026-09-17

Goal

Track CPython Stable ABI C-API functions that are still missing from RustPython crates/capi, organized by CPython Include/ header layout (mirroring RustPython’s capi split, including abstract_/*).

Missing Stable ABI Functions by Header

Derived from CPython Misc/stable_abi.toml and compared against exported C-API functions in RustPython crates/capi/src.

This list includes only functions that are still candidates for implementation in RustPython C-API:

  • starts from all [function.*] entries in Misc/stable_abi.toml
  • removes private functions (names starting with _)
  • removes functions already implemented in RustPython crates/capi/src
  • removes functions marked removed in CPython "What's New" C-API notes across Python 3.0 through 3.15
  • marks remaining deprecated or soft-deprecated functions as (deprecated)
  • groups remaining functions by CPython Include/*.h header, using RustPython's existing crates/capi/src file split (including abstract_/*)

Total missing: 270

Include/abstract.h -> crates/capi/src/abstract_.rs (4)

  • PyObject_CallFunction
  • PyObject_CallFunctionObjArgs
  • PyObject_CallMethod
  • PyVectorcall_NARGS

Include/abstract.h -> crates/capi/src/abstract_/number.rs (2)

  • PyNumber_AsSsize_t
  • PyNumber_ToBase

Include/abstract.h -> crates/capi/src/abstract_/sequence.rs (1)

  • PySequence_Fast

Include/audit.h (2)

  • PySys_Audit
  • PySys_AuditTuple

Include/bytearrayobject.h (1)

  • PyByteArray_Concat

Include/bytesobject.h (9)

  • PyBytes_AsStringAndSize
  • PyBytes_Concat
  • PyBytes_ConcatAndDel
  • PyBytes_DecodeEscape
  • PyBytes_FromFormat
  • PyBytes_FromFormatV
  • PyBytes_FromObject
  • PyBytes_FromString
  • PyBytes_Repr

Include/ceval.h (8)

  • PyEval_EvalCodeEx
  • PyEval_GetFuncName
  • PyEval_ReleaseThread
  • Py_AddPendingCall
  • Py_GetRecursionLimit
  • Py_LeaveRecursiveCall
  • Py_MakePendingCalls
  • Py_SetRecursionLimit

Include/descrobject.h (2)

  • PyMember_GetOne (deprecated)
  • PyMember_SetOne (deprecated)

Include/fileobject.h (5)

  • PyFile_FromFd
  • PyFile_GetLine
  • PyFile_WriteObject
  • PyFile_WriteString
  • PyObject_AsFileDescriptor

Include/fileutils.h (2)

  • Py_DecodeLocale (deprecated)
  • Py_EncodeLocale (deprecated)

Include/import.h (17)

  • PyImport_AddModule
  • PyImport_AddModuleObject
  • PyImport_AppendInittab
  • PyImport_ExecCodeModule
  • PyImport_ExecCodeModuleObject
  • PyImport_ExecCodeModuleWithPathnames
  • PyImport_GetImporter
  • PyImport_GetMagicNumber
  • PyImport_GetMagicTag
  • PyImport_GetModule (deprecated)
  • PyImport_GetModuleDict
  • PyImport_ImportFrozenModule
  • PyImport_ImportFrozenModuleObject
  • PyImport_ImportModule (deprecated)
  • PyImport_ImportModuleLevel
  • PyImport_ImportModuleLevelObject
  • PyImport_ReloadModule

Include/intrcheck.h (5)

  • PyOS_AfterFork (deprecated)
  • PyOS_AfterFork_Child (deprecated)
  • PyOS_AfterFork_Parent (deprecated)
  • PyOS_BeforeFork (deprecated)
  • PyOS_InterruptOccurred

Include/iterobject.h (2)

  • PyCallIter_New
  • PySeqIter_New

Include/listobject.h (1)

  • PyList_GetItem

Include/longobject.h (5)

  • PyLong_AsLongAndOverflow
  • PyLong_AsLongLongAndOverflow
  • PyLong_GetInfo
  • PyOS_strtol
  • PyOS_strtoul

Include/memoryobject.h (3)

  • PyMemoryView_FromBuffer
  • PyMemoryView_FromMemory
  • PyMemoryView_GetContiguous

Include/methodobject.h (3)

  • PyCFunction_GetFlags
  • PyCFunction_GetFunction
  • PyCFunction_GetSelf

Include/modsupport.h (21)

  • PyABIInfo_Check
  • PyArg_Parse
  • PyArg_ParseTuple (deprecated)
  • PyArg_ParseTupleAndKeywords
  • PyArg_UnpackTuple
  • PyArg_VaParse
  • PyArg_VaParseTupleAndKeywords
  • PyArg_ValidateKeywordArguments
  • PyModule_Add (deprecated)
  • PyModule_AddFunctions
  • PyModule_AddIntConstant
  • PyModule_AddObject (deprecated)
  • PyModule_AddObjectRef (deprecated)
  • PyModule_AddStringConstant
  • PyModule_AddType
  • PyModule_Create2
  • PyModule_ExecDef (deprecated)
  • PyModule_FromDefAndSpec2 (deprecated)
  • PyModule_SetDocString
  • Py_BuildValue
  • Py_VaBuildValue

Include/moduleobject.h (11)

  • PyModuleDef_Init
  • PyModule_GetDef
  • PyModule_GetDict
  • PyModule_GetFilename
  • PyModule_GetName
  • PyModule_GetState
  • PyModule_GetStateSize
  • PyModule_GetState_DuringGC
  • PyModule_GetToken
  • PyModule_GetToken_DuringGC
  • PyModule_New

Include/object.h (22)

  • PyType_ClearCache
  • PyType_FromMetaclass (deprecated)
  • PyType_FromModuleAndSpec (deprecated)
  • PyType_FromSlots
  • PyType_FromSpec (deprecated)
  • PyType_FromSpecWithBases (deprecated)
  • PyType_GenericAlloc
  • PyType_GenericNew
  • PyType_GetBaseByToken
  • PyType_GetBaseByToken_DuringGC
  • PyType_GetModule
  • PyType_GetModuleByDef
  • PyType_GetModuleByToken
  • PyType_GetModuleByToken_DuringGC
  • PyType_GetModuleState
  • PyType_GetModuleState_DuringGC
  • PyType_GetModule_DuringGC
  • PyType_GetTypeDataSize
  • PyType_Modified
  • PyType_Ready
  • Py_SET_SIZE
  • Py_SIZE

Include/objimpl.h (3)

  • PyObject_GC_Del
  • PyObject_Init
  • PyObject_InitVar

Include/pybuffer.h (11)

  • PyBuffer_FillContiguousStrides
  • PyBuffer_FillInfo
  • PyBuffer_FromContiguous
  • PyBuffer_GetPointer
  • PyBuffer_IsContiguous
  • PyBuffer_Release
  • PyBuffer_SizeFromFormat
  • PyBuffer_ToContiguous
  • PyObject_CheckBuffer
  • PyObject_CopyData
  • PyObject_GetBuffer

Include/pycapsule.h (3)

  • PyCapsule_GetDestructor
  • PyCapsule_SetDestructor
  • PyCapsule_SetName

Include/pyerrors.h (11)

  • PyErr_Format
  • PyErr_FormatV
  • PyErr_NormalizeException
  • PyErr_ProgramText
  • PyErr_SetImportError
  • PyErr_SetImportErrorSubclass
  • PyErr_SyntaxLocation
  • PyErr_SyntaxLocationEx
  • PyExceptionClass_Name
  • PyOS_snprintf
  • PyOS_vsnprintf

Include/pylifecycle.h (10)

  • PyOS_getsig
  • PyOS_setsig
  • Py_AtExit
  • Py_BytesMain
  • Py_EndInterpreter
  • Py_Exit
  • Py_Main
  • Py_NewInterpreter
  • Py_SetProgramName
  • Py_SetPythonHome

Include/pystate.h (27)

  • PyGILState_GetThisThreadState
  • PyInterpreterGuard_Close
  • PyInterpreterGuard_FromCurrent
  • PyInterpreterGuard_FromView
  • PyInterpreterState_Clear
  • PyInterpreterState_Delete
  • PyInterpreterState_GetDict
  • PyInterpreterState_New
  • PyInterpreterView_Close
  • PyInterpreterView_FromCurrent
  • PyInterpreterView_FromMain
  • PyState_AddModule
  • PyState_FindModule
  • PyState_RemoveModule
  • PyThreadState_Clear
  • PyThreadState_Delete
  • PyThreadState_Ensure
  • PyThreadState_EnsureFromView
  • PyThreadState_Get
  • PyThreadState_GetDict
  • PyThreadState_GetFrame
  • PyThreadState_GetID
  • PyThreadState_GetInterpreter
  • PyThreadState_New
  • PyThreadState_Release
  • PyThreadState_SetAsyncExc (deprecated)
  • PyThreadState_Swap

Include/pystrtod.h (2)

  • PyOS_double_to_string
  • PyOS_string_to_double

Include/pythonrun.h (3)

  • PyErr_Display (deprecated)
  • PyErr_Print
  • PyOS_CheckStack

Include/pythread.h (8)

  • PyThread_GetInfo
  • PyThread_tss_alloc
  • PyThread_tss_create
  • PyThread_tss_delete
  • PyThread_tss_free
  • PyThread_tss_get
  • PyThread_tss_is_created
  • PyThread_tss_set

Include/sliceobject.h (2)

  • PySlice_GetIndices
  • PySlice_GetIndicesEx (deprecated)

Include/structseq.h (4)

  • PyStructSequence_GetItem
  • PyStructSequence_New
  • PyStructSequence_NewType
  • PyStructSequence_SetItem

Include/sysmodule.h (13)

  • PySys_FormatStderr
  • PySys_FormatStdout
  • PySys_GetAttr
  • PySys_GetAttrString
  • PySys_GetObject
  • PySys_GetOptionalAttr
  • PySys_GetOptionalAttrString
  • PySys_GetXOptions
  • PySys_SetArgv
  • PySys_SetArgvEx
  • PySys_SetObject
  • PySys_WriteStderr
  • PySys_WriteStdout

Include/traceback.h (1)

  • PyTraceBack_Here

Include/unicodeobject.h (42)

  • PyUnicode_Append
  • PyUnicode_AppendAndDel
  • PyUnicode_AsCharmapString
  • PyUnicode_AsMBCSString
  • PyUnicode_AsUCS4
  • PyUnicode_AsUCS4Copy
  • PyUnicode_AsWideChar
  • PyUnicode_AsWideCharString (deprecated)
  • PyUnicode_BuildEncodingMap
  • PyUnicode_Count
  • PyUnicode_DecodeCharmap
  • PyUnicode_DecodeCodePageStateful
  • PyUnicode_DecodeLocale
  • PyUnicode_DecodeLocaleAndSize (deprecated)
  • PyUnicode_DecodeMBCS
  • PyUnicode_DecodeMBCSStateful
  • PyUnicode_DecodeUTF16
  • PyUnicode_DecodeUTF16Stateful
  • PyUnicode_DecodeUTF32
  • PyUnicode_DecodeUTF32Stateful
  • PyUnicode_DecodeUTF7Stateful
  • PyUnicode_DecodeUTF8Stateful
  • PyUnicode_EncodeCodePage
  • PyUnicode_EncodeLocale (deprecated)
  • PyUnicode_FSConverter
  • PyUnicode_FSDecoder
  • PyUnicode_Find
  • PyUnicode_FindChar (deprecated)
  • PyUnicode_FromFormat
  • PyUnicode_FromFormatV
  • PyUnicode_FromWideChar
  • PyUnicode_Join (deprecated)
  • PyUnicode_RSplit
  • PyUnicode_ReadChar
  • PyUnicode_Replace
  • PyUnicode_Resize
  • PyUnicode_RichCompare
  • PyUnicode_Split
  • PyUnicode_Splitlines
  • PyUnicode_Substring
  • PyUnicode_Tailmatch
  • PyUnicode_WriteChar

Include/warnings.h (2)

  • PyErr_ResourceWarning
  • PyErr_WarnFormat