Skip to content

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

Description

@bschoenmaeckers

Latest update: 2026-06-30

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: 436

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

  • PyObject_CallFunction
  • PyObject_CallFunctionObjArgs
  • PyObject_CallMethod
  • PyVectorcall_NARGS

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

  • PyAIter_Check
  • PyObject_GetAIter

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 (17)

  • PyEval_EvalCodeEx
  • PyEval_EvalFrame
  • PyEval_EvalFrameEx
  • PyEval_GetFrame
  • PyEval_GetFrameBuiltins
  • PyEval_GetFrameGlobals
  • PyEval_GetFrameLocals
  • PyEval_GetFuncDesc
  • PyEval_GetFuncName
  • PyEval_GetGlobals (deprecated)
  • PyEval_GetLocals (deprecated)
  • PyEval_ReleaseThread
  • Py_AddPendingCall
  • Py_GetRecursionLimit
  • Py_LeaveRecursiveCall
  • Py_MakePendingCalls
  • Py_SetRecursionLimit

Include/codecs.h (19)

  • PyCodec_BackslashReplaceErrors
  • PyCodec_Decode
  • PyCodec_Decoder
  • PyCodec_Encode
  • PyCodec_Encoder
  • PyCodec_IgnoreErrors
  • PyCodec_IncrementalDecoder
  • PyCodec_IncrementalEncoder
  • PyCodec_KnownEncoding
  • PyCodec_LookupError
  • PyCodec_NameReplaceErrors
  • PyCodec_Register
  • PyCodec_RegisterError
  • PyCodec_ReplaceErrors
  • PyCodec_StreamReader
  • PyCodec_StreamWriter
  • PyCodec_StrictErrors
  • PyCodec_Unregister
  • PyCodec_XMLCharRefReplaceErrors

Include/cpython/initconfig.h (1)

  • Py_GetArgcArgv

Include/cpython/marshal.h (2)

  • PyMarshal_ReadObjectFromString
  • PyMarshal_WriteObjectToString

Include/cpython/pystate.h (1)

  • PyThreadState_DeleteCurrent

Include/descrobject.h (7)

  • PyDescr_NewClassMethod
  • PyDescr_NewGetSet
  • PyDescr_NewMember
  • PyDescr_NewMethod
  • PyMember_GetOne (deprecated)
  • PyMember_SetOne (deprecated)
  • PyWrapper_New

Include/dictobject.h (7)

  • PyDict_Clear
  • PyDict_DelItemString
  • PyDict_GetItem
  • PyDict_GetItemString
  • PyDict_GetItemStringRef
  • PyDict_GetItemWithError
  • PyDict_SetItemString

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/floatobject.h (0)

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 (16)

  • PyLongWriter_Create
  • PyLongWriter_Discard
  • PyLongWriter_Finish
  • PyLong_AsLongAndOverflow
  • PyLong_AsLongLongAndOverflow
  • PyLong_AsNativeBytes
  • PyLong_Export
  • PyLong_FreeExport
  • PyLong_FromNativeBytes
  • PyLong_FromUnsignedNativeBytes
  • PyLong_GetInfo
  • PyLong_GetNativeLayout
  • PyOS_strtol
  • PyOS_strtoul

Include/memoryobject.h (4)

  • PyMemoryView_FromBuffer
  • PyMemoryView_FromMemory
  • PyMemoryView_FromObject
  • 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 (25)

  • 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 (14)

  • PyGC_Collect
  • PyGC_Disable
  • PyGC_Enable
  • PyGC_IsEnabled
  • PyObject_Calloc
  • PyObject_Free
  • PyObject_GC_Del
  • PyObject_GC_IsFinalized
  • PyObject_GC_IsTracked
  • PyObject_GC_Track
  • PyObject_Init
  • PyObject_InitVar
  • PyObject_Malloc (deprecated)
  • PyObject_Realloc

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 (62)

  • PyErr_BadArgument
  • PyErr_BadInternalCall
  • PyErr_CheckSignals
  • PyErr_Clear
  • PyErr_ExceptionMatches
  • PyErr_Fetch (deprecated)
  • PyErr_Format
  • PyErr_FormatV
  • PyErr_GetExcInfo
  • PyErr_GetHandledException
  • PyErr_NoMemory
  • PyErr_NormalizeException
  • PyErr_ProgramText
  • PyErr_Restore (deprecated)
  • PyErr_SetExcFromWindowsErr
  • PyErr_SetExcFromWindowsErrWithFilename
  • PyErr_SetExcFromWindowsErrWithFilenameObject
  • PyErr_SetExcFromWindowsErrWithFilenameObjects
  • PyErr_SetExcInfo
  • PyErr_SetFromErrno
  • PyErr_SetFromErrnoWithFilename
  • PyErr_SetFromErrnoWithFilenameObject
  • PyErr_SetFromErrnoWithFilenameObjects
  • PyErr_SetFromWindowsErr
  • PyErr_SetFromWindowsErrWithFilename
  • PyErr_SetHandledException
  • PyErr_SetImportError
  • PyErr_SetImportErrorSubclass
  • PyErr_SetInterrupt
  • PyErr_SetInterruptEx
  • PyErr_SetNone
  • PyErr_SyntaxLocation
  • PyErr_SyntaxLocationEx
  • PyExceptionClass_Name
  • PyException_GetArgs
  • PyException_SetArgs
  • PyOS_snprintf
  • PyOS_vsnprintf
  • PyUnicodeDecodeError_GetEncoding
  • PyUnicodeDecodeError_GetEnd
  • PyUnicodeDecodeError_GetObject
  • PyUnicodeDecodeError_GetReason
  • PyUnicodeDecodeError_GetStart
  • PyUnicodeDecodeError_SetEnd
  • PyUnicodeDecodeError_SetReason
  • PyUnicodeDecodeError_SetStart
  • PyUnicodeEncodeError_GetEncoding
  • PyUnicodeEncodeError_GetEnd
  • PyUnicodeEncodeError_GetObject
  • PyUnicodeEncodeError_GetReason
  • PyUnicodeEncodeError_GetStart
  • PyUnicodeEncodeError_SetEnd
  • PyUnicodeEncodeError_SetReason
  • PyUnicodeEncodeError_SetStart
  • PyUnicodeTranslateError_GetEnd
  • PyUnicodeTranslateError_GetObject
  • PyUnicodeTranslateError_GetReason
  • PyUnicodeTranslateError_GetStart
  • PyUnicodeTranslateError_SetEnd
  • PyUnicodeTranslateError_SetReason
  • PyUnicodeTranslateError_SetStart
  • Py_FatalError

