From b05955d6f5f149523b5855a335444b7c6324bdb7 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Tue, 11 May 2021 16:04:33 +0200 Subject: bpo-43795: PEP 652 user documentation (GH-25668) - Reformat the C API and ABI Versioning page (and extend/clarify a bit) - Rewrite the stable ABI docs into a general text on C API Compatibility - Add a list of Limited API contents, and notes for the individual items. - Replace `Include/README.rst` with a link to a devguide page with the same info --- Doc/c-api/apiabiversion.rst | 81 +- Doc/c-api/stable.rst | 186 +++- Doc/conf.py | 3 +- Doc/data/stable_abi.dat | 1814 ++++++++++++++++----------------- Doc/tools/extensions/c_annotations.py | 110 +- Include/README.rst | 66 +- Tools/scripts/stable_abi.py | 33 +- 7 files changed, 1188 insertions(+), 1105 deletions(-) diff --git a/Doc/c-api/apiabiversion.rst b/Doc/c-api/apiabiversion.rst index b8a8f2f..04050f7 100644 --- a/Doc/c-api/apiabiversion.rst +++ b/Doc/c-api/apiabiversion.rst @@ -6,34 +6,57 @@ API and ABI Versioning *********************** -``PY_VERSION_HEX`` is the Python version number encoded in a single integer. - -For example if the ``PY_VERSION_HEX`` is set to ``0x030401a2``, the underlying -version information can be found by treating it as a 32 bit number in -the following manner: - - +-------+-------------------------+------------------------------------------------+ - | Bytes | Bits (big endian order) | Meaning | - +=======+=========================+================================================+ - | ``1`` | ``1-8`` | ``PY_MAJOR_VERSION`` (the ``3`` in | - | | | ``3.4.1a2``) | - +-------+-------------------------+------------------------------------------------+ - | ``2`` | ``9-16`` | ``PY_MINOR_VERSION`` (the ``4`` in | - | | | ``3.4.1a2``) | - +-------+-------------------------+------------------------------------------------+ - | ``3`` | ``17-24`` | ``PY_MICRO_VERSION`` (the ``1`` in | - | | | ``3.4.1a2``) | - +-------+-------------------------+------------------------------------------------+ - | ``4`` | ``25-28`` | ``PY_RELEASE_LEVEL`` (``0xA`` for alpha, | - | | | ``0xB`` for beta, ``0xC`` for release | - | | | candidate and ``0xF`` for final), in this | - | | | case it is alpha. | - +-------+-------------------------+------------------------------------------------+ - | | ``29-32`` | ``PY_RELEASE_SERIAL`` (the ``2`` in | - | | | ``3.4.1a2``, zero for final releases) | - +-------+-------------------------+------------------------------------------------+ - -Thus ``3.4.1a2`` is hexversion ``0x030401a2``. +CPython exposes its version number in the following macros. +Note that these correspond to the version code is **built** with, +not necessarily the version used at **run time**. -All the given macros are defined in :source:`Include/patchlevel.h`. +See :ref:`stable` for a discussion of API and ABI stability across versions. + +.. c:macro:: PY_MAJOR_VERSION + + The ``3`` in ``3.4.1a2``. + +.. c:macro:: PY_MINOR_VERSION + + The ``4`` in ``3.4.1a2``. + +.. c:macro:: PY_MICRO_VERSION + + The ``1`` in ``3.4.1a2``. + +.. c:macro:: PY_RELEASE_LEVEL + + The ``a`` in ``3.4.1a2``. + This can be ``0xA`` for alpha, ``0xB`` for beta, ``0xC`` for release + candidate or ``0xF`` for final. +.. c:macro:: PY_RELEASE_SERIAL + + The ``2`` in ``3.4.1a2``. Zero for final releases. + +.. c:macro:: PY_VERSION_HEX + + The Python version number encoded in a single integer. + + The underlying version information can be found by treating it as a 32 bit + number in the following manner: + + +-------+-------------------------+-------------------------+--------------------------+ + | Bytes | Bits (big endian order) | Meaning | Value for ``3.4.1a2`` | + +=======+=========================+=========================+==========================+ + | 1 | 1-8 | ``PY_MAJOR_VERSION`` | ``0x03`` | + +-------+-------------------------+-------------------------+--------------------------+ + | 2 | 9-16 | ``PY_MINOR_VERSION`` | ``0x04`` | + +-------+-------------------------+-------------------------+--------------------------+ + | 3 | 17-24 | ``PY_MICRO_VERSION`` | ``0x01`` | + +-------+-------------------------+-------------------------+--------------------------+ + | 4 | 25-28 | ``PY_RELEASE_LEVEL`` | ``0xA`` | + + +-------------------------+-------------------------+--------------------------+ + | | 29-32 | ``PY_RELEASE_SERIAL`` | ``0x2`` | + +-------+-------------------------+-------------------------+--------------------------+ + + Thus ``3.4.1a2`` is hexversion ``0x030401a2`` and ``3.10.0`` is + hexversion ``0x030a00f0``. + + +All the given macros are defined in :source:`Include/patchlevel.h`. diff --git a/Doc/c-api/stable.rst b/Doc/c-api/stable.rst index 9c05cb3..2f67b09 100644 --- a/Doc/c-api/stable.rst +++ b/Doc/c-api/stable.rst @@ -2,37 +2,157 @@ .. _stable: -*********************************** +*************** +C API Stability +*************** + +Python's C API is covered by the Backwards Compatibility Policy, :pep:`387`. +While the C API will change with every minor release (e.g. from 3.9 to 3.10), +most changes will be source-compatible, typically by only adding new API. +Changing existing API or removing API is only done after a deprecation period +or to fix serious issues. + +CPython's Application Binary Interface (ABI) is forward- and +backwards-compatible across a minor release (if these are compiled the same +way; see :ref:`stable-abi-platform` below). +So, code compiled for Python 3.10.0 will work on 3.10.8 and vice versa, +but will need to be compiled separately for 3.9.x and 3.10.x. + +Names prefixed by an underscore, such as ``_Py_InternalState``, +are private API that can change without notice even in patch releases. + + Stable Application Binary Interface -*********************************** - -Traditionally, the C API of Python will change with every release. Most changes -will be source-compatible, typically by only adding API, rather than changing -existing API or removing API (although some interfaces do get removed after -being deprecated first). - -Unfortunately, the API compatibility does not extend to binary compatibility -(the ABI). The reason is primarily the evolution of struct definitions, where -addition of a new field, or changing the type of a field, might not break the -API, but can break the ABI. As a consequence, extension modules need to be -recompiled for every Python release (although an exception is possible on Unix -when none of the affected interfaces are used). In addition, on Windows, -extension modules link with a specific pythonXY.dll and need to be recompiled to -link with a newer one. - -Since Python 3.2, a subset of the API has been declared to guarantee a stable -ABI. Extension modules wishing to use this API (called "limited API") need to -define ``Py_LIMITED_API``. A number of interpreter details then become hidden -from the extension module; in return, a module is built that works on any 3.x -version (x>=2) without recompilation. - -In some cases, the stable ABI needs to be extended with new functions. -Extension modules wishing to use these new APIs need to set ``Py_LIMITED_API`` -to the ``PY_VERSION_HEX`` value (see :ref:`apiabiversion`) of the minimum Python -version they want to support (e.g. ``0x03030000`` for Python 3.3). Such modules -will work on all subsequent Python releases, but fail to load (because of -missing symbols) on the older releases. - -As of Python 3.2, the set of functions available to the limited API is -documented in :pep:`384`. In the C API documentation, API elements that are not -part of the limited API are marked as "Not part of the limited API." +=================================== + +Python 3.2 introduced the *Limited API*, a subset of Python's C API. +Extensions that only use the Limited API can be +compiled once and work with multiple versions of Python. +Contents of the Limited API are :ref:`listed below `. + +To enable this, Python provides a *Stable ABI*: a set of symbols that will +remain compatible across Python 3.x versions. The Stable ABI contains symbols +exposed in the Limited API, but also other ones – for example, functions +necessary to support older versions of the Limited API. + +(For simplicity, this document talks about *extensions*, but the Limited API +and Stable ABI work the same way for all uses of the API – for example, +embedding Python.) + +.. c:macro:: Py_LIMITED_API + + Define this macro ``Py_LIMITED_API`` before including ``Python.h`` to + opt in to only use the Limited API. + + Defining ``Py_LIMITED_API`` to ``3`` will limit the available API so that + the extension will work without recompilation with all Python 3.x releases + (x>=2) on the particular :ref:`platform `. + + Defining ``Py_LIMITED_API`` to a value of :c:data:`PY_VERSION_HEX` will + limit the available API so that the extension will work without + recompilation with all Python 3 releases from the specified one. + This will allow using additional API introduced up to this version, + but the extension will lose compatibility with earlier Python versions. + Rather than using the ``PY_VERSION_HEX`` macro directly, hardcode a minimum + minor version (e.g. ``0x030A0000`` for Python 3.10) for stability when + compiling with future Python versions. + +On Windows, extensions that use the Stable ABI should be linked against +``python3.dll`` rather than a version-specific library such as +``python39.dll``. + +On some platforms, Python will look for and load shared library files named +with the ``abi3`` tag (e.g. ``mymodule.abi3.so``). +It does not check if such extensions conform to a Stable ABI. +The user (or their packaging tools) need to ensure that, for example, +extensions built with the 3.10+ Limited API are not installed for lower +versions of Python. + +All functions in the Stable ABI are present as functions in Python's shared +library, not solely as macros. This makes them usable from languages that don't +use the C preprocessor. + + +Limited API Scope and Performance +--------------------------------- + +The goal for the Limited API is to allow everything that is possible with the +full C API, but possibly with a performance penalty. + +For example, while :c:func:`PyList_GetItem` is available, its “unsafe” macro +variant :c:func:`PyList_GET_ITEM` is not. +The macro can be faster because it can rely on version-specific implementation +details of the list object. + +Without ``Py_LIMITED_API`` defined, some C API functions are inlined or +replaced by macros. +Defining ``Py_LIMITED_API`` disables this inlining, allowing stability as +Python's data structures are improved, but possibly reducing performance. + +By leaving out the ``Py_LIMITED_API`` definition, it is possible to compile +a Limited API extension with a version-specific ABI. This can improve +performance for that Python version, but will limit compatibility. +Compiling with ``Py_LIMITED_API`` will then yield an extension that can be +distributed where a version-specific one is not available – for example, +for prereleases of an upcoming Python version. + + +Limited API Caveats +------------------- + +Note that compiling with ``Py_LIMITED_API`` is *not* a complete guarantee that +code conforms to the Limited API or the Stable ABI. ``Py_LIMITED_API`` only +covers definitions, but an API also includes other issues, such as expected +semantics. + +One issue that ``Py_LIMITED_API`` does not guard against is calling a function +with arguments that are invalid in a lower Python version. +For example, consider a function that starts accepting ``NULL`` for an +argument. In Python 3.9, ``NULL`` now selects a default behavior, but in +Python 3.8, the argument will be used directly, causing a ``NULL`` dereference +and crash. A similar argument works for fields of structs. + +Another issue is that some struct fields are currently not hidden when +``Py_LIMITED_API`` is defined, even though they're part of the Limited API. + +For these reasons, we recommend testing an extension with *all* minor Python +versions it supports, and preferably to build with the *lowest* such version. + +We also recommend reviewing documentation of all used API to check +if it is explicitly part of the Limited API. Even with ``Py_LIMITED_API`` +defined, a few private declarations are exposed for technical reasons (or +even unintentionally, as bugs). + +Also note that the Limited API is not necessarily stable: compiling with +``Py_LIMITED_API`` with Python 3.8 means that the extension will +run with Python 3.12, but it will not necessarily *compile* with Python 3.12. +In particular, parts of the Limited API may be deprecated and removed, +provided that the Stable ABI stays stable. + + +.. _stable-abi-platform: + +Platform Considerations +======================= + +ABI stability depends not only on Python, but also on the compiler used, +lower-level libraries and compiler options. For the purposes of the Stable ABI, +these details define a “platform”. They usually depend on the OS +type and processor architecture + +It is the responsibility of each particular distributor of Python +to ensure that all Python versions on a particular platform are built +in a way that does not break the Stable ABI. +This is the case with Windows and macOS releases from ``python.org`` and many +third-party distributors. + + +.. _stable-abi-list: + +Contents of Limited API +======================= + + +Currently, the Limited API includes the following items: + +.. limited-api-list:: diff --git a/Doc/conf.py b/Doc/conf.py index cf25098..2a1d0e3 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -225,8 +225,9 @@ linkcheck_ignore = [r'https://bugs.python.org/(issue)?\d+', # Options for extensions # ---------------------- -# Relative filename of the reference count data file. +# Relative filename of the data files refcount_file = 'data/refcounts.dat' +stable_abi_file = 'data/stable_abi.dat' # Sphinx 2 and Sphinx 3 compatibility # ----------------------------------- diff --git a/Doc/data/stable_abi.dat b/Doc/data/stable_abi.dat index 833228f..d582204 100644 --- a/Doc/data/stable_abi.dat +++ b/Doc/data/stable_abi.dat @@ -1,953 +1,861 @@ -# Generated by Tools/scripts/stable_abi.py - -METH_CLASS -METH_COEXIST -METH_FASTCALL -METH_METHOD -METH_NOARGS -METH_O -METH_STATIC -METH_VARARGS -PyAiter_Check -PyArg_Parse -PyArg_ParseTuple -PyArg_ParseTupleAndKeywords -PyArg_UnpackTuple -PyArg_VaParse -PyArg_VaParseTupleAndKeywords -PyArg_ValidateKeywordArguments -PyBaseObject_Type -PyBool_FromLong -PyBool_Type -PyByteArrayIter_Type -PyByteArray_AsString -PyByteArray_Concat -PyByteArray_FromObject -PyByteArray_FromStringAndSize -PyByteArray_Resize -PyByteArray_Size -PyByteArray_Type -PyBytesIter_Type -PyBytes_AsString -PyBytes_AsStringAndSize -PyBytes_Concat -PyBytes_ConcatAndDel -PyBytes_DecodeEscape -PyBytes_FromFormat -PyBytes_FromFormatV -PyBytes_FromObject -PyBytes_FromString -PyBytes_FromStringAndSize -PyBytes_Repr -PyBytes_Size -PyBytes_Type -PyCFunction -PyCFunctionWithKeywords -PyCFunction_Call -PyCFunction_GetFlags -PyCFunction_GetFunction -PyCFunction_GetSelf -PyCFunction_New -PyCFunction_NewEx -PyCFunction_Type -PyCMethod_New -PyCallIter_New -PyCallIter_Type -PyCallable_Check -PyCapsule_Destructor -PyCapsule_GetContext -PyCapsule_GetDestructor -PyCapsule_GetName -PyCapsule_GetPointer -PyCapsule_Import -PyCapsule_IsValid -PyCapsule_New -PyCapsule_SetContext -PyCapsule_SetDestructor -PyCapsule_SetName -PyCapsule_SetPointer -PyCapsule_Type -PyClassMethodDescr_Type -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 -PyComplex_FromDoubles -PyComplex_ImagAsDouble -PyComplex_RealAsDouble -PyComplex_Type -PyDescr_NewClassMethod -PyDescr_NewGetSet -PyDescr_NewMember -PyDescr_NewMethod -PyDictItems_Type -PyDictIterItem_Type -PyDictIterKey_Type -PyDictIterValue_Type -PyDictKeys_Type -PyDictProxy_New -PyDictProxy_Type -PyDictRevIterItem_Type -PyDictRevIterKey_Type -PyDictRevIterValue_Type -PyDictValues_Type -PyDict_Clear -PyDict_Contains -PyDict_Copy -PyDict_DelItem -PyDict_DelItemString -PyDict_GetItem -PyDict_GetItemString -PyDict_GetItemWithError -PyDict_Items -PyDict_Keys -PyDict_Merge -PyDict_MergeFromSeq2 -PyDict_New -PyDict_Next -PyDict_SetItem -PyDict_SetItemString -PyDict_Size -PyDict_Type -PyDict_Update -PyDict_Values -PyEllipsis_Type -PyEnum_Type -PyErr_BadArgument -PyErr_BadInternalCall -PyErr_CheckSignals -PyErr_Clear -PyErr_Display -PyErr_ExceptionMatches -PyErr_Fetch -PyErr_Format -PyErr_FormatV -PyErr_GetExcInfo -PyErr_GivenExceptionMatches -PyErr_NewException -PyErr_NewExceptionWithDoc -PyErr_NoMemory -PyErr_NormalizeException -PyErr_Occurred -PyErr_Print -PyErr_PrintEx -PyErr_ProgramText -PyErr_ResourceWarning -PyErr_Restore -PyErr_SetExcFromWindowsErr -PyErr_SetExcFromWindowsErrWithFilename -PyErr_SetExcFromWindowsErrWithFilenameObject -PyErr_SetExcFromWindowsErrWithFilenameObjects -PyErr_SetExcInfo -PyErr_SetFromErrno -PyErr_SetFromErrnoWithFilename -PyErr_SetFromErrnoWithFilenameObject -PyErr_SetFromErrnoWithFilenameObjects -PyErr_SetFromWindowsErr -PyErr_SetFromWindowsErrWithFilename -PyErr_SetImportError -PyErr_SetImportErrorSubclass -PyErr_SetInterrupt -PyErr_SetInterruptEx -PyErr_SetNone -PyErr_SetObject -PyErr_SetString -PyErr_SyntaxLocation -PyErr_SyntaxLocationEx -PyErr_WarnEx -PyErr_WarnExplicit -PyErr_WarnFormat -PyErr_WriteUnraisable -PyEval_AcquireLock -PyEval_AcquireThread -PyEval_CallFunction -PyEval_CallMethod -PyEval_CallObjectWithKeywords -PyEval_EvalCode -PyEval_EvalCodeEx -PyEval_EvalFrame -PyEval_EvalFrameEx -PyEval_GetBuiltins -PyEval_GetFrame -PyEval_GetFuncDesc -PyEval_GetFuncName -PyEval_GetGlobals -PyEval_GetLocals -PyEval_InitThreads -PyEval_ReleaseLock -PyEval_ReleaseThread -PyEval_RestoreThread -PyEval_SaveThread -PyEval_ThreadsInitialized -PyExc_ArithmeticError -PyExc_AssertionError -PyExc_AttributeError -PyExc_BaseException -PyExc_BlockingIOError -PyExc_BrokenPipeError -PyExc_BufferError -PyExc_BytesWarning -PyExc_ChildProcessError -PyExc_ConnectionAbortedError -PyExc_ConnectionError -PyExc_ConnectionRefusedError -PyExc_ConnectionResetError -PyExc_DeprecationWarning -PyExc_EOFError -PyExc_EncodingWarning -PyExc_EnvironmentError -PyExc_Exception -PyExc_FileExistsError -PyExc_FileNotFoundError -PyExc_FloatingPointError -PyExc_FutureWarning -PyExc_GeneratorExit -PyExc_IOError -PyExc_ImportError -PyExc_ImportWarning -PyExc_IndentationError -PyExc_IndexError -PyExc_InterruptedError -PyExc_IsADirectoryError -PyExc_KeyError -PyExc_KeyboardInterrupt -PyExc_LookupError -PyExc_MemoryError -PyExc_ModuleNotFoundError -PyExc_NameError -PyExc_NotADirectoryError -PyExc_NotImplementedError -PyExc_OSError -PyExc_OverflowError -PyExc_PendingDeprecationWarning -PyExc_PermissionError -PyExc_ProcessLookupError -PyExc_RecursionError -PyExc_ReferenceError -PyExc_ResourceWarning -PyExc_RuntimeError -PyExc_RuntimeWarning -PyExc_StopAsyncIteration -PyExc_StopIteration -PyExc_SyntaxError -PyExc_SyntaxWarning -PyExc_SystemError -PyExc_SystemExit -PyExc_TabError -PyExc_TimeoutError -PyExc_TypeError -PyExc_UnboundLocalError -PyExc_UnicodeDecodeError -PyExc_UnicodeEncodeError -PyExc_UnicodeError -PyExc_UnicodeTranslateError -PyExc_UnicodeWarning -PyExc_UserWarning -PyExc_ValueError -PyExc_Warning -PyExc_WindowsError -PyExc_ZeroDivisionError -PyExceptionClass_Name -PyException_GetCause -PyException_GetContext -PyException_GetTraceback -PyException_SetCause -PyException_SetContext -PyException_SetTraceback -PyFile_FromFd -PyFile_GetLine -PyFile_WriteObject -PyFile_WriteString -PyFilter_Type -PyFloat_AsDouble -PyFloat_FromDouble -PyFloat_FromString -PyFloat_GetInfo -PyFloat_GetMax -PyFloat_GetMin -PyFloat_Type -PyFrame_GetCode -PyFrame_GetLineNumber -PyFrozenSet_New -PyFrozenSet_Type -PyGC_Collect -PyGC_Disable -PyGC_Enable -PyGC_IsEnabled -PyGILState_Ensure -PyGILState_GetThisThreadState -PyGILState_Release -PyGILState_STATE -PyGetSetDef -PyGetSetDescr_Type -PyImport_AddModule -PyImport_AddModuleObject -PyImport_AppendInittab -PyImport_ExecCodeModule -PyImport_ExecCodeModuleEx -PyImport_ExecCodeModuleObject -PyImport_ExecCodeModuleWithPathnames -PyImport_GetImporter -PyImport_GetMagicNumber -PyImport_GetMagicTag -PyImport_GetModule -PyImport_GetModuleDict -PyImport_Import -PyImport_ImportFrozenModule -PyImport_ImportFrozenModuleObject -PyImport_ImportModule -PyImport_ImportModuleLevel -PyImport_ImportModuleLevelObject -PyImport_ImportModuleNoBlock -PyImport_ReloadModule -PyIndex_Check -PyInterpreterState -PyInterpreterState_Clear -PyInterpreterState_Delete -PyInterpreterState_Get -PyInterpreterState_GetDict -PyInterpreterState_GetID -PyInterpreterState_New -PyIter_Check -PyIter_Next -PyIter_Send -PyListIter_Type -PyListRevIter_Type -PyList_Append -PyList_AsTuple -PyList_GetItem -PyList_GetSlice -PyList_Insert -PyList_New -PyList_Reverse -PyList_SetItem -PyList_SetSlice -PyList_Size -PyList_Sort -PyList_Type -PyLongObject -PyLongRangeIter_Type -PyLong_AsDouble -PyLong_AsLong -PyLong_AsLongAndOverflow -PyLong_AsLongLong -PyLong_AsLongLongAndOverflow -PyLong_AsSize_t -PyLong_AsSsize_t -PyLong_AsUnsignedLong -PyLong_AsUnsignedLongLong -PyLong_AsUnsignedLongLongMask -PyLong_AsUnsignedLongMask -PyLong_AsVoidPtr -PyLong_FromDouble -PyLong_FromLong -PyLong_FromLongLong -PyLong_FromSize_t -PyLong_FromSsize_t -PyLong_FromString -PyLong_FromUnsignedLong -PyLong_FromUnsignedLongLong -PyLong_FromVoidPtr -PyLong_GetInfo -PyLong_Type -PyMap_Type -PyMapping_Check -PyMapping_GetItemString -PyMapping_HasKey -PyMapping_HasKeyString -PyMapping_Items -PyMapping_Keys -PyMapping_Length -PyMapping_SetItemString -PyMapping_Size -PyMapping_Values -PyMem_Calloc -PyMem_Free -PyMem_Malloc -PyMem_Realloc -PyMemberDef -PyMemberDescr_Type -PyMemoryView_FromMemory -PyMemoryView_FromObject -PyMemoryView_GetContiguous -PyMemoryView_Type -PyMethodDef -PyMethodDescr_Type -PyModuleDef -PyModuleDef_Base -PyModuleDef_Init -PyModuleDef_Type -PyModule_AddFunctions -PyModule_AddIntConstant -PyModule_AddObject -PyModule_AddObjectRef -PyModule_AddStringConstant -PyModule_AddType -PyModule_Create2 -PyModule_ExecDef -PyModule_FromDefAndSpec2 -PyModule_GetDef -PyModule_GetDict -PyModule_GetFilename -PyModule_GetFilenameObject -PyModule_GetName -PyModule_GetNameObject -PyModule_GetState -PyModule_New -PyModule_NewObject -PyModule_SetDocString -PyModule_Type -PyNumber_Absolute -PyNumber_Add -PyNumber_And -PyNumber_AsSsize_t -PyNumber_Check -PyNumber_Divmod -PyNumber_Float -PyNumber_FloorDivide -PyNumber_InPlaceAdd -PyNumber_InPlaceAnd -PyNumber_InPlaceFloorDivide -PyNumber_InPlaceLshift -PyNumber_InPlaceMatrixMultiply -PyNumber_InPlaceMultiply -PyNumber_InPlaceOr -PyNumber_InPlacePower -PyNumber_InPlaceRemainder -PyNumber_InPlaceRshift -PyNumber_InPlaceSubtract -PyNumber_InPlaceTrueDivide -PyNumber_InPlaceXor -PyNumber_Index -PyNumber_Invert -PyNumber_Long -PyNumber_Lshift -PyNumber_MatrixMultiply -PyNumber_Multiply -PyNumber_Negative -PyNumber_Or -PyNumber_Positive -PyNumber_Power -PyNumber_Remainder -PyNumber_Rshift -PyNumber_Subtract -PyNumber_ToBase -PyNumber_TrueDivide -PyNumber_Xor -PyOS_AfterFork -PyOS_AfterFork_Child -PyOS_AfterFork_Parent -PyOS_BeforeFork -PyOS_CheckStack -PyOS_FSPath -PyOS_InputHook -PyOS_InterruptOccurred -PyOS_double_to_string -PyOS_getsig -PyOS_mystricmp -PyOS_mystrnicmp -PyOS_setsig -PyOS_sighandler_t -PyOS_snprintf -PyOS_string_to_double -PyOS_strtol -PyOS_strtoul -PyOS_vsnprintf -PyObject -PyObject_ASCII -PyObject_AsFileDescriptor -PyObject_Bytes -PyObject_Call -PyObject_CallFunction -PyObject_CallFunctionObjArgs -PyObject_CallMethod -PyObject_CallMethodObjArgs -PyObject_CallNoArgs -PyObject_CallObject -PyObject_Calloc -PyObject_ClearWeakRefs -PyObject_DelItem -PyObject_DelItemString -PyObject_Dir -PyObject_Format -PyObject_Free -PyObject_GC_Del -PyObject_GC_IsFinalized -PyObject_GC_IsTracked -PyObject_GC_Track -PyObject_GC_UnTrack -PyObject_GenericGetAttr -PyObject_GenericGetDict -PyObject_GenericSetAttr -PyObject_GenericSetDict -PyObject_GetAiter -PyObject_GetAttr -PyObject_GetAttrString -PyObject_GetItem -PyObject_GetIter -PyObject_HasAttr -PyObject_HasAttrString -PyObject_Hash -PyObject_HashNotImplemented -PyObject_Init -PyObject_InitVar -PyObject_IsInstance -PyObject_IsSubclass -PyObject_IsTrue -PyObject_Length -PyObject_Malloc -PyObject_Not -PyObject_Realloc -PyObject_Repr -PyObject_RichCompare -PyObject_RichCompareBool -PyObject_SelfIter -PyObject_SetAttr -PyObject_SetAttrString -PyObject_SetItem -PyObject_Size -PyObject_Str -PyObject_Type -PyProperty_Type -PyRangeIter_Type -PyRange_Type -PyReversed_Type -PySeqIter_New -PySeqIter_Type -PySequence_Check -PySequence_Concat -PySequence_Contains -PySequence_Count -PySequence_DelItem -PySequence_DelSlice -PySequence_Fast -PySequence_GetItem -PySequence_GetSlice -PySequence_In -PySequence_InPlaceConcat -PySequence_InPlaceRepeat -PySequence_Index -PySequence_Length -PySequence_List -PySequence_Repeat -PySequence_SetItem -PySequence_SetSlice -PySequence_Size -PySequence_Tuple -PySetIter_Type -PySet_Add -PySet_Clear -PySet_Contains -PySet_Discard -PySet_New -PySet_Pop -PySet_Size -PySet_Type -PySlice_AdjustIndices -PySlice_GetIndices -PySlice_GetIndicesEx -PySlice_New -PySlice_Type -PySlice_Unpack -PyState_AddModule -PyState_FindModule -PyState_RemoveModule -PyStructSequence_Desc -PyStructSequence_Field -PyStructSequence_GetItem -PyStructSequence_New -PyStructSequence_NewType -PyStructSequence_SetItem -PySuper_Type -PySys_AddWarnOption -PySys_AddWarnOptionUnicode -PySys_AddXOption -PySys_FormatStderr -PySys_FormatStdout -PySys_GetObject -PySys_GetXOptions -PySys_HasWarnOptions -PySys_ResetWarnOptions -PySys_SetArgv -PySys_SetArgvEx -PySys_SetObject -PySys_SetPath -PySys_WriteStderr -PySys_WriteStdout -PyThreadState -PyThreadState_Clear -PyThreadState_Delete -PyThreadState_Get -PyThreadState_GetDict -PyThreadState_GetFrame -PyThreadState_GetID -PyThreadState_GetInterpreter -PyThreadState_New -PyThreadState_SetAsyncExc -PyThreadState_Swap -PyThread_GetInfo -PyThread_ReInitTLS -PyThread_acquire_lock -PyThread_acquire_lock_timed -PyThread_allocate_lock -PyThread_create_key -PyThread_delete_key -PyThread_delete_key_value -PyThread_exit_thread -PyThread_free_lock -PyThread_get_key_value -PyThread_get_stacksize -PyThread_get_thread_ident -PyThread_get_thread_native_id -PyThread_init_thread -PyThread_release_lock -PyThread_set_key_value -PyThread_set_stacksize -PyThread_start_new_thread -PyThread_tss_alloc -PyThread_tss_create -PyThread_tss_delete -PyThread_tss_free -PyThread_tss_get -PyThread_tss_is_created -PyThread_tss_set -PyTraceBack_Here -PyTraceBack_Print -PyTraceBack_Type -PyTupleIter_Type -PyTuple_GetItem -PyTuple_GetSlice -PyTuple_New -PyTuple_Pack -PyTuple_SetItem -PyTuple_Size -PyTuple_Type -PyTypeObject -PyType_ClearCache -PyType_FromModuleAndSpec -PyType_FromSpec -PyType_FromSpecWithBases -PyType_GenericAlloc -PyType_GenericNew -PyType_GetFlags -PyType_GetModule -PyType_GetModuleState -PyType_GetSlot -PyType_IsSubtype -PyType_Modified -PyType_Ready -PyType_Slot -PyType_Spec -PyType_Type -PyUnicodeDecodeError_Create -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 -PyUnicodeIter_Type -PyUnicodeTranslateError_GetEnd -PyUnicodeTranslateError_GetObject -PyUnicodeTranslateError_GetReason -PyUnicodeTranslateError_GetStart -PyUnicodeTranslateError_SetEnd -PyUnicodeTranslateError_SetReason -PyUnicodeTranslateError_SetStart -PyUnicode_Append -PyUnicode_AppendAndDel -PyUnicode_AsASCIIString -PyUnicode_AsCharmapString -PyUnicode_AsDecodedObject -PyUnicode_AsDecodedUnicode -PyUnicode_AsEncodedObject -PyUnicode_AsEncodedString -PyUnicode_AsEncodedUnicode -PyUnicode_AsLatin1String -PyUnicode_AsMBCSString -PyUnicode_AsRawUnicodeEscapeString -PyUnicode_AsUCS4 -PyUnicode_AsUCS4Copy -PyUnicode_AsUTF16String -PyUnicode_AsUTF32String -PyUnicode_AsUTF8AndSize -PyUnicode_AsUTF8String -PyUnicode_AsUnicodeEscapeString -PyUnicode_AsWideChar -PyUnicode_AsWideCharString -PyUnicode_BuildEncodingMap -PyUnicode_Compare -PyUnicode_CompareWithASCIIString -PyUnicode_Concat -PyUnicode_Contains -PyUnicode_Count -PyUnicode_Decode -PyUnicode_DecodeASCII -PyUnicode_DecodeCharmap -PyUnicode_DecodeCodePageStateful -PyUnicode_DecodeFSDefault -PyUnicode_DecodeFSDefaultAndSize -PyUnicode_DecodeLatin1 -PyUnicode_DecodeLocale -PyUnicode_DecodeLocaleAndSize -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_EncodeFSDefault -PyUnicode_EncodeLocale -PyUnicode_FSConverter -PyUnicode_FSDecoder -PyUnicode_Find -PyUnicode_FindChar -PyUnicode_Format -PyUnicode_FromEncodedObject -PyUnicode_FromFormat -PyUnicode_FromFormatV -PyUnicode_FromObject -PyUnicode_FromOrdinal -PyUnicode_FromString -PyUnicode_FromStringAndSize -PyUnicode_FromWideChar -PyUnicode_GetDefaultEncoding -PyUnicode_GetLength -PyUnicode_GetSize -PyUnicode_InternFromString -PyUnicode_InternImmortal -PyUnicode_InternInPlace -PyUnicode_IsIdentifier -PyUnicode_Join -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_Type -PyUnicode_WriteChar -PyVarObject -PyWeakReference -PyWeakref_GetObject -PyWeakref_NewProxy -PyWeakref_NewRef -PyWrapperDescr_Type -PyWrapper_New -PyZip_Type -Py_AddPendingCall -Py_AtExit -Py_BEGIN_ALLOW_THREADS -Py_BLOCK_THREADS -Py_BuildValue -Py_BytesMain -Py_CompileString -Py_DecRef -Py_DecodeLocale -Py_END_ALLOW_THREADS -Py_EncodeLocale -Py_EndInterpreter -Py_EnterRecursiveCall -Py_Exit -Py_FatalError -Py_FileSystemDefaultEncodeErrors -Py_FileSystemDefaultEncoding -Py_Finalize -Py_FinalizeEx -Py_FrozenMain -Py_GenericAlias -Py_GenericAliasType -Py_GetBuildInfo -Py_GetCompiler -Py_GetCopyright -Py_GetExecPrefix -Py_GetPath -Py_GetPlatform -Py_GetPrefix -Py_GetProgramFullPath -Py_GetProgramName -Py_GetPythonHome -Py_GetRecursionLimit -Py_GetVersion -Py_HasFileSystemDefaultEncoding -Py_IncRef -Py_Initialize -Py_InitializeEx -Py_Is -Py_IsFalse -Py_IsInitialized -Py_IsNone -Py_IsTrue -Py_LeaveRecursiveCall -Py_Main -Py_MakePendingCalls -Py_NewInterpreter -Py_NewRef -Py_ReprEnter -Py_ReprLeave -Py_SetPath -Py_SetProgramName -Py_SetPythonHome -Py_SetRecursionLimit -Py_TPFLAGS_BASETYPE -Py_TPFLAGS_DEFAULT -Py_TPFLAGS_HAVE_GC -Py_TPFLAGS_METHOD_DESCRIPTOR -Py_UCS4 -Py_UNBLOCK_THREADS -Py_UTF8Mode -Py_VaBuildValue -Py_XNewRef -Py_am_aiter -Py_am_anext -Py_am_await -Py_am_send -Py_intptr_t -Py_mp_ass_subscript -Py_mp_length -Py_mp_subscript -Py_nb_absolute -Py_nb_add -Py_nb_and -Py_nb_bool -Py_nb_divmod -Py_nb_float -Py_nb_floor_divide -Py_nb_index -Py_nb_inplace_add -Py_nb_inplace_and -Py_nb_inplace_floor_divide -Py_nb_inplace_lshift -Py_nb_inplace_matrix_multiply -Py_nb_inplace_multiply -Py_nb_inplace_or -Py_nb_inplace_power -Py_nb_inplace_remainder -Py_nb_inplace_rshift -Py_nb_inplace_subtract -Py_nb_inplace_true_divide -Py_nb_inplace_xor -Py_nb_int -Py_nb_invert -Py_nb_lshift -Py_nb_matrix_multiply -Py_nb_multiply -Py_nb_negative -Py_nb_or -Py_nb_positive -Py_nb_power -Py_nb_remainder -Py_nb_rshift -Py_nb_subtract -Py_nb_true_divide -Py_nb_xor -Py_sq_ass_item -Py_sq_concat -Py_sq_contains -Py_sq_inplace_concat -Py_sq_inplace_repeat -Py_sq_item -Py_sq_length -Py_sq_repeat -Py_ssize_t -Py_tp_alloc -Py_tp_base -Py_tp_bases -Py_tp_call -Py_tp_clear -Py_tp_dealloc -Py_tp_del -Py_tp_descr_get -Py_tp_descr_set -Py_tp_doc -Py_tp_finalize -Py_tp_free -Py_tp_getattr -Py_tp_getattro -Py_tp_getset -Py_tp_hash -Py_tp_init -Py_tp_is_gc -Py_tp_iter -Py_tp_iternext -Py_tp_members -Py_tp_methods -Py_tp_new -Py_tp_repr -Py_tp_richcompare -Py_tp_setattr -Py_tp_setattro -Py_tp_str -Py_tp_traverse -Py_uintptr_t -_frame -_node -allocfunc -binaryfunc -descrgetfunc -descrsetfunc -destructor -getattrfunc -getattrofunc -getiterfunc -getter -hashfunc -initproc -inquiry -iternextfunc -lenfunc -newfunc -objobjargproc -objobjproc -reprfunc -richcmpfunc -setattrfunc -setattrofunc -setter -ssizeargfunc -ssizeobjargproc -ssizessizeargfunc -ssizessizeobjargproc -symtable -ternaryfunc -traverseproc -unaryfunc -visitproc +role,name,added,ifdef_note +function,PyAiter_Check,3.10, +function,PyArg_Parse,3.2, +function,PyArg_ParseTuple,3.2, +function,PyArg_ParseTupleAndKeywords,3.2, +function,PyArg_UnpackTuple,3.2, +function,PyArg_VaParse,3.2, +function,PyArg_VaParseTupleAndKeywords,3.2, +function,PyArg_ValidateKeywordArguments,3.2, +var,PyBaseObject_Type,3.2, +function,PyBool_FromLong,3.2, +var,PyBool_Type,3.2, +var,PyByteArrayIter_Type,3.2, +function,PyByteArray_AsString,3.2, +function,PyByteArray_Concat,3.2, +function,PyByteArray_FromObject,3.2, +function,PyByteArray_FromStringAndSize,3.2, +function,PyByteArray_Resize,3.2, +function,PyByteArray_Size,3.2, +var,PyByteArray_Type,3.2, +var,PyBytesIter_Type,3.2, +function,PyBytes_AsString,3.2, +function,PyBytes_AsStringAndSize,3.2, +function,PyBytes_Concat,3.2, +function,PyBytes_ConcatAndDel,3.2, +function,PyBytes_DecodeEscape,3.2, +function,PyBytes_FromFormat,3.2, +function,PyBytes_FromFormatV,3.2, +function,PyBytes_FromObject,3.2, +function,PyBytes_FromString,3.2, +function,PyBytes_FromStringAndSize,3.2, +function,PyBytes_Repr,3.2, +function,PyBytes_Size,3.2, +var,PyBytes_Type,3.2, +type,PyCFunction,3.2, +type,PyCFunctionWithKeywords,3.2, +function,PyCFunction_Call,3.2, +function,PyCFunction_GetFlags,3.2, +function,PyCFunction_GetFunction,3.2, +function,PyCFunction_GetSelf,3.2, +function,PyCFunction_New,3.4, +function,PyCFunction_NewEx,3.2, +var,PyCFunction_Type,3.2, +function,PyCMethod_New,3.9, +function,PyCallIter_New,3.2, +var,PyCallIter_Type,3.2, +function,PyCallable_Check,3.2, +type,PyCapsule_Destructor,3.2, +function,PyCapsule_GetContext,3.2, +function,PyCapsule_GetDestructor,3.2, +function,PyCapsule_GetName,3.2, +function,PyCapsule_GetPointer,3.2, +function,PyCapsule_Import,3.2, +function,PyCapsule_IsValid,3.2, +function,PyCapsule_New,3.2, +function,PyCapsule_SetContext,3.2, +function,PyCapsule_SetDestructor,3.2, +function,PyCapsule_SetName,3.2, +function,PyCapsule_SetPointer,3.2, +var,PyCapsule_Type,3.2, +var,PyClassMethodDescr_Type,3.2, +function,PyCodec_BackslashReplaceErrors,3.2, +function,PyCodec_Decode,3.2, +function,PyCodec_Decoder,3.2, +function,PyCodec_Encode,3.2, +function,PyCodec_Encoder,3.2, +function,PyCodec_IgnoreErrors,3.2, +function,PyCodec_IncrementalDecoder,3.2, +function,PyCodec_IncrementalEncoder,3.2, +function,PyCodec_KnownEncoding,3.2, +function,PyCodec_LookupError,3.2, +function,PyCodec_NameReplaceErrors,3.7, +function,PyCodec_Register,3.2, +function,PyCodec_RegisterError,3.2, +function,PyCodec_ReplaceErrors,3.2, +function,PyCodec_StreamReader,3.2, +function,PyCodec_StreamWriter,3.2, +function,PyCodec_StrictErrors,3.2, +function,PyCodec_Unregister,3.10, +function,PyCodec_XMLCharRefReplaceErrors,3.2, +function,PyComplex_FromDoubles,3.2, +function,PyComplex_ImagAsDouble,3.2, +function,PyComplex_RealAsDouble,3.2, +var,PyComplex_Type,3.2, +function,PyDescr_NewClassMethod,3.2, +function,PyDescr_NewGetSet,3.2, +function,PyDescr_NewMember,3.2, +function,PyDescr_NewMethod,3.2, +var,PyDictItems_Type,3.2, +var,PyDictIterItem_Type,3.2, +var,PyDictIterKey_Type,3.2, +var,PyDictIterValue_Type,3.2, +var,PyDictKeys_Type,3.2, +function,PyDictProxy_New,3.2, +var,PyDictProxy_Type,3.2, +var,PyDictRevIterItem_Type,3.8, +var,PyDictRevIterKey_Type,3.8, +var,PyDictRevIterValue_Type,3.8, +var,PyDictValues_Type,3.2, +function,PyDict_Clear,3.2, +function,PyDict_Contains,3.2, +function,PyDict_Copy,3.2, +function,PyDict_DelItem,3.2, +function,PyDict_DelItemString,3.2, +function,PyDict_GetItem,3.2, +function,PyDict_GetItemString,3.2, +function,PyDict_GetItemWithError,3.2, +function,PyDict_Items,3.2, +function,PyDict_Keys,3.2, +function,PyDict_Merge,3.2, +function,PyDict_MergeFromSeq2,3.2, +function,PyDict_New,3.2, +function,PyDict_Next,3.2, +function,PyDict_SetItem,3.2, +function,PyDict_SetItemString,3.2, +function,PyDict_Size,3.2, +var,PyDict_Type,3.2, +function,PyDict_Update,3.2, +function,PyDict_Values,3.2, +var,PyEllipsis_Type,3.2, +var,PyEnum_Type,3.2, +function,PyErr_BadArgument,3.2, +function,PyErr_BadInternalCall,3.2, +function,PyErr_CheckSignals,3.2, +function,PyErr_Clear,3.2, +function,PyErr_Display,3.2, +function,PyErr_ExceptionMatches,3.2, +function,PyErr_Fetch,3.2, +function,PyErr_Format,3.2, +function,PyErr_FormatV,3.5, +function,PyErr_GetExcInfo,3.7, +function,PyErr_GivenExceptionMatches,3.2, +function,PyErr_NewException,3.2, +function,PyErr_NewExceptionWithDoc,3.2, +function,PyErr_NoMemory,3.2, +function,PyErr_NormalizeException,3.2, +function,PyErr_Occurred,3.2, +function,PyErr_Print,3.2, +function,PyErr_PrintEx,3.2, +function,PyErr_ProgramText,3.2, +function,PyErr_ResourceWarning,3.6, +function,PyErr_Restore,3.2, +function,PyErr_SetExcFromWindowsErr,3.7,on Windows +function,PyErr_SetExcFromWindowsErrWithFilename,3.7,on Windows +function,PyErr_SetExcFromWindowsErrWithFilenameObject,3.7,on Windows +function,PyErr_SetExcFromWindowsErrWithFilenameObjects,3.7,on Windows +function,PyErr_SetExcInfo,3.7, +function,PyErr_SetFromErrno,3.2, +function,PyErr_SetFromErrnoWithFilename,3.2, +function,PyErr_SetFromErrnoWithFilenameObject,3.2, +function,PyErr_SetFromErrnoWithFilenameObjects,3.7, +function,PyErr_SetFromWindowsErr,3.7,on Windows +function,PyErr_SetFromWindowsErrWithFilename,3.7,on Windows +function,PyErr_SetImportError,3.7, +function,PyErr_SetImportErrorSubclass,3.6, +function,PyErr_SetInterrupt,3.2, +function,PyErr_SetInterruptEx,3.10, +function,PyErr_SetNone,3.2, +function,PyErr_SetObject,3.2, +function,PyErr_SetString,3.2, +function,PyErr_SyntaxLocation,3.2, +function,PyErr_SyntaxLocationEx,3.7, +function,PyErr_WarnEx,3.2, +function,PyErr_WarnExplicit,3.2, +function,PyErr_WarnFormat,3.2, +function,PyErr_WriteUnraisable,3.2, +function,PyEval_AcquireLock,3.2, +function,PyEval_AcquireThread,3.2, +function,PyEval_CallFunction,3.2, +function,PyEval_CallMethod,3.2, +function,PyEval_CallObjectWithKeywords,3.2, +function,PyEval_EvalCode,3.2, +function,PyEval_EvalCodeEx,3.2, +function,PyEval_EvalFrame,3.2, +function,PyEval_EvalFrameEx,3.2, +function,PyEval_GetBuiltins,3.2, +function,PyEval_GetFrame,3.2, +function,PyEval_GetFuncDesc,3.2, +function,PyEval_GetFuncName,3.2, +function,PyEval_GetGlobals,3.2, +function,PyEval_GetLocals,3.2, +function,PyEval_InitThreads,3.2, +function,PyEval_ReleaseLock,3.2, +function,PyEval_ReleaseThread,3.2, +function,PyEval_RestoreThread,3.2, +function,PyEval_SaveThread,3.2, +function,PyEval_ThreadsInitialized,3.2, +var,PyExc_ArithmeticError,3.2, +var,PyExc_AssertionError,3.2, +var,PyExc_AttributeError,3.2, +var,PyExc_BaseException,3.2, +var,PyExc_BlockingIOError,3.7, +var,PyExc_BrokenPipeError,3.7, +var,PyExc_BufferError,3.2, +var,PyExc_BytesWarning,3.2, +var,PyExc_ChildProcessError,3.7, +var,PyExc_ConnectionAbortedError,3.7, +var,PyExc_ConnectionError,3.7, +var,PyExc_ConnectionRefusedError,3.7, +var,PyExc_ConnectionResetError,3.7, +var,PyExc_DeprecationWarning,3.2, +var,PyExc_EOFError,3.2, +var,PyExc_EncodingWarning,3.10, +var,PyExc_EnvironmentError,3.2, +var,PyExc_Exception,3.2, +var,PyExc_FileExistsError,3.7, +var,PyExc_FileNotFoundError,3.7, +var,PyExc_FloatingPointError,3.2, +var,PyExc_FutureWarning,3.2, +var,PyExc_GeneratorExit,3.2, +var,PyExc_IOError,3.2, +var,PyExc_ImportError,3.2, +var,PyExc_ImportWarning,3.2, +var,PyExc_IndentationError,3.2, +var,PyExc_IndexError,3.2, +var,PyExc_InterruptedError,3.7, +var,PyExc_IsADirectoryError,3.7, +var,PyExc_KeyError,3.2, +var,PyExc_KeyboardInterrupt,3.2, +var,PyExc_LookupError,3.2, +var,PyExc_MemoryError,3.2, +var,PyExc_ModuleNotFoundError,3.6, +var,PyExc_NameError,3.2, +var,PyExc_NotADirectoryError,3.7, +var,PyExc_NotImplementedError,3.2, +var,PyExc_OSError,3.2, +var,PyExc_OverflowError,3.2, +var,PyExc_PendingDeprecationWarning,3.2, +var,PyExc_PermissionError,3.7, +var,PyExc_ProcessLookupError,3.7, +var,PyExc_RecursionError,3.7, +var,PyExc_ReferenceError,3.2, +var,PyExc_ResourceWarning,3.7, +var,PyExc_RuntimeError,3.2, +var,PyExc_RuntimeWarning,3.2, +var,PyExc_StopAsyncIteration,3.7, +var,PyExc_StopIteration,3.2, +var,PyExc_SyntaxError,3.2, +var,PyExc_SyntaxWarning,3.2, +var,PyExc_SystemError,3.2, +var,PyExc_SystemExit,3.2, +var,PyExc_TabError,3.2, +var,PyExc_TimeoutError,3.7, +var,PyExc_TypeError,3.2, +var,PyExc_UnboundLocalError,3.2, +var,PyExc_UnicodeDecodeError,3.2, +var,PyExc_UnicodeEncodeError,3.2, +var,PyExc_UnicodeError,3.2, +var,PyExc_UnicodeTranslateError,3.2, +var,PyExc_UnicodeWarning,3.2, +var,PyExc_UserWarning,3.2, +var,PyExc_ValueError,3.2, +var,PyExc_Warning,3.2, +var,PyExc_WindowsError,3.7,on Windows +var,PyExc_ZeroDivisionError,3.2, +function,PyExceptionClass_Name,3.8, +function,PyException_GetCause,3.2, +function,PyException_GetContext,3.2, +function,PyException_GetTraceback,3.2, +function,PyException_SetCause,3.2, +function,PyException_SetContext,3.2, +function,PyException_SetTraceback,3.2, +function,PyFile_FromFd,3.2, +function,PyFile_GetLine,3.2, +function,PyFile_WriteObject,3.2, +function,PyFile_WriteString,3.2, +var,PyFilter_Type,3.2, +function,PyFloat_AsDouble,3.2, +function,PyFloat_FromDouble,3.2, +function,PyFloat_FromString,3.2, +function,PyFloat_GetInfo,3.2, +function,PyFloat_GetMax,3.2, +function,PyFloat_GetMin,3.2, +var,PyFloat_Type,3.2, +function,PyFrame_GetCode,3.10, +function,PyFrame_GetLineNumber,3.10, +function,PyFrozenSet_New,3.2, +var,PyFrozenSet_Type,3.2, +function,PyGC_Collect,3.2, +function,PyGC_Disable,3.10, +function,PyGC_Enable,3.10, +function,PyGC_IsEnabled,3.10, +function,PyGILState_Ensure,3.2, +function,PyGILState_GetThisThreadState,3.2, +function,PyGILState_Release,3.2, +type,PyGILState_STATE,3.2, +type,PyGetSetDef,3.2, +var,PyGetSetDescr_Type,3.2, +function,PyImport_AddModule,3.2, +function,PyImport_AddModuleObject,3.7, +function,PyImport_AppendInittab,3.2, +function,PyImport_ExecCodeModule,3.2, +function,PyImport_ExecCodeModuleEx,3.2, +function,PyImport_ExecCodeModuleObject,3.7, +function,PyImport_ExecCodeModuleWithPathnames,3.2, +function,PyImport_GetImporter,3.2, +function,PyImport_GetMagicNumber,3.2, +function,PyImport_GetMagicTag,3.2, +function,PyImport_GetModule,3.8, +function,PyImport_GetModuleDict,3.2, +function,PyImport_Import,3.2, +function,PyImport_ImportFrozenModule,3.2, +function,PyImport_ImportFrozenModuleObject,3.7, +function,PyImport_ImportModule,3.2, +function,PyImport_ImportModuleLevel,3.2, +function,PyImport_ImportModuleLevelObject,3.7, +function,PyImport_ImportModuleNoBlock,3.2, +function,PyImport_ReloadModule,3.2, +function,PyIndex_Check,3.8, +type,PyInterpreterState,3.2, +function,PyInterpreterState_Clear,3.2, +function,PyInterpreterState_Delete,3.2, +function,PyInterpreterState_Get,3.9, +function,PyInterpreterState_GetDict,3.8, +function,PyInterpreterState_GetID,3.7, +function,PyInterpreterState_New,3.2, +function,PyIter_Check,3.8, +function,PyIter_Next,3.2, +function,PyIter_Send,3.10, +var,PyListIter_Type,3.2, +var,PyListRevIter_Type,3.2, +function,PyList_Append,3.2, +function,PyList_AsTuple,3.2, +function,PyList_GetItem,3.2, +function,PyList_GetSlice,3.2, +function,PyList_Insert,3.2, +function,PyList_New,3.2, +function,PyList_Reverse,3.2, +function,PyList_SetItem,3.2, +function,PyList_SetSlice,3.2, +function,PyList_Size,3.2, +function,PyList_Sort,3.2, +var,PyList_Type,3.2, +type,PyLongObject,3.2, +var,PyLongRangeIter_Type,3.2, +function,PyLong_AsDouble,3.2, +function,PyLong_AsLong,3.2, +function,PyLong_AsLongAndOverflow,3.2, +function,PyLong_AsLongLong,3.2, +function,PyLong_AsLongLongAndOverflow,3.2, +function,PyLong_AsSize_t,3.2, +function,PyLong_AsSsize_t,3.2, +function,PyLong_AsUnsignedLong,3.2, +function,PyLong_AsUnsignedLongLong,3.2, +function,PyLong_AsUnsignedLongLongMask,3.2, +function,PyLong_AsUnsignedLongMask,3.2, +function,PyLong_AsVoidPtr,3.2, +function,PyLong_FromDouble,3.2, +function,PyLong_FromLong,3.2, +function,PyLong_FromLongLong,3.2, +function,PyLong_FromSize_t,3.2, +function,PyLong_FromSsize_t,3.2, +function,PyLong_FromString,3.2, +function,PyLong_FromUnsignedLong,3.2, +function,PyLong_FromUnsignedLongLong,3.2, +function,PyLong_FromVoidPtr,3.2, +function,PyLong_GetInfo,3.2, +var,PyLong_Type,3.2, +var,PyMap_Type,3.2, +function,PyMapping_Check,3.2, +function,PyMapping_GetItemString,3.2, +function,PyMapping_HasKey,3.2, +function,PyMapping_HasKeyString,3.2, +function,PyMapping_Items,3.2, +function,PyMapping_Keys,3.2, +function,PyMapping_Length,3.2, +function,PyMapping_SetItemString,3.2, +function,PyMapping_Size,3.2, +function,PyMapping_Values,3.2, +function,PyMem_Calloc,3.7, +function,PyMem_Free,3.2, +function,PyMem_Malloc,3.2, +function,PyMem_Realloc,3.2, +type,PyMemberDef,3.2, +var,PyMemberDescr_Type,3.2, +function,PyMemoryView_FromMemory,3.7, +function,PyMemoryView_FromObject,3.2, +function,PyMemoryView_GetContiguous,3.2, +var,PyMemoryView_Type,3.2, +type,PyMethodDef,3.2, +var,PyMethodDescr_Type,3.2, +type,PyModuleDef,3.2, +type,PyModuleDef_Base,3.2, +function,PyModuleDef_Init,3.5, +var,PyModuleDef_Type,3.5, +function,PyModule_AddFunctions,3.7, +function,PyModule_AddIntConstant,3.2, +function,PyModule_AddObject,3.2, +function,PyModule_AddObjectRef,3.10, +function,PyModule_AddStringConstant,3.2, +function,PyModule_AddType,3.10, +function,PyModule_Create2,3.2, +function,PyModule_ExecDef,3.7, +function,PyModule_FromDefAndSpec2,3.7, +function,PyModule_GetDef,3.2, +function,PyModule_GetDict,3.2, +function,PyModule_GetFilename,3.2, +function,PyModule_GetFilenameObject,3.2, +function,PyModule_GetName,3.2, +function,PyModule_GetNameObject,3.7, +function,PyModule_GetState,3.2, +function,PyModule_New,3.2, +function,PyModule_NewObject,3.7, +function,PyModule_SetDocString,3.7, +var,PyModule_Type,3.2, +function,PyNumber_Absolute,3.2, +function,PyNumber_Add,3.2, +function,PyNumber_And,3.2, +function,PyNumber_AsSsize_t,3.2, +function,PyNumber_Check,3.2, +function,PyNumber_Divmod,3.2, +function,PyNumber_Float,3.2, +function,PyNumber_FloorDivide,3.2, +function,PyNumber_InPlaceAdd,3.2, +function,PyNumber_InPlaceAnd,3.2, +function,PyNumber_InPlaceFloorDivide,3.2, +function,PyNumber_InPlaceLshift,3.2, +function,PyNumber_InPlaceMatrixMultiply,3.7, +function,PyNumber_InPlaceMultiply,3.2, +function,PyNumber_InPlaceOr,3.2, +function,PyNumber_InPlacePower,3.2, +function,PyNumber_InPlaceRemainder,3.2, +function,PyNumber_InPlaceRshift,3.2, +function,PyNumber_InPlaceSubtract,3.2, +function,PyNumber_InPlaceTrueDivide,3.2, +function,PyNumber_InPlaceXor,3.2, +function,PyNumber_Index,3.2, +function,PyNumber_Invert,3.2, +function,PyNumber_Long,3.2, +function,PyNumber_Lshift,3.2, +function,PyNumber_MatrixMultiply,3.7, +function,PyNumber_Multiply,3.2, +function,PyNumber_Negative,3.2, +function,PyNumber_Or,3.2, +function,PyNumber_Positive,3.2, +function,PyNumber_Power,3.2, +function,PyNumber_Remainder,3.2, +function,PyNumber_Rshift,3.2, +function,PyNumber_Subtract,3.2, +function,PyNumber_ToBase,3.2, +function,PyNumber_TrueDivide,3.2, +function,PyNumber_Xor,3.2, +function,PyOS_AfterFork,3.2,on platforms with fork() +function,PyOS_AfterFork_Child,3.7,on platforms with fork() +function,PyOS_AfterFork_Parent,3.7,on platforms with fork() +function,PyOS_BeforeFork,3.7,on platforms with fork() +function,PyOS_CheckStack,3.7,on platforms with USE_STACKCHECK +function,PyOS_FSPath,3.6, +var,PyOS_InputHook,3.2, +function,PyOS_InterruptOccurred,3.2, +function,PyOS_double_to_string,3.2, +function,PyOS_getsig,3.2, +function,PyOS_mystricmp,3.2, +function,PyOS_mystrnicmp,3.2, +function,PyOS_setsig,3.2, +type,PyOS_sighandler_t,3.2, +function,PyOS_snprintf,3.2, +function,PyOS_string_to_double,3.2, +function,PyOS_strtol,3.2, +function,PyOS_strtoul,3.2, +function,PyOS_vsnprintf,3.2, +type,PyObject,3.2, +function,PyObject_ASCII,3.2, +function,PyObject_AsFileDescriptor,3.2, +function,PyObject_Bytes,3.2, +function,PyObject_Call,3.2, +function,PyObject_CallFunction,3.2, +function,PyObject_CallFunctionObjArgs,3.2, +function,PyObject_CallMethod,3.2, +function,PyObject_CallMethodObjArgs,3.2, +function,PyObject_CallNoArgs,3.10, +function,PyObject_CallObject,3.2, +function,PyObject_Calloc,3.7, +function,PyObject_ClearWeakRefs,3.2, +function,PyObject_DelItem,3.2, +function,PyObject_DelItemString,3.2, +function,PyObject_Dir,3.2, +function,PyObject_Format,3.2, +function,PyObject_Free,3.2, +function,PyObject_GC_Del,3.2, +function,PyObject_GC_IsFinalized,3.9, +function,PyObject_GC_IsTracked,3.9, +function,PyObject_GC_Track,3.2, +function,PyObject_GC_UnTrack,3.2, +function,PyObject_GenericGetAttr,3.2, +function,PyObject_GenericGetDict,3.10, +function,PyObject_GenericSetAttr,3.2, +function,PyObject_GenericSetDict,3.7, +function,PyObject_GetAiter,3.10, +function,PyObject_GetAttr,3.2, +function,PyObject_GetAttrString,3.2, +function,PyObject_GetItem,3.2, +function,PyObject_GetIter,3.2, +function,PyObject_HasAttr,3.2, +function,PyObject_HasAttrString,3.2, +function,PyObject_Hash,3.2, +function,PyObject_HashNotImplemented,3.2, +function,PyObject_Init,3.2, +function,PyObject_InitVar,3.2, +function,PyObject_IsInstance,3.2, +function,PyObject_IsSubclass,3.2, +function,PyObject_IsTrue,3.2, +function,PyObject_Length,3.2, +function,PyObject_Malloc,3.2, +function,PyObject_Not,3.2, +function,PyObject_Realloc,3.2, +function,PyObject_Repr,3.2, +function,PyObject_RichCompare,3.2, +function,PyObject_RichCompareBool,3.2, +function,PyObject_SelfIter,3.2, +function,PyObject_SetAttr,3.2, +function,PyObject_SetAttrString,3.2, +function,PyObject_SetItem,3.2, +function,PyObject_Size,3.2, +function,PyObject_Str,3.2, +function,PyObject_Type,3.2, +var,PyProperty_Type,3.2, +var,PyRangeIter_Type,3.2, +var,PyRange_Type,3.2, +var,PyReversed_Type,3.2, +function,PySeqIter_New,3.2, +var,PySeqIter_Type,3.2, +function,PySequence_Check,3.2, +function,PySequence_Concat,3.2, +function,PySequence_Contains,3.2, +function,PySequence_Count,3.2, +function,PySequence_DelItem,3.2, +function,PySequence_DelSlice,3.2, +function,PySequence_Fast,3.2, +function,PySequence_GetItem,3.2, +function,PySequence_GetSlice,3.2, +function,PySequence_In,3.2, +function,PySequence_InPlaceConcat,3.2, +function,PySequence_InPlaceRepeat,3.2, +function,PySequence_Index,3.2, +function,PySequence_Length,3.2, +function,PySequence_List,3.2, +function,PySequence_Repeat,3.2, +function,PySequence_SetItem,3.2, +function,PySequence_SetSlice,3.2, +function,PySequence_Size,3.2, +function,PySequence_Tuple,3.2, +var,PySetIter_Type,3.2, +function,PySet_Add,3.2, +function,PySet_Clear,3.2, +function,PySet_Contains,3.2, +function,PySet_Discard,3.2, +function,PySet_New,3.2, +function,PySet_Pop,3.2, +function,PySet_Size,3.2, +var,PySet_Type,3.2, +function,PySlice_AdjustIndices,3.7, +function,PySlice_GetIndices,3.2, +function,PySlice_GetIndicesEx,3.2, +function,PySlice_New,3.2, +var,PySlice_Type,3.2, +function,PySlice_Unpack,3.7, +function,PyState_AddModule,3.3, +function,PyState_FindModule,3.2, +function,PyState_RemoveModule,3.3, +type,PyStructSequence_Desc,3.2, +type,PyStructSequence_Field,3.2, +function,PyStructSequence_GetItem,3.2, +function,PyStructSequence_New,3.2, +function,PyStructSequence_NewType,3.2, +function,PyStructSequence_SetItem,3.2, +var,PySuper_Type,3.2, +function,PySys_AddWarnOption,3.2, +function,PySys_AddWarnOptionUnicode,3.2, +function,PySys_AddXOption,3.7, +function,PySys_FormatStderr,3.2, +function,PySys_FormatStdout,3.2, +function,PySys_GetObject,3.2, +function,PySys_GetXOptions,3.7, +function,PySys_HasWarnOptions,3.2, +function,PySys_ResetWarnOptions,3.2, +function,PySys_SetArgv,3.2, +function,PySys_SetArgvEx,3.2, +function,PySys_SetObject,3.2, +function,PySys_SetPath,3.2, +function,PySys_WriteStderr,3.2, +function,PySys_WriteStdout,3.2, +type,PyThreadState,3.2, +function,PyThreadState_Clear,3.2, +function,PyThreadState_Delete,3.2, +function,PyThreadState_Get,3.2, +function,PyThreadState_GetDict,3.2, +function,PyThreadState_GetFrame,3.10, +function,PyThreadState_GetID,3.10, +function,PyThreadState_GetInterpreter,3.10, +function,PyThreadState_New,3.2, +function,PyThreadState_SetAsyncExc,3.2, +function,PyThreadState_Swap,3.2, +function,PyThread_GetInfo,3.3, +function,PyThread_ReInitTLS,3.2, +function,PyThread_acquire_lock,3.2, +function,PyThread_acquire_lock_timed,3.2, +function,PyThread_allocate_lock,3.2, +function,PyThread_create_key,3.2, +function,PyThread_delete_key,3.2, +function,PyThread_delete_key_value,3.2, +function,PyThread_exit_thread,3.2, +function,PyThread_free_lock,3.2, +function,PyThread_get_key_value,3.2, +function,PyThread_get_stacksize,3.2, +function,PyThread_get_thread_ident,3.2, +function,PyThread_get_thread_native_id,3.2, +function,PyThread_init_thread,3.2, +function,PyThread_release_lock,3.2, +function,PyThread_set_key_value,3.2, +function,PyThread_set_stacksize,3.2, +function,PyThread_start_new_thread,3.2, +function,PyThread_tss_alloc,3.7, +function,PyThread_tss_create,3.7, +function,PyThread_tss_delete,3.7, +function,PyThread_tss_free,3.7, +function,PyThread_tss_get,3.7, +function,PyThread_tss_is_created,3.7, +function,PyThread_tss_set,3.7, +function,PyTraceBack_Here,3.2, +function,PyTraceBack_Print,3.2, +var,PyTraceBack_Type,3.2, +var,PyTupleIter_Type,3.2, +function,PyTuple_GetItem,3.2, +function,PyTuple_GetSlice,3.2, +function,PyTuple_New,3.2, +function,PyTuple_Pack,3.2, +function,PyTuple_SetItem,3.2, +function,PyTuple_Size,3.2, +var,PyTuple_Type,3.2, +type,PyTypeObject,3.2, +function,PyType_ClearCache,3.2, +function,PyType_FromModuleAndSpec,3.10, +function,PyType_FromSpec,3.2, +function,PyType_FromSpecWithBases,3.3, +function,PyType_GenericAlloc,3.2, +function,PyType_GenericNew,3.2, +function,PyType_GetFlags,3.2, +function,PyType_GetModule,3.10, +function,PyType_GetModuleState,3.10, +function,PyType_GetSlot,3.4, +function,PyType_IsSubtype,3.2, +function,PyType_Modified,3.2, +function,PyType_Ready,3.2, +type,PyType_Slot,3.2, +type,PyType_Spec,3.2, +var,PyType_Type,3.2, +function,PyUnicodeDecodeError_Create,3.2, +function,PyUnicodeDecodeError_GetEncoding,3.2, +function,PyUnicodeDecodeError_GetEnd,3.2, +function,PyUnicodeDecodeError_GetObject,3.2, +function,PyUnicodeDecodeError_GetReason,3.2, +function,PyUnicodeDecodeError_GetStart,3.2, +function,PyUnicodeDecodeError_SetEnd,3.2, +function,PyUnicodeDecodeError_SetReason,3.2, +function,PyUnicodeDecodeError_SetStart,3.2, +function,PyUnicodeEncodeError_GetEncoding,3.2, +function,PyUnicodeEncodeError_GetEnd,3.2, +function,PyUnicodeEncodeError_GetObject,3.2, +function,PyUnicodeEncodeError_GetReason,3.2, +function,PyUnicodeEncodeError_GetStart,3.2, +function,PyUnicodeEncodeError_SetEnd,3.2, +function,PyUnicodeEncodeError_SetReason,3.2, +function,PyUnicodeEncodeError_SetStart,3.2, +var,PyUnicodeIter_Type,3.2, +function,PyUnicodeTranslateError_GetEnd,3.2, +function,PyUnicodeTranslateError_GetObject,3.2, +function,PyUnicodeTranslateError_GetReason,3.2, +function,PyUnicodeTranslateError_GetStart,3.2, +function,PyUnicodeTranslateError_SetEnd,3.2, +function,PyUnicodeTranslateError_SetReason,3.2, +function,PyUnicodeTranslateError_SetStart,3.2, +function,PyUnicode_Append,3.2, +function,PyUnicode_AppendAndDel,3.2, +function,PyUnicode_AsASCIIString,3.2, +function,PyUnicode_AsCharmapString,3.2, +function,PyUnicode_AsDecodedObject,3.2, +function,PyUnicode_AsDecodedUnicode,3.2, +function,PyUnicode_AsEncodedObject,3.2, +function,PyUnicode_AsEncodedString,3.2, +function,PyUnicode_AsEncodedUnicode,3.2, +function,PyUnicode_AsLatin1String,3.2, +function,PyUnicode_AsMBCSString,3.7,on Windows +function,PyUnicode_AsRawUnicodeEscapeString,3.2, +function,PyUnicode_AsUCS4,3.7, +function,PyUnicode_AsUCS4Copy,3.7, +function,PyUnicode_AsUTF16String,3.2, +function,PyUnicode_AsUTF32String,3.2, +function,PyUnicode_AsUTF8AndSize,3.10, +function,PyUnicode_AsUTF8String,3.2, +function,PyUnicode_AsUnicodeEscapeString,3.2, +function,PyUnicode_AsWideChar,3.2, +function,PyUnicode_AsWideCharString,3.7, +function,PyUnicode_BuildEncodingMap,3.2, +function,PyUnicode_Compare,3.2, +function,PyUnicode_CompareWithASCIIString,3.2, +function,PyUnicode_Concat,3.2, +function,PyUnicode_Contains,3.2, +function,PyUnicode_Count,3.2, +function,PyUnicode_Decode,3.2, +function,PyUnicode_DecodeASCII,3.2, +function,PyUnicode_DecodeCharmap,3.2, +function,PyUnicode_DecodeCodePageStateful,3.7,on Windows +function,PyUnicode_DecodeFSDefault,3.2, +function,PyUnicode_DecodeFSDefaultAndSize,3.2, +function,PyUnicode_DecodeLatin1,3.2, +function,PyUnicode_DecodeLocale,3.7, +function,PyUnicode_DecodeLocaleAndSize,3.7, +function,PyUnicode_DecodeMBCS,3.7,on Windows +function,PyUnicode_DecodeMBCSStateful,3.7,on Windows +function,PyUnicode_DecodeRawUnicodeEscape,3.2, +function,PyUnicode_DecodeUTF16,3.2, +function,PyUnicode_DecodeUTF16Stateful,3.2, +function,PyUnicode_DecodeUTF32,3.2, +function,PyUnicode_DecodeUTF32Stateful,3.2, +function,PyUnicode_DecodeUTF7,3.2, +function,PyUnicode_DecodeUTF7Stateful,3.2, +function,PyUnicode_DecodeUTF8,3.2, +function,PyUnicode_DecodeUTF8Stateful,3.2, +function,PyUnicode_DecodeUnicodeEscape,3.2, +function,PyUnicode_EncodeCodePage,3.7,on Windows +function,PyUnicode_EncodeFSDefault,3.2, +function,PyUnicode_EncodeLocale,3.7, +function,PyUnicode_FSConverter,3.2, +function,PyUnicode_FSDecoder,3.2, +function,PyUnicode_Find,3.2, +function,PyUnicode_FindChar,3.7, +function,PyUnicode_Format,3.2, +function,PyUnicode_FromEncodedObject,3.2, +function,PyUnicode_FromFormat,3.2, +function,PyUnicode_FromFormatV,3.2, +function,PyUnicode_FromObject,3.2, +function,PyUnicode_FromOrdinal,3.2, +function,PyUnicode_FromString,3.2, +function,PyUnicode_FromStringAndSize,3.2, +function,PyUnicode_FromWideChar,3.2, +function,PyUnicode_GetDefaultEncoding,3.2, +function,PyUnicode_GetLength,3.7, +function,PyUnicode_GetSize,3.2, +function,PyUnicode_InternFromString,3.2, +function,PyUnicode_InternImmortal,3.2, +function,PyUnicode_InternInPlace,3.2, +function,PyUnicode_IsIdentifier,3.2, +function,PyUnicode_Join,3.2, +function,PyUnicode_Partition,3.2, +function,PyUnicode_RPartition,3.2, +function,PyUnicode_RSplit,3.2, +function,PyUnicode_ReadChar,3.7, +function,PyUnicode_Replace,3.2, +function,PyUnicode_Resize,3.2, +function,PyUnicode_RichCompare,3.2, +function,PyUnicode_Split,3.2, +function,PyUnicode_Splitlines,3.2, +function,PyUnicode_Substring,3.7, +function,PyUnicode_Tailmatch,3.2, +function,PyUnicode_Translate,3.2, +var,PyUnicode_Type,3.2, +function,PyUnicode_WriteChar,3.7, +type,PyVarObject,3.2, +type,PyWeakReference,3.2, +function,PyWeakref_GetObject,3.2, +function,PyWeakref_NewProxy,3.2, +function,PyWeakref_NewRef,3.2, +var,PyWrapperDescr_Type,3.2, +function,PyWrapper_New,3.2, +var,PyZip_Type,3.2, +function,Py_AddPendingCall,3.2, +function,Py_AtExit,3.2, +macro,Py_BEGIN_ALLOW_THREADS,3.2, +macro,Py_BLOCK_THREADS,3.2, +function,Py_BuildValue,3.2, +function,Py_BytesMain,3.8, +function,Py_CompileString,3.2, +function,Py_DecRef,3.2, +function,Py_DecodeLocale,3.7, +macro,Py_END_ALLOW_THREADS,3.2, +function,Py_EncodeLocale,3.7, +function,Py_EndInterpreter,3.2, +function,Py_EnterRecursiveCall,3.9, +function,Py_Exit,3.2, +function,Py_FatalError,3.2, +var,Py_FileSystemDefaultEncodeErrors,3.10, +var,Py_FileSystemDefaultEncoding,3.2, +function,Py_Finalize,3.2, +function,Py_FinalizeEx,3.6, +function,Py_FrozenMain,3.10, +function,Py_GenericAlias,3.9, +function,Py_GenericAliasType,3.9, +function,Py_GetBuildInfo,3.2, +function,Py_GetCompiler,3.2, +function,Py_GetCopyright,3.2, +function,Py_GetExecPrefix,3.2, +function,Py_GetPath,3.2, +function,Py_GetPlatform,3.2, +function,Py_GetPrefix,3.2, +function,Py_GetProgramFullPath,3.2, +function,Py_GetProgramName,3.2, +function,Py_GetPythonHome,3.2, +function,Py_GetRecursionLimit,3.2, +function,Py_GetVersion,3.2, +var,Py_HasFileSystemDefaultEncoding,3.2, +function,Py_IncRef,3.2, +function,Py_Initialize,3.2, +function,Py_InitializeEx,3.2, +function,Py_Is,3.10, +function,Py_IsFalse,3.10, +function,Py_IsInitialized,3.2, +function,Py_IsNone,3.10, +function,Py_IsTrue,3.10, +function,Py_LeaveRecursiveCall,3.9, +function,Py_Main,3.2, +function,Py_MakePendingCalls,3.2, +function,Py_NewInterpreter,3.2, +function,Py_NewRef,3.10, +function,Py_ReprEnter,3.2, +function,Py_ReprLeave,3.2, +function,Py_SetPath,3.7, +function,Py_SetProgramName,3.2, +function,Py_SetPythonHome,3.2, +function,Py_SetRecursionLimit,3.2, +type,Py_UCS4,3.2, +macro,Py_UNBLOCK_THREADS,3.2, +var,Py_UTF8Mode,3.8, +function,Py_VaBuildValue,3.2, +function,Py_XNewRef,3.10, +type,Py_intptr_t,3.2, +type,Py_ssize_t,3.2, +type,Py_uintptr_t,3.2, +type,_frame,3.2, +type,_node,3.2, +type,allocfunc,3.2, +type,binaryfunc,3.2, +type,descrgetfunc,3.2, +type,descrsetfunc,3.2, +type,destructor,3.2, +type,getattrfunc,3.2, +type,getattrofunc,3.2, +type,getiterfunc,3.2, +type,getter,3.2, +type,hashfunc,3.2, +type,initproc,3.2, +type,inquiry,3.2, +type,iternextfunc,3.2, +type,lenfunc,3.2, +type,newfunc,3.2, +type,objobjargproc,3.2, +type,objobjproc,3.2, +type,reprfunc,3.2, +type,richcmpfunc,3.2, +type,setattrfunc,3.2, +type,setattrofunc,3.2, +type,setter,3.2, +type,ssizeargfunc,3.2, +type,ssizeobjargproc,3.2, +type,ssizessizeargfunc,3.2, +type,ssizessizeobjargproc,3.2, +type,symtable,3.2, +type,ternaryfunc,3.2, +type,traverseproc,3.2, +type,unaryfunc,3.2, +type,visitproc,3.2, diff --git a/Doc/tools/extensions/c_annotations.py b/Doc/tools/extensions/c_annotations.py index 76c9d92..489f066 100644 --- a/Doc/tools/extensions/c_annotations.py +++ b/Doc/tools/extensions/c_annotations.py @@ -10,8 +10,10 @@ * stable API annotations - Usage: Set the `refcount_file` config value to the path to the reference + Usage: + * Set the `refcount_file` config value to the path to the reference count data file. + * Set the `stable_abi_file` config value to the path to stable ABI list. :copyright: Copyright 2007-2014 by Georg Brandl. :license: Python license. @@ -20,11 +22,23 @@ from os import path from docutils import nodes from docutils.parsers.rst import directives +from docutils.parsers.rst import Directive +from docutils.statemachine import StringList +import csv from sphinx import addnodes from sphinx.domains.c import CObject +REST_ROLE_MAP = { + 'function': 'func', + 'var': 'data', + 'type': 'type', + 'macro': 'macro', + 'type': 'type', +} + + class RCEntry: def __init__(self, name): self.name = name @@ -33,12 +47,10 @@ class RCEntry: self.result_refs = None -class Annotations(dict): - @classmethod - def fromfile(cls, filename): - d = cls() - fp = open(filename, 'r') - try: +class Annotations: + def __init__(self, refcount_filename, stable_abi_file): + self.refcount_data = {} + with open(refcount_filename, 'r') as fp: for line in fp: line = line.strip() if line[:1] in ("", "#"): @@ -50,9 +62,9 @@ class Annotations(dict): function, type, arg, refcount, comment = parts # Get the entry, creating it if needed: try: - entry = d[function] + entry = self.refcount_data[function] except KeyError: - entry = d[function] = RCEntry(function) + entry = self.refcount_data[function] = RCEntry(function) if not refcount or refcount == "null": refcount = None else: @@ -64,27 +76,58 @@ class Annotations(dict): else: entry.result_type = type entry.result_refs = refcount - finally: - fp.close() - return d + + self.stable_abi_data = {} + with open(stable_abi_file, 'r') as fp: + for record in csv.DictReader(fp): + role = record['role'] + name = record['name'] + self.stable_abi_data[name] = record def add_annotations(self, app, doctree): for node in doctree.traverse(addnodes.desc_content): par = node.parent if par['domain'] != 'c': continue - if par['stableabi']: - node.insert(0, nodes.emphasis(' Part of the stable ABI.', - ' Part of the stable ABI.', - classes=['stableabi'])) - if par['objtype'] != 'function': - continue if not par[0].has_key('ids') or not par[0]['ids']: continue name = par[0]['ids'][0] if name.startswith("c."): name = name[2:] - entry = self.get(name) + + objtype = par['objtype'] + + # Stable ABI annotation. These have two forms: + # Part of the [Stable ABI](link). + # Part of the [Stable ABI](link) since version X.Y. + record = self.stable_abi_data.get(name) + if record: + if record['role'] != objtype: + raise ValueError( + f"Object type mismatch in limited API annotation " + f"for {name}: {record['role']!r} != {objtype!r}") + stable_added = record['added'] + message = ' Part of the ' + emph_node = nodes.emphasis(message, message, + classes=['stableabi']) + ref_node = addnodes.pending_xref( + 'Stable ABI', refdomain="std", reftarget='stable', + reftype='ref', refexplicit="False") + ref_node += nodes.Text('Stable ABI') + emph_node += ref_node + if record['ifdef_note']: + emph_node += nodes.Text(' ' + record['ifdef_note']) + if stable_added == '3.2': + # Stable ABI was introduced in 3.2. + emph_node += nodes.Text('.') + else: + emph_node += nodes.Text(f' since version {stable_added}.') + node.insert(0, emph_node) + + # Return value annotation + if objtype != 'function': + continue + entry = self.refcount_data.get(name) if not entry: continue elif not entry.result_type.endswith("Object*"): @@ -99,13 +142,36 @@ class Annotations(dict): def init_annotations(app): - refcounts = Annotations.fromfile( - path.join(app.srcdir, app.config.refcount_file)) - app.connect('doctree-read', refcounts.add_annotations) + annotations = Annotations( + path.join(app.srcdir, app.config.refcount_file), + path.join(app.srcdir, app.config.stable_abi_file), + ) + app.connect('doctree-read', annotations.add_annotations) + + class LimitedAPIList(Directive): + + has_content = False + required_arguments = 0 + optional_arguments = 0 + final_argument_whitespace = True + + def run(self): + content = [] + for record in annotations.stable_abi_data.values(): + role = REST_ROLE_MAP[record['role']] + name = record['name'] + content.append(f'* :c:{role}:`{name}`') + + pnode = nodes.paragraph() + self.state.nested_parse(StringList(content), 0, pnode) + return [pnode] + + app.add_directive('limited-api-list', LimitedAPIList) def setup(app): app.add_config_value('refcount_file', '', True) + app.add_config_value('stable_abi_file', '', True) app.connect('builder-inited', init_annotations) # monkey-patch C object... diff --git a/Include/README.rst b/Include/README.rst index d2467ca..f52e690 100644 --- a/Include/README.rst +++ b/Include/README.rst @@ -3,66 +3,10 @@ The Python C API The C API is divided into three sections: -1. ``Include/`` -2. ``Include/cpython/`` -3. ``Include/internal/`` +1. ``Include/``: Limited API +2. ``Include/cpython/``: CPython implementation details +3. ``Include/internal/``: The internal API +Information on changing the C API is available `in the developer guide`_ -Include: Limited API -==================== - -``Include/``, excluding the ``cpython`` and ``internal`` subdirectories, -contains the public Limited API (Application Programming Interface). -The Limited API is a subset of the C API, designed to guarantee ABI -stability across Python 3 versions, and is defined in :pep:`384`. - -Guidelines for expanding the Limited API: - -- Functions *must not* steal references -- Functions *must not* return borrowed references -- Functions returning references *must* return a strong reference -- Macros should not expose implementation details -- Please start a public discussion before expanding the API -- Functions or macros with a ``_Py`` prefix do not belong in ``Include/``. - -It is possible to add a function or macro to the Limited API from a -given Python version. For example, to add a function to the Limited API -from Python 3.10 and onwards, wrap it with -``#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000``. - - -Include/cpython: CPython implementation details -=============================================== - -``Include/cpython/`` contains the public API that is excluded from the -Limited API and the Stable ABI. - -Guidelines for expanding the public API: - -- Functions *must not* steal references -- Functions *must not* return borrowed references -- Functions returning references *must* return a strong reference - - -Include/internal: The internal API -================================== - - -With PyAPI_FUNC or PyAPI_DATA ------------------------------ - -Functions or structures in ``Include/internal/`` defined with -``PyAPI_FUNC`` or ``PyAPI_DATA`` are internal functions which are -exposed only for specific use cases like debuggers and profilers. - - -With the extern keyword ------------------------ - -Functions in ``Include/internal/`` defined with the ``extern`` keyword -*must not and can not* be used outside the CPython code base. Only -built-in stdlib extensions (built with the ``Py_BUILD_CORE_BUILTIN`` -macro defined) can use such functions. - -When in doubt, new internal C functions should be defined in -``Include/internal`` using the ``extern`` keyword. +.. _in the developer guide: https://devguide.python.org/c-api/ diff --git a/Tools/scripts/stable_abi.py b/Tools/scripts/stable_abi.py index 399153d..2ba5b66 100755 --- a/Tools/scripts/stable_abi.py +++ b/Tools/scripts/stable_abi.py @@ -21,6 +21,7 @@ import os import os.path import io import re +import csv MISSING = object() @@ -45,6 +46,11 @@ EXCLUDED_HEADERS = { MACOS = (sys.platform == "darwin") UNIXY = MACOS or (sys.platform == "linux") # XXX should this be "not Windows"? +IFDEF_DOC_NOTES = { + 'MS_WINDOWS': 'on Windows', + 'HAVE_FORK': 'on platforms with fork()', + 'USE_STACKCHECK': 'on platforms with USE_STACKCHECK', +} # The stable ABI manifest (Misc/stable_abi.txt) exists only to fill the # following dataclasses. @@ -227,16 +233,31 @@ def gen_python3dll(manifest, args, outfile): key=sort_key): write(f'EXPORT_DATA({item.name})') +REST_ROLES = { + 'function': 'function', + 'data': 'var', + 'struct': 'type', + 'macro': 'macro', + # 'const': 'const', # all undocumented + 'typedef': 'type', +} @generator("doc_list", 'Doc/data/stable_abi.dat') def gen_doc_annotations(manifest, args, outfile): """Generate/check the stable ABI list for documentation annotations""" - write = partial(print, file=outfile) - write("# Generated by Tools/scripts/stable_abi.py") - write() - for item in manifest.select(ABIItem.KINDS, include_abi_only=False): - write(item.name) - + writer = csv.DictWriter( + outfile, ['role', 'name', 'added', 'ifdef_note'], lineterminator='\n') + writer.writeheader() + for item in manifest.select(REST_ROLES.keys(), include_abi_only=False): + if item.ifdef: + ifdef_note = IFDEF_DOC_NOTES[item.ifdef] + else: + ifdef_note = None + writer.writerow({ + 'role': REST_ROLES[item.kind], + 'name': item.name, + 'added': item.added, + 'ifdef_note': ifdef_note}) def generate_or_check(manifest, args, path, func): """Generate/check a file with a single generator -- cgit v0.12