Skip to content

Commit f6ee4da

Browse files
authored
bpo-43795: Generate python3dll.c and doc data from manifest (PEP 652) (GH-25315)
1 parent 645ed62 commit f6ee4da

File tree

7 files changed

+2844
-139
lines changed

7 files changed

+2844
-139
lines changed

Doc/data/stable_abi.dat

Lines changed: 169 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
# File generated by 'make regen-limited-abi'
2-
# This is NOT an authoritative list of stable ABI symbols
1+
# Generated by Tools/scripts/stable_abi.py
2+
3+
METH_CLASS
4+
METH_COEXIST
5+
METH_FASTCALL
6+
METH_METHOD
7+
METH_NOARGS
8+
METH_O
9+
METH_STATIC
10+
METH_VARARGS
311
PyAiter_Check
412
PyArg_Parse
513
PyArg_ParseTuple
@@ -33,6 +41,8 @@ PyBytes_FromStringAndSize
3341
PyBytes_Repr
3442
PyBytes_Size
3543
PyBytes_Type
44+
PyCFunction
45+
PyCFunctionWithKeywords
3646
PyCFunction_Call
3747
PyCFunction_GetFlags
3848
PyCFunction_GetFunction
@@ -44,6 +54,7 @@ PyCMethod_New
4454
PyCallIter_New
4555
PyCallIter_Type
4656
PyCallable_Check
57+
PyCapsule_Destructor
4758
PyCapsule_GetContext
4859
PyCapsule_GetDestructor
4960
PyCapsule_GetName
@@ -138,11 +149,17 @@ PyErr_PrintEx
138149
PyErr_ProgramText
139150
PyErr_ResourceWarning
140151
PyErr_Restore
152+
PyErr_SetExcFromWindowsErr
153+
PyErr_SetExcFromWindowsErrWithFilename
154+
PyErr_SetExcFromWindowsErrWithFilenameObject
155+
PyErr_SetExcFromWindowsErrWithFilenameObjects
141156
PyErr_SetExcInfo
142157
PyErr_SetFromErrno
143158
PyErr_SetFromErrnoWithFilename
144159
PyErr_SetFromErrnoWithFilenameObject
145160
PyErr_SetFromErrnoWithFilenameObjects
161+
PyErr_SetFromWindowsErr
162+
PyErr_SetFromWindowsErrWithFilename
146163
PyErr_SetImportError
147164
PyErr_SetImportErrorSubclass
148165
PyErr_SetInterrupt
@@ -243,6 +260,7 @@ PyExc_UnicodeWarning
243260
PyExc_UserWarning
244261
PyExc_ValueError
245262
PyExc_Warning
263+
PyExc_WindowsError
246264
PyExc_ZeroDivisionError
247265
PyExceptionClass_Name
248266
PyException_GetCause
@@ -274,6 +292,8 @@ PyGC_IsEnabled
274292
PyGILState_Ensure
275293
PyGILState_GetThisThreadState
276294
PyGILState_Release
295+
PyGILState_STATE
296+
PyGetSetDef
277297
PyGetSetDescr_Type
278298
PyImport_AddModule
279299
PyImport_AddModuleObject
@@ -296,6 +316,7 @@ PyImport_ImportModuleLevelObject
296316
PyImport_ImportModuleNoBlock
297317
PyImport_ReloadModule
298318
PyIndex_Check
319+
PyInterpreterState
299320
PyInterpreterState_Clear
300321
PyInterpreterState_Delete
301322
PyInterpreterState_Get
@@ -319,6 +340,7 @@ PyList_SetSlice
319340
PyList_Size
320341
PyList_Sort
321342
PyList_Type
343+
PyLongObject
322344
PyLongRangeIter_Type
323345
PyLong_AsDouble
324346
PyLong_AsLong
@@ -358,12 +380,16 @@ PyMem_Calloc
358380
PyMem_Free
359381
PyMem_Malloc
360382
PyMem_Realloc
383+
PyMemberDef
361384
PyMemberDescr_Type
362385
PyMemoryView_FromMemory
363386
PyMemoryView_FromObject
364387
PyMemoryView_GetContiguous
365388
PyMemoryView_Type
389+
PyMethodDef
366390
PyMethodDescr_Type
391+
PyModuleDef
392+
PyModuleDef_Base
367393
PyModuleDef_Init
368394
PyModuleDef_Type
369395
PyModule_AddFunctions
@@ -427,18 +453,22 @@ PyOS_AfterFork
427453
PyOS_AfterFork_Child
428454
PyOS_AfterFork_Parent
429455
PyOS_BeforeFork
456+
PyOS_CheckStack
430457
PyOS_FSPath
458+
PyOS_InputHook
431459
PyOS_InterruptOccurred
432460
PyOS_double_to_string
433461
PyOS_getsig
434462
PyOS_mystricmp
435463
PyOS_mystrnicmp
436464
PyOS_setsig
465+
PyOS_sighandler_t
437466
PyOS_snprintf
438467
PyOS_string_to_double
439468
PyOS_strtol
440469
PyOS_strtoul
441470
PyOS_vsnprintf
471+
PyObject
442472
PyObject_ASCII
443473
PyObject_AsFileDescriptor
444474
PyObject_Bytes
@@ -537,6 +567,8 @@ PySlice_Unpack
537567
PyState_AddModule
538568
PyState_FindModule
539569
PyState_RemoveModule
570+
PyStructSequence_Desc
571+
PyStructSequence_Field
540572
PyStructSequence_GetItem
541573
PyStructSequence_New
542574
PyStructSequence_NewType
@@ -557,6 +589,7 @@ PySys_SetObject
557589
PySys_SetPath
558590
PySys_WriteStderr
559591
PySys_WriteStdout
592+
PyThreadState
560593
PyThreadState_Clear
561594
PyThreadState_Delete
562595
PyThreadState_Get
@@ -604,6 +637,7 @@ PyTuple_Pack
604637
PyTuple_SetItem
605638
PyTuple_Size
606639
PyTuple_Type
640+
PyTypeObject
607641
PyType_ClearCache
608642
PyType_FromModuleAndSpec
609643
PyType_FromSpec
@@ -617,6 +651,8 @@ PyType_GetSlot
617651
PyType_IsSubtype
618652
PyType_Modified
619653
PyType_Ready
654+
PyType_Slot
655+
PyType_Spec
620656
PyType_Type
621657
PyUnicodeDecodeError_Create
622658
PyUnicodeDecodeError_GetEncoding
@@ -653,6 +689,7 @@ PyUnicode_AsEncodedObject
653689
PyUnicode_AsEncodedString
654690
PyUnicode_AsEncodedUnicode
655691
PyUnicode_AsLatin1String
692+
PyUnicode_AsMBCSString
656693
PyUnicode_AsRawUnicodeEscapeString
657694
PyUnicode_AsUCS4
658695
PyUnicode_AsUCS4Copy
@@ -672,11 +709,14 @@ PyUnicode_Count
672709
PyUnicode_Decode
673710
PyUnicode_DecodeASCII
674711
PyUnicode_DecodeCharmap
712+
PyUnicode_DecodeCodePageStateful
675713
PyUnicode_DecodeFSDefault
676714
PyUnicode_DecodeFSDefaultAndSize
677715
PyUnicode_DecodeLatin1
678716
PyUnicode_DecodeLocale
679717
PyUnicode_DecodeLocaleAndSize
718+
PyUnicode_DecodeMBCS
719+
PyUnicode_DecodeMBCSStateful
680720
PyUnicode_DecodeRawUnicodeEscape
681721
PyUnicode_DecodeUTF16
682722
PyUnicode_DecodeUTF16Stateful
@@ -687,6 +727,7 @@ PyUnicode_DecodeUTF7Stateful
687727
PyUnicode_DecodeUTF8
688728
PyUnicode_DecodeUTF8Stateful
689729
PyUnicode_DecodeUnicodeEscape
730+
PyUnicode_EncodeCodePage
690731
PyUnicode_EncodeFSDefault
691732
PyUnicode_EncodeLocale
692733
PyUnicode_FSConverter
@@ -724,6 +765,8 @@ PyUnicode_Tailmatch
724765
PyUnicode_Translate
725766
PyUnicode_Type
726767
PyUnicode_WriteChar
768+
PyVarObject
769+
PyWeakReference
727770
PyWeakref_GetObject
728771
PyWeakref_NewProxy
729772
PyWeakref_NewRef
@@ -732,11 +775,14 @@ PyWrapper_New
732775
PyZip_Type
733776
Py_AddPendingCall
734777
Py_AtExit
778+
Py_BEGIN_ALLOW_THREADS
779+
Py_BLOCK_THREADS
735780
Py_BuildValue
736781
Py_BytesMain
737782
Py_CompileString
738783
Py_DecRef
739784
Py_DecodeLocale
785+
Py_END_ALLOW_THREADS
740786
Py_EncodeLocale
741787
Py_EndInterpreter
742788
Py_EnterRecursiveCall
@@ -781,6 +827,127 @@ Py_SetPath
781827
Py_SetProgramName
782828
Py_SetPythonHome
783829
Py_SetRecursionLimit
830+
Py_TPFLAGS_BASETYPE
831+
Py_TPFLAGS_DEFAULT
832+
Py_TPFLAGS_HAVE_GC
833+
Py_TPFLAGS_METHOD_DESCRIPTOR
834+
Py_UCS4
835+
Py_UNBLOCK_THREADS
784836
Py_UTF8Mode
785837
Py_VaBuildValue
786838
Py_XNewRef
839+
Py_am_aiter
840+
Py_am_anext
841+
Py_am_await
842+
Py_am_send
843+
Py_intptr_t
844+
Py_mp_ass_subscript
845+
Py_mp_length
846+
Py_mp_subscript
847+
Py_nb_absolute
848+
Py_nb_add
849+
Py_nb_and
850+
Py_nb_bool
851+
Py_nb_divmod
852+
Py_nb_float
853+
Py_nb_floor_divide
854+
Py_nb_index
855+
Py_nb_inplace_add
856+
Py_nb_inplace_and
857+
Py_nb_inplace_floor_divide
858+
Py_nb_inplace_lshift
859+
Py_nb_inplace_matrix_multiply
860+
Py_nb_inplace_multiply
861+
Py_nb_inplace_or
862+
Py_nb_inplace_power
863+
Py_nb_inplace_remainder
864+
Py_nb_inplace_rshift
865+
Py_nb_inplace_subtract
866+
Py_nb_inplace_true_divide
867+
Py_nb_inplace_xor
868+
Py_nb_int
869+
Py_nb_invert
870+
Py_nb_lshift
871+
Py_nb_matrix_multiply
872+
Py_nb_multiply
873+
Py_nb_negative
874+
Py_nb_or
875+
Py_nb_positive
876+
Py_nb_power
877+
Py_nb_remainder
878+
Py_nb_rshift
879+
Py_nb_subtract
880+
Py_nb_true_divide
881+
Py_nb_xor
882+
Py_sq_ass_item
883+
Py_sq_concat
884+
Py_sq_contains
885+
Py_sq_inplace_concat
886+
Py_sq_inplace_repeat
887+
Py_sq_item
888+
Py_sq_length
889+
Py_sq_repeat
890+
Py_ssize_t
891+
Py_tp_alloc
892+
Py_tp_base
893+
Py_tp_bases
894+
Py_tp_call
895+
Py_tp_clear
896+
Py_tp_dealloc
897+
Py_tp_del
898+
Py_tp_descr_get
899+
Py_tp_descr_set
900+
Py_tp_doc
901+
Py_tp_finalize
902+
Py_tp_free
903+
Py_tp_getattr
904+
Py_tp_getattro
905+
Py_tp_getset
906+
Py_tp_hash
907+
Py_tp_init
908+
Py_tp_is_gc
909+
Py_tp_iter
910+
Py_tp_iternext
911+
Py_tp_members
912+
Py_tp_methods
913+
Py_tp_new
914+
Py_tp_repr
915+
Py_tp_richcompare
916+
Py_tp_setattr
917+
Py_tp_setattro
918+
Py_tp_str
919+
Py_tp_traverse
920+
Py_uintptr_t
921+
_frame
922+
_node
923+
allocfunc
924+
binaryfunc
925+
descrgetfunc
926+
descrsetfunc
927+
destructor
928+
getattrfunc
929+
getattrofunc
930+
getiterfunc
931+
getter
932+
hashfunc
933+
initproc
934+
inquiry
935+
iternextfunc
936+
lenfunc
937+
newfunc
938+
objobjargproc
939+
objobjproc
940+
reprfunc
941+
richcmpfunc
942+
setattrfunc
943+
setattrofunc
944+
setter
945+
ssizeargfunc
946+
ssizeobjargproc
947+
ssizessizeargfunc
948+
ssizessizeobjargproc
949+
symtable
950+
ternaryfunc
951+
traverseproc
952+
unaryfunc
953+
visitproc

Makefile.pre.in

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -752,10 +752,7 @@ regen-importlib: Programs/_freeze_importlib
752752

753753

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

760757

761758
############################################################################
@@ -1983,7 +1980,7 @@ patchcheck: @DEF_MAKE_RULE@
19831980
$(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
19841981

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

19881985
# Dependencies
19891986

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Stable ABI and limited API definitions are generated from a central manifest
2+
(:pep:`652`).

0 commit comments

Comments
 (0)