Skip to content

Commit

Permalink
bpo-43795: Generate python3dll.c and doc data from manifest (PEP 652) (
Browse files Browse the repository at this point in the history
  • Loading branch information
encukou committed Apr 29, 2021
1 parent 645ed62 commit f6ee4da
Show file tree
Hide file tree
Showing 7 changed files with 2,844 additions and 139 deletions.
171 changes: 169 additions & 2 deletions Doc/data/stable_abi.dat
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# File generated by 'make regen-limited-abi'
# This is NOT an authoritative list of stable ABI symbols
# 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
Expand Down Expand Up @@ -33,6 +41,8 @@ PyBytes_FromStringAndSize
PyBytes_Repr
PyBytes_Size
PyBytes_Type
PyCFunction
PyCFunctionWithKeywords
PyCFunction_Call
PyCFunction_GetFlags
PyCFunction_GetFunction
Expand All @@ -44,6 +54,7 @@ PyCMethod_New
PyCallIter_New
PyCallIter_Type
PyCallable_Check
PyCapsule_Destructor
PyCapsule_GetContext
PyCapsule_GetDestructor
PyCapsule_GetName
Expand Down Expand Up @@ -138,11 +149,17 @@ 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
Expand Down Expand Up @@ -243,6 +260,7 @@ PyExc_UnicodeWarning
PyExc_UserWarning
PyExc_ValueError
PyExc_Warning
PyExc_WindowsError
PyExc_ZeroDivisionError
PyExceptionClass_Name
PyException_GetCause
Expand Down Expand Up @@ -274,6 +292,8 @@ PyGC_IsEnabled
PyGILState_Ensure
PyGILState_GetThisThreadState
PyGILState_Release
PyGILState_STATE
PyGetSetDef
PyGetSetDescr_Type
PyImport_AddModule
PyImport_AddModuleObject
Expand All @@ -296,6 +316,7 @@ PyImport_ImportModuleLevelObject
PyImport_ImportModuleNoBlock
PyImport_ReloadModule
PyIndex_Check
PyInterpreterState
PyInterpreterState_Clear
PyInterpreterState_Delete
PyInterpreterState_Get
Expand All @@ -319,6 +340,7 @@ PyList_SetSlice
PyList_Size
PyList_Sort
PyList_Type
PyLongObject
PyLongRangeIter_Type
PyLong_AsDouble
PyLong_AsLong
Expand Down Expand Up @@ -358,12 +380,16 @@ 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
Expand Down Expand Up @@ -427,18 +453,22 @@ 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
Expand Down Expand Up @@ -537,6 +567,8 @@ PySlice_Unpack
PyState_AddModule
PyState_FindModule
PyState_RemoveModule
PyStructSequence_Desc
PyStructSequence_Field
PyStructSequence_GetItem
PyStructSequence_New
PyStructSequence_NewType
Expand All @@ -557,6 +589,7 @@ PySys_SetObject
PySys_SetPath
PySys_WriteStderr
PySys_WriteStdout
PyThreadState
PyThreadState_Clear
PyThreadState_Delete
PyThreadState_Get
Expand Down Expand Up @@ -604,6 +637,7 @@ PyTuple_Pack
PyTuple_SetItem
PyTuple_Size
PyTuple_Type
PyTypeObject
PyType_ClearCache
PyType_FromModuleAndSpec
PyType_FromSpec
Expand All @@ -617,6 +651,8 @@ PyType_GetSlot
PyType_IsSubtype
PyType_Modified
PyType_Ready
PyType_Slot
PyType_Spec
PyType_Type
PyUnicodeDecodeError_Create
PyUnicodeDecodeError_GetEncoding
Expand Down Expand Up @@ -653,6 +689,7 @@ PyUnicode_AsEncodedObject
PyUnicode_AsEncodedString
PyUnicode_AsEncodedUnicode
PyUnicode_AsLatin1String
PyUnicode_AsMBCSString
PyUnicode_AsRawUnicodeEscapeString
PyUnicode_AsUCS4
PyUnicode_AsUCS4Copy
Expand All @@ -672,11 +709,14 @@ 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
Expand All @@ -687,6 +727,7 @@ PyUnicode_DecodeUTF7Stateful
PyUnicode_DecodeUTF8
PyUnicode_DecodeUTF8Stateful
PyUnicode_DecodeUnicodeEscape
PyUnicode_EncodeCodePage
PyUnicode_EncodeFSDefault
PyUnicode_EncodeLocale
PyUnicode_FSConverter
Expand Down Expand Up @@ -724,6 +765,8 @@ PyUnicode_Tailmatch
PyUnicode_Translate
PyUnicode_Type
PyUnicode_WriteChar
PyVarObject
PyWeakReference
PyWeakref_GetObject
PyWeakref_NewProxy
PyWeakref_NewRef
Expand All @@ -732,11 +775,14 @@ 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
Expand Down Expand Up @@ -781,6 +827,127 @@ 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
7 changes: 2 additions & 5 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -752,10 +752,7 @@ regen-importlib: Programs/_freeze_importlib


regen-limited-abi: all
@$(MKDIR_P) $(srcdir)/Doc/data/
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/stable_abi.py generate $(srcdir)/Doc/data/stable_abi.dat.new
$(UPDATE_FILE) $(srcdir)/Doc/data/stable_abi.dat \
$(srcdir)/Doc/data/stable_abi.dat.new
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/stable_abi.py --generate-all $(srcdir)/Misc/stable_abi.txt


############################################################################
Expand Down Expand Up @@ -1983,7 +1980,7 @@ patchcheck: @DEF_MAKE_RULE@
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py

check-limited-abi: all
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/stable_abi.py check $(srcdir)/Doc/data/stable_abi.dat
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/stable_abi.py --all $(srcdir)/Misc/stable_abi.txt

# Dependencies

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Stable ABI and limited API definitions are generated from a central manifest
(:pep:`652`).
Loading

0 comments on commit f6ee4da

Please sign in to comment.