diff --git a/Doc/c-api/threads.rst b/Doc/c-api/threads.rst index 70192207ecd1bbe..5640f36e925fdd4 100644 --- a/Doc/c-api/threads.rst +++ b/Doc/c-api/threads.rst @@ -608,6 +608,10 @@ C extensions. See also :c:func:`PyThreadState_GetUnchecked`. +.. c:function:: PyThreadState* PyThreadState_GET() + + Alias to :c:func:`PyThreadState_Get`. + .. c:function:: PyThreadState* PyThreadState_GetUnchecked() Similar to :c:func:`PyThreadState_Get`, but don't kill the process with a diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat index 82447cc98cd8d03..e488445b3dbcdf3 100644 --- a/Doc/data/stable_abi.dat +++ b/Doc/data/stable_abi.dat @@ -18,6 +18,10 @@ macro,PyABIInfo_GIL,3.15,, macro,PyABIInfo_STABLE,3.15,, macro,PyABIInfo_VAR,3.15,, func,PyAIter_Check,3.10,, +macro,PyAPI_DATA,3.2,, +macro,PyAPI_FUNC,3.2,, +macro,PyAnySet_Check,3.2,, +macro,PyAnySet_CheckExact,3.2,, func,PyArg_Parse,3.2,, func,PyArg_ParseTuple,3.2,, func,PyArg_ParseTupleAndKeywords,3.2,, @@ -46,6 +50,7 @@ macro,PyBUF_STRIDES,3.11,, macro,PyBUF_WRITABLE,3.11,, macro,PyBUF_WRITE,3.11,, data,PyBaseObject_Type,3.2,, +macro,PyBool_Check,3.2,, func,PyBool_FromLong,3.2,, data,PyBool_Type,3.2,, func,PyBuffer_FillContiguousStrides,3.11,, @@ -58,6 +63,8 @@ func,PyBuffer_SizeFromFormat,3.11,, func,PyBuffer_ToContiguous,3.11,, data,PyByteArrayIter_Type,3.2,, func,PyByteArray_AsString,3.2,, +macro,PyByteArray_Check,3.2,, +macro,PyByteArray_CheckExact,3.2,, func,PyByteArray_Concat,3.2,, func,PyByteArray_FromObject,3.2,, func,PyByteArray_FromStringAndSize,3.2,, @@ -67,6 +74,8 @@ data,PyByteArray_Type,3.2,, data,PyBytesIter_Type,3.2,, func,PyBytes_AsString,3.2,, func,PyBytes_AsStringAndSize,3.2,, +macro,PyBytes_Check,3.2,, +macro,PyBytes_CheckExact,3.2,, func,PyBytes_Concat,3.2,, func,PyBytes_ConcatAndDel,3.2,, func,PyBytes_DecodeEscape,3.2,, @@ -82,6 +91,8 @@ type,PyCFunction,3.2,, type,PyCFunctionFast,3.13,, type,PyCFunctionFastWithKeywords,3.13,, type,PyCFunctionWithKeywords,3.2,, +macro,PyCFunction_Check,3.2,, +macro,PyCFunction_CheckExact,3.9,, func,PyCFunction_GetFlags,3.2,, func,PyCFunction_GetFunction,3.2,, func,PyCFunction_GetSelf,3.2,, @@ -89,9 +100,11 @@ func,PyCFunction_New,3.4,, func,PyCFunction_NewEx,3.2,, data,PyCFunction_Type,3.2,, func,PyCMethod_New,3.9,, +macro,PyCallIter_Check,3.2,, func,PyCallIter_New,3.2,, data,PyCallIter_Type,3.2,, func,PyCallable_Check,3.2,, +macro,PyCapsule_CheckExact,3.2,, type,PyCapsule_Destructor,3.2,, func,PyCapsule_GetContext,3.2,, func,PyCapsule_GetDestructor,3.2,, @@ -125,6 +138,8 @@ func,PyCodec_StreamWriter,3.2,, func,PyCodec_StrictErrors,3.2,, func,PyCodec_Unregister,3.10,, func,PyCodec_XMLCharRefReplaceErrors,3.2,, +macro,PyComplex_Check,3.2,, +macro,PyComplex_CheckExact,3.2,, func,PyComplex_FromDoubles,3.2,, func,PyComplex_ImagAsDouble,3.2,, func,PyComplex_RealAsDouble,3.2,, @@ -135,21 +150,28 @@ func,PyCriticalSection2_Begin,3.15,, func,PyCriticalSection2_End,3.15,, func,PyCriticalSection_Begin,3.15,, func,PyCriticalSection_End,3.15,, +macro,PyCursesWindow_Check,3.2,, func,PyDescr_NewClassMethod,3.2,, func,PyDescr_NewGetSet,3.2,, func,PyDescr_NewMember,3.2,, func,PyDescr_NewMethod,3.2,, +macro,PyDictItems_Check,3.2,, data,PyDictItems_Type,3.2,, data,PyDictIterItem_Type,3.2,, data,PyDictIterKey_Type,3.2,, data,PyDictIterValue_Type,3.2,, +macro,PyDictKeys_Check,3.2,, data,PyDictKeys_Type,3.2,, func,PyDictProxy_New,3.2,, data,PyDictProxy_Type,3.2,, data,PyDictRevIterItem_Type,3.8,, data,PyDictRevIterKey_Type,3.8,, data,PyDictRevIterValue_Type,3.8,, +macro,PyDictValues_Check,3.2,, data,PyDictValues_Type,3.2,, +macro,PyDictViewSet_Check,3.2,, +macro,PyDict_Check,3.2,, +macro,PyDict_CheckExact,3.2,, func,PyDict_Clear,3.2,, func,PyDict_Contains,3.2,, func,PyDict_Copy,3.2,, @@ -173,6 +195,9 @@ func,PyDict_Size,3.2,, data,PyDict_Type,3.2,, func,PyDict_Update,3.2,, func,PyDict_Values,3.2,, +macro,PyDoc_STR,3.2,, +macro,PyDoc_STRVAR,3.2,, +macro,PyDoc_VAR,3.2,, data,PyEllipsis_Type,3.2,, data,PyEnum_Type,3.2,, func,PyErr_BadArgument,3.2,, @@ -311,7 +336,10 @@ data,PyExc_ValueError,3.2,, data,PyExc_Warning,3.2,, data,PyExc_WindowsError,3.7,on Windows, data,PyExc_ZeroDivisionError,3.2,, +macro,PyExceptionClass_Check,3.2,, func,PyExceptionClass_Name,3.8,, +macro,PyExceptionInstance_Check,3.2,, +macro,PyExceptionInstance_Class,3.2,, func,PyException_GetArgs,3.12,, func,PyException_GetCause,3.2,, func,PyException_GetContext,3.2,, @@ -326,6 +354,8 @@ func,PyFile_WriteObject,3.2,, func,PyFile_WriteString,3.2,, data,PyFilter_Type,3.2,, func,PyFloat_AsDouble,3.2,, +macro,PyFloat_Check,3.2,, +macro,PyFloat_CheckExact,3.2,, func,PyFloat_FromDouble,3.2,, func,PyFloat_FromString,3.2,, func,PyFloat_GetInfo,3.2,, @@ -335,6 +365,8 @@ data,PyFloat_Type,3.2,, type,PyFrameObject,3.2,,opaque func,PyFrame_GetCode,3.10,, func,PyFrame_GetLineNumber,3.10,, +macro,PyFrozenSet_Check,3.2,, +macro,PyFrozenSet_CheckExact,3.2,, func,PyFrozenSet_New,3.2,, data,PyFrozenSet_Type,3.2,, func,PyGC_Collect,3.2,, @@ -364,6 +396,7 @@ func,PyImport_Import,3.2,, func,PyImport_ImportFrozenModule,3.2,, func,PyImport_ImportFrozenModuleObject,3.7,, func,PyImport_ImportModule,3.2,, +macro,PyImport_ImportModuleEx,3.2,, func,PyImport_ImportModuleLevel,3.2,, func,PyImport_ImportModuleLevelObject,3.7,, func,PyImport_ReloadModule,3.2,, @@ -391,6 +424,8 @@ data,PyListIter_Type,3.2,, data,PyListRevIter_Type,3.2,, func,PyList_Append,3.2,, func,PyList_AsTuple,3.2,, +macro,PyList_Check,3.2,, +macro,PyList_CheckExact,3.2,, func,PyList_GetItem,3.2,, func,PyList_GetItemRef,3.13,, func,PyList_GetSlice,3.2,, @@ -410,6 +445,7 @@ type,PyLongWriter,3.15,,opaque func,PyLongWriter_Create,3.15,, func,PyLongWriter_Discard,3.15,, func,PyLongWriter_Finish,3.15,, +macro,PyLong_AS_LONG,3.2,, func,PyLong_AsDouble,3.2,, func,PyLong_AsInt,3.13,, func,PyLong_AsInt32,3.14,, @@ -428,6 +464,8 @@ func,PyLong_AsUnsignedLongLong,3.2,, func,PyLong_AsUnsignedLongLongMask,3.2,, func,PyLong_AsUnsignedLongMask,3.2,, func,PyLong_AsVoidPtr,3.2,, +macro,PyLong_Check,3.2,, +macro,PyLong_CheckExact,3.2,, func,PyLong_Export,3.15,, func,PyLong_FreeExport,3.15,, func,PyLong_FromDouble,3.2,, @@ -451,6 +489,8 @@ data,PyLong_Type,3.2,, macro,PyMODEXPORT_FUNC,3.15,, data,PyMap_Type,3.2,, func,PyMapping_Check,3.2,, +macro,PyMapping_DelItem,3.2,, +macro,PyMapping_DelItemString,3.2,, func,PyMapping_GetItemString,3.2,, func,PyMapping_GetOptionalItem,3.13,, func,PyMapping_GetOptionalItemString,3.13,, @@ -465,17 +505,27 @@ func,PyMapping_SetItemString,3.2,, func,PyMapping_Size,3.2,, func,PyMapping_Values,3.2,, func,PyMem_Calloc,3.7,, +macro,PyMem_DEL,3.2,, +macro,PyMem_Del,3.2,, +macro,PyMem_FREE,3.2,, func,PyMem_Free,3.2,, +macro,PyMem_MALLOC,3.2,, func,PyMem_Malloc,3.2,, +macro,PyMem_NEW,3.2,, +macro,PyMem_New,3.2,, +macro,PyMem_REALLOC,3.2,, +macro,PyMem_RESIZE,3.2,, func,PyMem_RawCalloc,3.13,, func,PyMem_RawFree,3.13,, func,PyMem_RawMalloc,3.13,, func,PyMem_RawRealloc,3.13,, func,PyMem_Realloc,3.2,, +macro,PyMem_Resize,3.2,, type,PyMemberDef,3.2,,full-abi data,PyMemberDescr_Type,3.2,, func,PyMember_GetOne,3.2,, func,PyMember_SetOne,3.2,, +macro,PyMemoryView_Check,3.2,, func,PyMemoryView_FromBuffer,3.11,, func,PyMemoryView_FromMemory,3.7,, func,PyMemoryView_FromObject,3.2,, @@ -491,13 +541,19 @@ data,PyModuleDef_Type,3.5,, func,PyModule_Add,3.13,, func,PyModule_AddFunctions,3.7,, func,PyModule_AddIntConstant,3.2,, +macro,PyModule_AddIntMacro,3.2,, func,PyModule_AddObject,3.2,, func,PyModule_AddObjectRef,3.10,, func,PyModule_AddStringConstant,3.2,, +macro,PyModule_AddStringMacro,3.2,, func,PyModule_AddType,3.10,, +macro,PyModule_Check,3.2,, +macro,PyModule_CheckExact,3.2,, +macro,PyModule_Create,3.2,, func,PyModule_Create2,3.2,, func,PyModule_Exec,3.15,, func,PyModule_ExecDef,3.7,, +macro,PyModule_FromDefAndSpec,3.5,, func,PyModule_FromDefAndSpec2,3.7,, func,PyModule_FromSlotsAndSpec,3.15,, func,PyModule_GetDef,3.2,, @@ -599,6 +655,9 @@ func,PyObject_Free,3.2,, func,PyObject_GC_Del,3.2,, func,PyObject_GC_IsFinalized,3.9,, func,PyObject_GC_IsTracked,3.9,, +macro,PyObject_GC_New,3.2,, +macro,PyObject_GC_NewVar,3.2,, +macro,PyObject_GC_Resize,3.2,, func,PyObject_GC_Track,3.2,, func,PyObject_GC_UnTrack,3.2,, func,PyObject_GenericGetAttr,3.2,, @@ -615,12 +674,15 @@ func,PyObject_GetOptionalAttr,3.13,, func,PyObject_GetOptionalAttrString,3.13,, func,PyObject_GetTypeData,3.12,, func,PyObject_GetTypeData_DuringGC,3.15,, +macro,PyObject_HEAD_INIT,3.2,, func,PyObject_HasAttr,3.2,, func,PyObject_HasAttrString,3.2,, func,PyObject_HasAttrStringWithError,3.13,, func,PyObject_HasAttrWithError,3.13,, func,PyObject_Hash,3.2,, func,PyObject_HashNotImplemented,3.2,, +macro,PyObject_INIT,3.2,, +macro,PyObject_INIT_VAR,3.2,, func,PyObject_Init,3.2,, func,PyObject_InitVar,3.2,, func,PyObject_IsInstance,3.2,, @@ -628,6 +690,10 @@ func,PyObject_IsSubclass,3.2,, func,PyObject_IsTrue,3.2,, func,PyObject_Length,3.2,, func,PyObject_Malloc,3.2,, +macro,PyObject_NEW,3.2,, +macro,PyObject_NEW_VAR,3.2,, +macro,PyObject_New,3.2,, +macro,PyObject_NewVar,3.2,, func,PyObject_Not,3.2,, func,PyObject_Realloc,3.2,, func,PyObject_Repr,3.2,, @@ -640,12 +706,15 @@ func,PyObject_SetItem,3.2,, func,PyObject_Size,3.2,, func,PyObject_Str,3.2,, func,PyObject_Type,3.2,, +macro,PyObject_TypeCheck,3.2,, func,PyObject_Vectorcall,3.12,, func,PyObject_VectorcallMethod,3.12,, data,PyProperty_Type,3.2,, data,PyRangeIter_Type,3.2,, +macro,PyRange_Check,3.2,, data,PyRange_Type,3.2,, data,PyReversed_Type,3.2,, +macro,PySeqIter_Check,3.2,, func,PySeqIter_New,3.2,, data,PySeqIter_Type,3.2,, func,PySequence_Check,3.2,, @@ -670,6 +739,8 @@ func,PySequence_Size,3.2,, func,PySequence_Tuple,3.2,, data,PySetIter_Type,3.2,, func,PySet_Add,3.2,, +macro,PySet_Check,3.2,, +macro,PySet_CheckExact,3.10,, func,PySet_Clear,3.2,, func,PySet_Contains,3.2,, func,PySet_Discard,3.2,, @@ -678,6 +749,7 @@ func,PySet_Pop,3.2,, func,PySet_Size,3.2,, data,PySet_Type,3.2,, func,PySlice_AdjustIndices,3.7,, +macro,PySlice_Check,3.2,, func,PySlice_GetIndices,3.2,, func,PySlice_GetIndicesEx,3.2,, func,PySlice_New,3.2,, @@ -726,6 +798,7 @@ func,PyThreadState_Clear,3.2,, func,PyThreadState_Delete,3.2,, func,PyThreadState_Ensure,3.15,, func,PyThreadState_EnsureFromView,3.15,, +macro,PyThreadState_GET,3.2,, func,PyThreadState_Get,3.2,, func,PyThreadState_GetDict,3.2,, func,PyThreadState_GetFrame,3.10,, @@ -761,10 +834,13 @@ func,PyThread_tss_free,3.7,, func,PyThread_tss_get,3.7,, func,PyThread_tss_is_created,3.7,, func,PyThread_tss_set,3.7,, +macro,PyTraceBack_Check,3.2,, func,PyTraceBack_Here,3.2,, func,PyTraceBack_Print,3.2,, data,PyTraceBack_Type,3.2,, data,PyTupleIter_Type,3.2,, +macro,PyTuple_Check,3.2,, +macro,PyTuple_CheckExact,3.2,, func,PyTuple_GetItem,3.2,, func,PyTuple_GetSlice,3.2,, func,PyTuple_New,3.2,, @@ -773,7 +849,10 @@ func,PyTuple_SetItem,3.2,, func,PyTuple_Size,3.2,, data,PyTuple_Type,3.2,, type,PyTypeObject,3.2,,opaque +macro,PyType_Check,3.2,, +macro,PyType_CheckExact,3.2,, func,PyType_ClearCache,3.2,, +macro,PyType_FastSubclass,3.2,, func,PyType_Freeze,3.14,, func,PyType_FromMetaclass,3.12,, func,PyType_FromModuleAndSpec,3.10,, @@ -798,6 +877,7 @@ func,PyType_GetName,3.11,, func,PyType_GetQualName,3.11,, func,PyType_GetSlot,3.4,, func,PyType_GetTypeDataSize,3.12,, +macro,PyType_IS_GC,3.2,, func,PyType_IsSubtype,3.2,, func,PyType_Modified,3.2,, func,PyType_Ready,3.2,, @@ -847,6 +927,8 @@ func,PyUnicode_AsUnicodeEscapeString,3.2,, func,PyUnicode_AsWideChar,3.2,, func,PyUnicode_AsWideCharString,3.7,, func,PyUnicode_BuildEncodingMap,3.2,, +macro,PyUnicode_Check,3.2,, +macro,PyUnicode_CheckExact,3.2,, func,PyUnicode_Compare,3.2,, func,PyUnicode_CompareWithASCIIString,3.2,, func,PyUnicode_Concat,3.2,, @@ -915,15 +997,24 @@ func,PyUnicode_WriteChar,3.7,, type,PyVarObject,3.2,,members member,PyVarObject.ob_base,3.2,, member,PyVarObject.ob_size,3.2,, +macro,PyVarObject_HEAD_INIT,3.2,, func,PyVectorcall_Call,3.12,, func,PyVectorcall_NARGS,3.12,, type,PyWeakReference,3.2,,opaque +macro,PyWeakref_Check,3.2,, +macro,PyWeakref_CheckProxy,3.2,, +macro,PyWeakref_CheckRef,3.2,, +macro,PyWeakref_CheckRefExact,3.2,, func,PyWeakref_GetRef,3.13,, func,PyWeakref_NewProxy,3.2,, func,PyWeakref_NewRef,3.2,, data,PyWrapperDescr_Type,3.2,, func,PyWrapper_New,3.2,, data,PyZip_Type,3.2,, +macro,Py_ABS,3.2,, +macro,Py_ALIGNED,3.2,, +macro,Py_ARITHMETIC_RIGHT_SHIFT,3.2,, +macro,Py_ARRAY_LENGTH,3.3,, macro,Py_ASNATIVEBYTES_ALLOW_INDEX,3.14,, macro,Py_ASNATIVEBYTES_BIG_ENDIAN,3.14,, macro,Py_ASNATIVEBYTES_DEFAULTS,3.14,, @@ -938,9 +1029,15 @@ macro,Py_BEGIN_ALLOW_THREADS,3.2,, macro,Py_BEGIN_CRITICAL_SECTION,3.15,, macro,Py_BEGIN_CRITICAL_SECTION2,3.15,, macro,Py_BLOCK_THREADS,3.2,, +macro,Py_BUILD_ASSERT,3.3,, +macro,Py_BUILD_ASSERT_EXPR,3.3,, func,Py_BuildValue,3.2,, func,Py_BytesMain,3.8,, +macro,Py_CHARMASK,3.2,, +macro,Py_CLEAR,3.2,, func,Py_CompileString,3.2,, +macro,Py_DECREF,3.2,, +macro,Py_DEPRECATED,3.2,, func,Py_DecRef,3.2,, func,Py_DecodeLocale,3.7,, macro,Py_END_ALLOW_THREADS,3.2,, @@ -950,9 +1047,11 @@ func,Py_EncodeLocale,3.7,, func,Py_EndInterpreter,3.2,, func,Py_EnterRecursiveCall,3.9,, func,Py_Exit,3.2,, +macro,Py_FORCE_EXPANSION,3.2,, func,Py_FatalError,3.2,, func,Py_Finalize,3.2,, func,Py_FinalizeEx,3.6,, +macro,Py_GCC_ATTRIBUTE,3.2,, func,Py_GenericAlias,3.9,, data,Py_GenericAliasType,3.9,, func,Py_GetBuildInfo,3.2,, @@ -964,6 +1063,10 @@ func,Py_GetPlatform,3.2,, func,Py_GetRecursionLimit,3.2,, func,Py_GetVersion,3.2,, func,Py_HashBuffer,3.16,, +macro,Py_INCREF,3.2,, +macro,Py_IS_FINITE,3.2,, +macro,Py_IS_INFINITY,3.2,, +macro,Py_IS_NAN,3.2,, func,Py_IS_TYPE,3.15,, func,Py_IncRef,3.2,, func,Py_Initialize,3.2,, @@ -974,7 +1077,13 @@ func,Py_IsFinalizing,3.13,, func,Py_IsInitialized,3.2,, func,Py_IsNone,3.10,, func,Py_IsTrue,3.10,, +macro,Py_LL,3.2,, +macro,Py_LOCAL,3.2,, +macro,Py_LOCAL_INLINE,3.2,, func,Py_LeaveRecursiveCall,3.9,, +macro,Py_MAX,3.3,, +macro,Py_MEMBER_SIZE,3.6,, +macro,Py_MIN,3.3,, func,Py_Main,3.2,, func,Py_MakePendingCalls,3.2,, func,Py_NewInterpreter,3.2,, @@ -984,10 +1093,16 @@ func,Py_PACK_VERSION,3.14,, macro,Py_READONLY,3.12,, func,Py_REFCNT,3.14,, macro,Py_RELATIVE_OFFSET,3.12,, +macro,Py_RETURN_INF,3.2,, +macro,Py_RETURN_RICHCOMPARE,3.7,, func,Py_ReprEnter,3.2,, func,Py_ReprLeave,3.2,, +macro,Py_SAFE_DOWNCAST,3.2,, +macro,Py_SET_REFCNT,3.9,, func,Py_SET_SIZE,3.15,, +macro,Py_SET_TYPE,3.9,, func,Py_SIZE,3.15,, +macro,Py_STRINGIFY,3.5,, func,Py_SetRecursionLimit,3.2,, macro,Py_TPFLAGS_BASETYPE,3.2,, macro,Py_TPFLAGS_DEFAULT,3.2,, @@ -1016,9 +1131,15 @@ macro,Py_T_ULONG,3.12,, macro,Py_T_ULONGLONG,3.12,, macro,Py_T_USHORT,3.12,, type,Py_UCS4,3.2,, +macro,Py_ULL,3.2,, macro,Py_UNBLOCK_THREADS,3.2,, +macro,Py_UNREACHABLE,3.7,, +macro,Py_UNUSED,3.4,, +macro,Py_VISIT,3.2,, func,Py_VaBuildValue,3.2,, data,Py_Version,3.11,, +macro,Py_XDECREF,3.2,, +macro,Py_XINCREF,3.2,, func,Py_XNewRef,3.10,, macro,Py_am_aiter,3.5,, macro,Py_am_anext,3.5,, diff --git a/Doc/tools/extensions/c_annotations.py b/Doc/tools/extensions/c_annotations.py index 0e762042979c2b7..d8e3829022d6392 100644 --- a/Doc/tools/extensions/c_annotations.py +++ b/Doc/tools/extensions/c_annotations.py @@ -177,10 +177,17 @@ def add_annotations(app: Sphinx, doctree: nodes.document) -> None: # Stable ABI annotation. if record := stable_abi_data.get(name): - if ROLE_TO_OBJECT_TYPE[record.role] != objtype: + record_object_type = ROLE_TO_OBJECT_TYPE[record.role] + if ( + record_object_type != objtype + # Some macros are documented as functions + and not ( + record_object_type == 'macro' and objtype == 'function' + ) + ): msg = ( f"Object type mismatch in limited API annotation for {name}: " - f"{ROLE_TO_OBJECT_TYPE[record.role]!r} != {objtype!r}" + f"{record_object_type!r} != {objtype!r}" ) raise ValueError(msg) annotation = _stable_abi_annotation(record) diff --git a/Misc/NEWS.d/next/C_API/2026-10-06-00-31-36.gh-issue-158886.OILfLN.rst b/Misc/NEWS.d/next/C_API/2026-10-06-00-31-36.gh-issue-158886.OILfLN.rst new file mode 100644 index 000000000000000..06b158b1bac68c1 --- /dev/null +++ b/Misc/NEWS.d/next/C_API/2026-10-06-00-31-36.gh-issue-158886.OILfLN.rst @@ -0,0 +1,2 @@ +Add all old macros of the limited C API to ``Misc/stable_abi.toml``. Patch +by Victor Stinner. diff --git a/Misc/stable_abi.toml b/Misc/stable_abi.toml index 0425fba42cbe2c7..4732ac9837cd5c7 100644 --- a/Misc/stable_abi.toml +++ b/Misc/stable_abi.toml @@ -1872,6 +1872,221 @@ [function.PyThread_start_new_thread] added = '3.2' +# Python 3.2 macros + +[macro.PyAPI_DATA] + added = '3.2' +[macro.PyAPI_FUNC] + added = '3.2' +[macro.PyAnySet_Check] + added = '3.2' +[macro.PyAnySet_CheckExact] + added = '3.2' +[macro.PyBool_Check] + added = '3.2' +[macro.PyByteArray_Check] + added = '3.2' +[macro.PyByteArray_CheckExact] + added = '3.2' +[macro.PyBytes_Check] + added = '3.2' +[macro.PyBytes_CheckExact] + added = '3.2' +[macro.PyCFunction_Check] + added = '3.2' +[macro.PyCallIter_Check] + added = '3.2' +[macro.PyCapsule_CheckExact] + added = '3.2' +[macro.PyComplex_Check] + added = '3.2' +[macro.PyComplex_CheckExact] + added = '3.2' +[macro.PyCursesWindow_Check] + added = '3.2' +[macro.PyDictItems_Check] + added = '3.2' +[macro.PyDictKeys_Check] + added = '3.2' +[macro.PyDictValues_Check] + added = '3.2' +[macro.PyDictViewSet_Check] + added = '3.2' +[macro.PyDict_Check] + added = '3.2' +[macro.PyDict_CheckExact] + added = '3.2' +[macro.PyDoc_STR] + added = '3.2' +[macro.PyDoc_STRVAR] + added = '3.2' +[macro.PyDoc_VAR] + added = '3.2' +[macro.PyExceptionClass_Check] + added = '3.2' +[macro.PyExceptionInstance_Check] + added = '3.2' +[macro.PyExceptionInstance_Class] + added = '3.2' +[macro.PyFloat_Check] + added = '3.2' +[macro.PyFloat_CheckExact] + added = '3.2' +[macro.PyFrozenSet_Check] + added = '3.2' +[macro.PyFrozenSet_CheckExact] + added = '3.2' +[macro.PyImport_ImportModuleEx] + added = '3.2' +[macro.PyList_Check] + added = '3.2' +[macro.PyList_CheckExact] + added = '3.2' +[macro.PyLong_AS_LONG] + added = '3.2' +[macro.PyLong_Check] + added = '3.2' +[macro.PyLong_CheckExact] + added = '3.2' +[macro.PyMapping_DelItem] + added = '3.2' +[macro.PyMapping_DelItemString] + added = '3.2' +[macro.PyMem_DEL] + added = '3.2' +[macro.PyMem_Del] + added = '3.2' +[macro.PyMem_FREE] + added = '3.2' +[macro.PyMem_MALLOC] + added = '3.2' +[macro.PyMem_NEW] + added = '3.2' +[macro.PyMem_New] + added = '3.2' +[macro.PyMem_REALLOC] + added = '3.2' +[macro.PyMem_RESIZE] + added = '3.2' +[macro.PyMem_Resize] + added = '3.2' +[macro.PyMemoryView_Check] + added = '3.2' +[macro.PyModule_AddIntMacro] + added = '3.2' +[macro.PyModule_AddStringMacro] + added = '3.2' +[macro.PyModule_Check] + added = '3.2' +[macro.PyModule_CheckExact] + added = '3.2' +[macro.PyModule_Create] + added = '3.2' +[macro.PyObject_GC_New] + added = '3.2' +[macro.PyObject_GC_NewVar] + added = '3.2' +[macro.PyObject_GC_Resize] + added = '3.2' +[macro.PyObject_HEAD_INIT] + added = '3.2' +[macro.PyObject_INIT] + added = '3.2' +[macro.PyObject_INIT_VAR] + added = '3.2' +[macro.PyObject_NEW] + added = '3.2' +[macro.PyObject_NEW_VAR] + added = '3.2' +[macro.PyObject_New] + added = '3.2' +[macro.PyObject_NewVar] + added = '3.2' +[macro.PyObject_TypeCheck] + added = '3.2' +[macro.PyRange_Check] + added = '3.2' +[macro.PySeqIter_Check] + added = '3.2' +[macro.PySet_Check] + added = '3.2' +[macro.PySlice_Check] + added = '3.2' +[macro.PyThreadState_GET] + added = '3.2' +[macro.PyTraceBack_Check] + added = '3.2' +[macro.PyTuple_Check] + added = '3.2' +[macro.PyTuple_CheckExact] + added = '3.2' +[macro.PyType_Check] + added = '3.2' +[macro.PyType_CheckExact] + added = '3.2' +[macro.PyType_FastSubclass] + added = '3.2' +[macro.PyType_IS_GC] + added = '3.2' +[macro.PyUnicode_Check] + added = '3.2' +[macro.PyUnicode_CheckExact] + added = '3.2' +[macro.PyVarObject_HEAD_INIT] + added = '3.2' +[macro.PyWeakref_Check] + added = '3.2' +[macro.PyWeakref_CheckProxy] + added = '3.2' +[macro.PyWeakref_CheckRef] + added = '3.2' +[macro.PyWeakref_CheckRefExact] + added = '3.2' +[macro.Py_ABS] + added = '3.2' +[macro.Py_ALIGNED] + added = '3.2' +[macro.Py_ARITHMETIC_RIGHT_SHIFT] + added = '3.2' +[macro.Py_CHARMASK] + added = '3.2' +[macro.Py_CLEAR] + added = '3.2' +[macro.Py_DECREF] + added = '3.2' +[macro.Py_DEPRECATED] + added = '3.2' +[macro.Py_FORCE_EXPANSION] + added = '3.2' +[macro.Py_GCC_ATTRIBUTE] + added = '3.2' +[macro.Py_INCREF] + added = '3.2' +[macro.Py_IS_FINITE] + added = '3.2' +[macro.Py_IS_INFINITY] + added = '3.2' +[macro.Py_IS_NAN] + added = '3.2' +[macro.Py_LL] + added = '3.2' +[macro.Py_LOCAL] + added = '3.2' +[macro.Py_LOCAL_INLINE] + added = '3.2' +[macro.Py_RETURN_INF] + added = '3.2' +[macro.Py_SAFE_DOWNCAST] + added = '3.2' +[macro.Py_ULL] + added = '3.2' +[macro.Py_VISIT] + added = '3.2' +[macro.Py_XDECREF] + added = '3.2' +[macro.Py_XINCREF] + added = '3.2' + ### Python 3.3 ############################################################## @@ -1904,6 +2119,19 @@ [function.PyThread_GetInfo] added = '3.3' +# Python 3.3 macros + +[macro.Py_ARRAY_LENGTH] + added = '3.3' +[macro.Py_BUILD_ASSERT] + added = '3.3' +[macro.Py_BUILD_ASSERT_EXPR] + added = '3.3' +[macro.Py_MAX] + added = '3.3' +[macro.Py_MIN] + added = '3.3' + ### Python 3.4 ############################################################## @@ -1915,6 +2143,11 @@ [function.PyType_GetSlot] added = '3.4' +# Python 3.4 macro + +[macro.Py_UNUSED] + added = '3.4' + ### Python 3.5 ############################################################## @@ -1956,6 +2189,13 @@ [const.Py_tp_finalize] added = '3.5' +# Python 3.5 macros + +[macro.PyModule_FromDefAndSpec] + added = '3.5' +[macro.Py_STRINGIFY] + added = '3.5' + ### Python 3.6 ############################################################## @@ -1973,6 +2213,11 @@ [data.PyExc_ModuleNotFoundError] added = '3.6' +# Python 3.6 macro + +[macro.Py_MEMBER_SIZE] + added = '3.6' + ### Python 3.7 ############################################################## @@ -2171,6 +2416,13 @@ [const.METH_METHOD] added = '3.7' +# Python 3.7 macros + +[macro.Py_RETURN_RICHCOMPARE] + added = '3.7' +[macro.Py_UNREACHABLE] + added = '3.7' + ### Python 3.8 ############################################################## @@ -2225,6 +2477,15 @@ [function.PyObject_GC_IsTracked] added = '3.9' +# Python 3.9 macros + +[macro.PyCFunction_CheckExact] + added = '3.9' +[macro.Py_SET_REFCNT] + added = '3.9' +[macro.Py_SET_TYPE] + added = '3.9' + ### Python 3.10 ############################################################# @@ -2313,6 +2574,11 @@ [const.Py_am_send] added = '3.10' +# Python 3.10 macro + +[macro.PySet_CheckExact] + added = '3.10' + # New GC control functions in Python 3.10 (https://github.com/python/cpython/issues/72441)