Include/pyframe.h (2)

  • PyFrame_GetCode
  • PyFrame_GetLineNumber

Include/pylifecycle.h (14)

  • PyOS_getsig
  • PyOS_setsig
  • Py_AtExit
  • Py_BytesMain
  • Py_EndInterpreter
  • Py_Exit
  • Py_GetBuildInfo
  • Py_GetCompiler
  • Py_GetCopyright
  • Py_GetPlatform
  • Py_Main
  • Py_NewInterpreter
  • Py_SetProgramName
  • Py_SetPythonHome

Include/pymacro.h (2)

  • Py_PACK_FULL_VERSION
  • Py_PACK_VERSION

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/pystrcmp.h (2)

  • PyOS_mystricmp
  • PyOS_mystrnicmp

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/refcount.h (3)

  • Py_DecRef
  • Py_IncRef
  • Py_XNewRef

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 (72)

  • PyUnicode_Append
  • PyUnicode_AppendAndDel
  • PyUnicode_AsASCIIString
  • PyUnicode_AsCharmapString
  • PyUnicode_AsLatin1String
  • PyUnicode_AsMBCSString
  • PyUnicode_AsRawUnicodeEscapeString
  • PyUnicode_AsUCS4
  • PyUnicode_AsUCS4Copy
  • PyUnicode_AsUTF16String
  • PyUnicode_AsUTF32String
  • PyUnicode_AsUnicodeEscapeString
  • PyUnicode_AsWideChar
  • PyUnicode_AsWideCharString (deprecated)
  • PyUnicode_BuildEncodingMap
  • PyUnicode_Compare
  • PyUnicode_CompareWithASCIIString
  • PyUnicode_Concat
  • PyUnicode_Contains
  • PyUnicode_Count
  • PyUnicode_Decode
  • PyUnicode_DecodeASCII
  • PyUnicode_DecodeCharmap
  • PyUnicode_DecodeCodePageStateful
  • PyUnicode_DecodeLatin1
  • PyUnicode_DecodeLocale
  • PyUnicode_DecodeLocaleAndSize (deprecated)
  • PyUnicode_DecodeMBCS
  • PyUnicode_DecodeMBCSStateful
  • PyUnicode_DecodeRawUnicodeEscape
  • PyUnicode_DecodeUTF16
  • PyUnicode_DecodeUTF16Stateful
  • PyUnicode_DecodeUTF32
  • PyUnicode_DecodeUTF32Stateful
  • PyUnicode_DecodeUTF7
  • PyUnicode_DecodeUTF7Stateful
  • PyUnicode_DecodeUTF8
  • PyUnicode_DecodeUTF8Stateful
  • PyUnicode_DecodeUnicodeEscape
  • PyUnicode_EncodeCodePage
  • PyUnicode_EncodeLocale (deprecated)
  • PyUnicode_Equal
  • PyUnicode_EqualToUTF8
  • PyUnicode_FSConverter
  • PyUnicode_FSDecoder
  • PyUnicode_Find
  • PyUnicode_FindChar (deprecated)
  • PyUnicode_Format
  • PyUnicode_FromFormat
  • PyUnicode_FromFormatV
  • PyUnicode_FromObject
  • PyUnicode_FromOrdinal
  • PyUnicode_FromString
  • PyUnicode_FromWideChar
  • PyUnicode_GetDefaultEncoding
  • PyUnicode_GetLength
  • PyUnicode_InternFromString
  • PyUnicode_IsIdentifier
  • PyUnicode_Join (deprecated)
  • PyUnicode_Partition
  • PyUnicode_RPartition
  • PyUnicode_RSplit
  • PyUnicode_ReadChar
  • PyUnicode_Replace
  • PyUnicode_Resize
  • PyUnicode_RichCompare
  • PyUnicode_Split
  • PyUnicode_Splitlines
  • PyUnicode_Substring
  • PyUnicode_Tailmatch
  • PyUnicode_Translate
  • PyUnicode_WriteChar

Include/warnings.h (2)

  • PyErr_ResourceWarning
  • PyErr_WarnFormat

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions