]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-131238: Remove more includes from pycore_interp.h (#131480)
authorVictor Stinner <vstinner@python.org>
Wed, 19 Mar 2025 22:01:32 +0000 (23:01 +0100)
committerGitHub <noreply@github.com>
Wed, 19 Mar 2025 22:01:32 +0000 (23:01 +0100)
31 files changed:
Include/internal/pycore_ceval.h
Include/internal/pycore_interp.h
Include/internal/pycore_runtime_init.h
Modules/_ctypes/_ctypes.c
Modules/_io/textio.c
Modules/_json.c
Modules/_lsprof.c
Modules/_pickle.c
Modules/_posixsubprocess.c
Modules/_testinternalcapi.c
Modules/main.c
Modules/posixmodule.c
Objects/bytesobject.c
Objects/codeobject.c
Objects/dictobject.c
Objects/frameobject.c
Objects/genericaliasobject.c
Objects/genobject.c
Objects/moduleobject.c
Python/_warnings.c
Python/bltinmodule.c
Python/ceval.c
Python/ceval_gil.c
Python/codecs.c
Python/dynload_shlib.c
Python/import.c
Python/instrumentation.c
Python/pylifecycle.c
Python/pystate.c
Python/pythonrun.c
Python/sysmodule.c

index 436e5dc1d7dce87dfc8b3a6fdf4ba29f50cdb2ce..7d28d26d887e201d89d23652783fb2f4657755e5 100644 (file)
@@ -8,10 +8,12 @@ extern "C" {
 #  error "this header requires Py_BUILD_CORE define"
 #endif
 
-#include "dynamic_annotations.h" // _Py_ANNOTATE_RWLOCK_CREATE
+#include "dynamic_annotations.h"  // _Py_ANNOTATE_RWLOCK_CREATE
 
+#include "pycore_code.h"          // _PyCode_GetTLBCFast()
 #include "pycore_interp.h"        // PyInterpreterState.eval_frame
 #include "pycore_pystate.h"       // _PyThreadState_GET()
+#include "pycore_stats.h"         // EVAL_CALL_STAT_INC()
 #include "pycore_typedefs.h"      // _PyInterpreterFrame
 
 
index 28ec42377ad8cc3eaf619861947a086049ce3404..eb8ed2ec6ac2c779d6442c17c029adfebb16a852 100644 (file)
@@ -11,15 +11,7 @@ extern "C" {
 #include <stdbool.h>              // bool
 
 #include "pycore_runtime_structs.h"
-#include "pycore_code.h"          // struct callable_cache
-#include "pycore_floatobject.h"   // struct _Py_float_state
-#include "pycore_gc.h"            // struct _gc_runtime_state
 #include "pycore_genobject.h"     // _PyGen_FetchStopIterationValue
-#include "pycore_import.h"        // struct _import_state
-#include "pycore_optimizer.h"     // _PyExecutorObject
-#include "pycore_typeobject.h"    // struct types_state
-#include "pycore_unicodeobject.h" // struct _Py_unicode_state
-#include "pycore_warnings.h"      // struct _warnings_runtime_state
 
 
 /* interpreter state */
index 497599f6717e76aa6525d4034c7cd39bb42bcfe9..8f866fd3497be917bcdef38860300899786f401d 100644 (file)
@@ -16,6 +16,7 @@ extern "C" {
 #include "pycore_floatobject.h"   // _py_float_format_unknown
 #include "pycore_function.h"
 #include "pycore_hamt.h"          // _PyHamt_BitmapNode_Type
+#include "pycore_import.h"        // IMPORTS_INIT
 #include "pycore_object.h"        // _PyObject_HEAD_INIT
 #include "pycore_obmalloc_init.h" // _obmalloc_global_state_INIT
 #include "pycore_parser.h"        // _parser_runtime_state_INIT
index 7c0ac1a57f534cfe9a36bac6927d41afa1b23954..cc06759f2d0d5923e2d1b4e35db22eed6403bf19 100644 (file)
@@ -108,6 +108,7 @@ bytes(cdata)
 
 #include "pycore_call.h"          // _PyObject_CallNoArgs()
 #include "pycore_ceval.h"         // _Py_EnterRecursiveCall()
+#include "pycore_unicodeobject.h" // _PyUnicode_EqualToASCIIString()
 #ifdef MS_WIN32
 #  include "pycore_modsupport.h"  // _PyArg_NoKeywords()
 #endif
index e07291183228b980bc5af68f61b800e0ee6c549e..377c85f5ac67a67fe08f70baf879dc3742d37d07 100644 (file)
@@ -7,14 +7,15 @@
 */
 
 #include "Python.h"
-#include "pycore_call.h"              // _PyObject_CallMethod()
-#include "pycore_codecs.h"            // _PyCodecInfo_GetIncrementalDecoder()
-#include "pycore_fileutils.h"         // _Py_GetLocaleEncoding()
-#include "pycore_interp.h"            // PyInterpreterState.fs_codec
-#include "pycore_long.h"              // _PyLong_GetZero()
-#include "pycore_object.h"            // _PyObject_GC_UNTRACK()
-#include "pycore_pyerrors.h"          // _PyErr_ChainExceptions1()
-#include "pycore_pystate.h"           // _PyInterpreterState_GET()
+#include "pycore_call.h"          // _PyObject_CallMethod()
+#include "pycore_codecs.h"        // _PyCodecInfo_GetIncrementalDecoder()
+#include "pycore_fileutils.h"     // _Py_GetLocaleEncoding()
+#include "pycore_interp.h"        // PyInterpreterState.fs_codec
+#include "pycore_long.h"          // _PyLong_GetZero()
+#include "pycore_object.h"        // _PyObject_GC_UNTRACK()
+#include "pycore_pyerrors.h"      // _PyErr_ChainExceptions1()
+#include "pycore_pystate.h"       // _PyInterpreterState_GET()
+#include "pycore_unicodeobject.h" // _PyUnicode_AsASCIIString()
 
 #include "_iomodule.h"
 
index 7b3328a4c9145df9392c2309791c25725e7e603d..cd8e697916226b00ddbf4e4810708e4b31cf02da 100644 (file)
@@ -9,12 +9,13 @@
 #endif
 
 #include "Python.h"
-#include "pycore_ceval.h"           // _Py_EnterRecursiveCall()
-#include "pycore_runtime.h"         // _PyRuntime
-#include "pycore_pyerrors.h"        // _PyErr_FormatNote
+#include "pycore_ceval.h"         // _Py_EnterRecursiveCall()
+#include "pycore_global_strings.h" // _Py_ID()
+#include "pycore_pyerrors.h"      // _PyErr_FormatNote
+#include "pycore_runtime.h"       // _PyRuntime
+#include "pycore_unicodeobject.h" // _PyUnicode_CheckConsistency()
 
-#include "pycore_global_strings.h"  // _Py_ID()
-#include <stdbool.h>                // bool
+#include <stdbool.h>              // bool
 
 
 typedef struct _PyScannerObject {
index 39d900cb824312400437cddef7c9fc8e4b37e2a5..92190b06829f8f0a728418af5b93bbc86406e662 100644 (file)
@@ -7,6 +7,7 @@
 #include "pycore_ceval.h"         // _PyEval_SetProfile()
 #include "pycore_pystate.h"       // _PyThreadState_GET()
 #include "pycore_time.h"          // _PyTime_FromLong()
+#include "pycore_unicodeobject.h" // _PyUnicode_EqualToASCIIString()
 
 #include "rotatingtree.h"
 
index c2ae33c0fcecc11dcb3b5322fdfe1b706ec9fdab..d260f1a68f8c7041823a7bd518095fe815b9974b 100644 (file)
@@ -9,17 +9,18 @@
 #endif
 
 #include "Python.h"
-#include "pycore_bytesobject.h"       // _PyBytesWriter
-#include "pycore_ceval.h"             // _Py_EnterRecursiveCall()
-#include "pycore_critical_section.h"  // Py_BEGIN_CRITICAL_SECTION()
-#include "pycore_long.h"              // _PyLong_AsByteArray()
-#include "pycore_moduleobject.h"      // _PyModule_GetState()
-#include "pycore_object.h"            // _PyNone_Type
-#include "pycore_pyerrors.h"          // _PyErr_FormatNote
-#include "pycore_pystate.h"           // _PyThreadState_GET()
-#include "pycore_runtime.h"           // _Py_ID()
-#include "pycore_setobject.h"         // _PySet_NextEntry()
-#include "pycore_sysmodule.h"         // _PySys_GetSizeOf()
+#include "pycore_bytesobject.h"   // _PyBytesWriter
+#include "pycore_ceval.h"         // _Py_EnterRecursiveCall()
+#include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION()
+#include "pycore_long.h"          // _PyLong_AsByteArray()
+#include "pycore_moduleobject.h"  // _PyModule_GetState()
+#include "pycore_object.h"        // _PyNone_Type
+#include "pycore_pyerrors.h"      // _PyErr_FormatNote
+#include "pycore_pystate.h"       // _PyThreadState_GET()
+#include "pycore_runtime.h"       // _Py_ID()
+#include "pycore_setobject.h"     // _PySet_NextEntry()
+#include "pycore_sysmodule.h"     // _PySys_GetSizeOf()
+#include "pycore_unicodeobject.h" // _PyUnicode_EqualToASCIIString()
 
 #include <stdlib.h>               // strtol()
 
index 8f4b57017635f8f5cceca4292529e36a3cda3483..1085e36cfe09b2616146252d791a748c41ba5814 100644 (file)
@@ -4,6 +4,7 @@
 #endif
 
 #include "Python.h"
+#include "pycore_fileutils.h"     // _Py_set_inheritable_async_safe()
 #include "pycore_interp.h"        // _PyInterpreterState_GetFinalizing()
 #include "pycore_pystate.h"       // _PyInterpreterState_GET()
 #include "pycore_signal.h"        // _Py_RestoreSignals()
index c03652259d0e503d7c7d560b64b02d8261c7fe68..f927d13fc75e7643de0d890da90a3772d5c21df6 100644 (file)
@@ -23,6 +23,7 @@
 #include "pycore_frame.h"         // _PyInterpreterFrame
 #include "pycore_gc.h"            // PyGC_Head
 #include "pycore_hashtable.h"     // _Py_hashtable_new()
+#include "pycore_import.h"        // _PyImport_ClearExtension()
 #include "pycore_initconfig.h"    // _Py_GetConfigsAsDict()
 #include "pycore_instruction_sequence.h"  // _PyInstructionSequence_New()
 #include "pycore_object.h"        // _PyObject_IsFreed()
@@ -31,6 +32,7 @@
 #include "pycore_pyerrors.h"      // _PyErr_ChainExceptions1()
 #include "pycore_pylifecycle.h"   // _PyInterpreterConfig_AsDict()
 #include "pycore_pystate.h"       // _PyThreadState_GET()
+#include "pycore_unicodeobject.h" // _PyUnicode_TransformDecimalAndSpaceToASCII()
 
 #include "clinic/_testinternalcapi.c.h"
 
index 0aebce0d3b7aa237c33d3aacdcdc1cc05a618910..3fda4fb4732bb1b1019cb3a7a099e47645514262 100644 (file)
@@ -2,6 +2,8 @@
 
 #include "Python.h"
 #include "pycore_call.h"          // _PyObject_CallNoArgs()
+#include "pycore_fileutils.h"     // struct _Py_stat_struct
+#include "pycore_import.h"        // _PyImport_Fini2()
 #include "pycore_initconfig.h"    // _PyArgv
 #include "pycore_interp.h"        // _PyInterpreterState.sysdict
 #include "pycore_long.h"          // _PyLong_GetOne()
index 25ebc98435c5da5d41fbf1af7c141b484505390c..ff798e8a19c0b53549fe9cc70c0678b8314b5b3f 100644 (file)
@@ -18,6 +18,7 @@
 #include "pycore_call.h"          // _PyObject_CallNoArgs()
 #include "pycore_ceval.h"         // _PyEval_ReInitThreads()
 #include "pycore_fileutils.h"     // _Py_closerange()
+#include "pycore_import.h"        // _PyImport_AcquireLock()
 #include "pycore_initconfig.h"    // _PyStatus_EXCEPTION()
 #include "pycore_long.h"          // _PyLong_IsNegative()
 #include "pycore_moduleobject.h"  // _PyModule_GetState()
index 1615571035853c4cd2d52b95b260b5fb9353b415..bdb389eb25823ed8ad1c1d39e8ec307600207040 100644 (file)
@@ -13,6 +13,7 @@
 #include "pycore_object.h"        // _PyObject_GC_TRACK
 #include "pycore_pymem.h"         // PYMEM_CLEANBYTE
 #include "pycore_strhex.h"        // _Py_strhex_with_sep()
+#include "pycore_unicodeobject.h" // _PyUnicode_FormatLong()
 
 #include <stddef.h>
 
index 90f0bfb7b92b7ed0859b8cb25e0fdfbfbba1b12f..f06b19b2fb775d907139d9de3939d12333c5a42f 100644 (file)
 #include "pycore_pystate.h"       // _PyInterpreterState_GET()
 #include "pycore_setobject.h"     // _PySet_NextEntry()
 #include "pycore_tuple.h"         // _PyTuple_ITEMS()
+#include "pycore_unicodeobject.h" // _PyUnicode_InternImmortal()
 #include "pycore_uniqueid.h"      // _PyObject_AssignUniqueId()
-#include "clinic/codeobject.c.h"
 
+#include "clinic/codeobject.c.h"
 #include <stdbool.h>
 
+
 #define INITIAL_SPECIALIZED_CODE_SIZE 16
 
 static const char *
index 254c1317e9031cee480b11705b3a2d3ab6039b2b..614c12bb250adadcaba6af00d2052f43c3da970b 100644 (file)
@@ -116,23 +116,25 @@ As a consequence of this, split keys have a maximum size of 16.
 #define PyDict_MINSIZE 8
 
 #include "Python.h"
-#include "pycore_bitutils.h"             // _Py_bit_length
-#include "pycore_call.h"                 // _PyObject_CallNoArgs()
-#include "pycore_ceval.h"                // _PyEval_GetBuiltin()
-#include "pycore_code.h"                 // stats
-#include "pycore_critical_section.h"     // Py_BEGIN_CRITICAL_SECTION, Py_END_CRITICAL_SECTION
-#include "pycore_dict.h"                 // export _PyDict_SizeOf()
-#include "pycore_freelist.h"             // _PyFreeListState_GET()
-#include "pycore_gc.h"                   // _PyObject_GC_IS_TRACKED()
-#include "pycore_object.h"               // _PyObject_GC_TRACK(), _PyDebugAllocatorStats()
+#include "pycore_bitutils.h"      // _Py_bit_length
+#include "pycore_call.h"          // _PyObject_CallNoArgs()
+#include "pycore_ceval.h"         // _PyEval_GetBuiltin()
+#include "pycore_code.h"          // stats
+#include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION, Py_END_CRITICAL_SECTION
+#include "pycore_dict.h"          // export _PyDict_SizeOf()
+#include "pycore_freelist.h"      // _PyFreeListState_GET()
+#include "pycore_gc.h"            // _PyObject_GC_IS_TRACKED()
+#include "pycore_object.h"        // _PyObject_GC_TRACK(), _PyDebugAllocatorStats()
 #include "pycore_pyatomic_ft_wrappers.h" // FT_ATOMIC_LOAD_SSIZE_RELAXED
-#include "pycore_pyerrors.h"             // _PyErr_GetRaisedException()
-#include "pycore_pystate.h"              // _PyThreadState_GET()
-#include "pycore_setobject.h"            // _PySet_NextEntry()
-#include "stringlib/eq.h"                // unicode_eq()
+#include "pycore_pyerrors.h"      // _PyErr_GetRaisedException()
+#include "pycore_pystate.h"       // _PyThreadState_GET()
+#include "pycore_setobject.h"     // _PySet_NextEntry()
+#include "pycore_unicodeobject.h" // _PyUnicode_InternImmortal()
 
+#include "stringlib/eq.h"                // unicode_eq()
 #include <stdbool.h>
 
+
 /*[clinic input]
 class dict "PyDictObject *" "&PyDict_Type"
 [clinic start generated code]*/
index 152005a19a8565795bc0331a55d92b287e394743..665199f7436ee8565bcb0643cd6050753bace8d7 100644 (file)
@@ -7,10 +7,12 @@
 #include "pycore_function.h"      // _PyFunction_FromConstructor()
 #include "pycore_genobject.h"     // _PyGen_GetGeneratorFromFrame()
 #include "pycore_moduleobject.h"  // _PyModule_GetDict()
+#include "pycore_cell.h"          // PyCell_GetRef() PyCell_SetTakeRef()
 #include "pycore_modsupport.h"    // _PyArg_CheckPositional()
 #include "pycore_object.h"        // _PyObject_GC_UNTRACK()
-#include "pycore_cell.h"          // PyCell_GetRef() PyCell_SetTakeRef()
 #include "pycore_opcode_metadata.h" // _PyOpcode_Deopt, _PyOpcode_Caches
+#include "pycore_optimizer.h"     // _Py_Executors_InvalidateDependency()
+#include "pycore_unicodeobject.h" // _PyUnicode_Equal()
 
 
 #include "frameobject.h"          // PyFrameObject
index 8e6bc31a05e13430c8d1d1f79f3e6ea3628be140..a56ed908d711331962bbe58825af24975ae1afda 100644 (file)
@@ -5,6 +5,7 @@
 #include "pycore_modsupport.h"    // _PyArg_NoKeywords()
 #include "pycore_object.h"
 #include "pycore_typevarobject.h" // _Py_typing_type_repr
+#include "pycore_unicodeobject.h" // _PyUnicode_EqualToASCIIString()
 #include "pycore_unionobject.h"   // _Py_union_type_or, _PyGenericAlias_Check
 
 
index 005f1a13c4b4c241bda3edab250e690a3ba44acd..0669dba1f36c1bc3297978025dd53d3f2991d438 100644 (file)
@@ -16,6 +16,7 @@
 #include "pycore_pyatomic_ft_wrappers.h" // FT_ATOMIC_*
 #include "pycore_pyerrors.h"      // _PyErr_ClearExcState()
 #include "pycore_pystate.h"       // _PyThreadState_GET()
+#include "pycore_warnings.h"      // _PyErr_WarnUnawaitedCoroutine()
 
 // Forward declarations
 static PyObject* gen_close(PyObject *, PyObject *);
index 1af3ce6fe9bf656da754b8594c7045e732318af9..2412f994d4bf51eece5d6db9795eaef34a296a1f 100644 (file)
@@ -5,6 +5,7 @@
 #include "pycore_call.h"          // _PyObject_CallNoArgs()
 #include "pycore_dict.h"          // _PyDict_EnablePerThreadRefcounting()
 #include "pycore_fileutils.h"     // _Py_wgetcwd
+#include "pycore_import.h"        // _PyImport_GetNextModuleIndex()
 #include "pycore_interp.h"        // PyInterpreterState.importlib
 #include "pycore_long.h"          // _PyLong_GetOne()
 #include "pycore_modsupport.h"    // _PyModule_CreateInitialized()
@@ -13,6 +14,7 @@
 #include "pycore_pyerrors.h"      // _PyErr_FormatFromCause()
 #include "pycore_pystate.h"       // _PyInterpreterState_GET()
 #include "pycore_sysmodule.h"     // _PySys_GetOptionalAttrString()
+#include "pycore_unicodeobject.h" // _PyUnicode_EqualToASCIIString()
 
 #include "osdefs.h"               // MAXPATHLEN
 
index 64a6e1dea31fcdfe2f1034a8403cd23acc0967f1..3271768e6f68f9e8b5e1631f9218104528150f1d 100644 (file)
@@ -1,6 +1,7 @@
 #include "Python.h"
 #include "pycore_critical_section.h"  // Py_BEGIN_CRITICAL_SECTION_MUT()
 #include "pycore_frame.h"         // PyFrameObject members
+#include "pycore_import.h"        // _PyImport_GetModules()
 #include "pycore_interp.h"        // PyInterpreterState.warnings
 #include "pycore_long.h"          // _PyLong_GetZero()
 #include "pycore_pyerrors.h"      // _PyErr_Occurred()
@@ -8,11 +9,12 @@
 #include "pycore_pystate.h"       // _PyThreadState_GET()
 #include "pycore_sysmodule.h"     // _PySys_GetOptionalAttr()
 #include "pycore_traceback.h"     // _Py_DisplaySourceLine()
+#include "pycore_unicodeobject.h" // _PyUnicode_EqualToASCIIString()
 
 #include <stdbool.h>
-
 #include "clinic/_warnings.c.h"
 
+
 #define MODULE_NAME "_warnings"
 
 PyDoc_STRVAR(warnings__doc__,
index 1b87e6e0b6c7e4be60e16181e6043192a34611e0..6709f306bb024d0978d0e18f00476cf520b87477 100644 (file)
@@ -6,6 +6,7 @@
 #include "pycore_ceval.h"         // _PyEval_Vector()
 #include "pycore_compile.h"       // _PyAST_Compile()
 #include "pycore_fileutils.h"     // _PyFile_Flush
+#include "pycore_floatobject.h"   // _PyFloat_ExactDealloc()
 #include "pycore_interp.h"        // _PyInterpreterState_GetConfig()
 #include "pycore_long.h"          // _PyLong_CompactValue
 #include "pycore_modsupport.h"    // _PyArg_NoKwnames()
index 7248e0bbc0e1bd21c1ac8e13a0fcd4c13d952165..42f5eaddd2e5108f8643f1f7696e9b21a891fad3 100644 (file)
@@ -11,7 +11,9 @@
 #include "pycore_ceval.h"
 #include "pycore_code.h"
 #include "pycore_emscripten_signal.h"  // _Py_CHECK_EMSCRIPTEN_SIGNALS
+#include "pycore_floatobject.h"   // _PyFloat_ExactDealloc()
 #include "pycore_function.h"
+#include "pycore_import.h"        // _PyImport_IsDefaultImportFunc()
 #include "pycore_instruments.h"
 #include "pycore_intrinsics.h"
 #include "pycore_jit.h"
index 2c1cc17b2ffa13b84626dfa2947a75f07cd2e826..a382aa6f1e1a0952fd5bfb24863e22ca93b7e8ac 100644 (file)
@@ -3,12 +3,14 @@
 #include "pycore_ceval.h"         // _PyEval_SignalReceived()
 #include "pycore_initconfig.h"    // _PyStatus_OK()
 #include "pycore_interp.h"        // _Py_RunGC()
+#include "pycore_optimizer.h"     // _Py_Executors_InvalidateCold()
 #include "pycore_pyerrors.h"      // _PyErr_GetRaisedException()
 #include "pycore_pylifecycle.h"   // _PyErr_Print()
 #include "pycore_pymem.h"         // _PyMem_IsPtrFreed()
 #include "pycore_pystate.h"       // PyThread_hang_thread()
 #include "pycore_pystats.h"       // _Py_PrintSpecializationStats()
 
+
 /*
    Notes about the implementation:
 
index 51f4beb84669c8143efd16a9ebc94c8a7d4804a9..265f5214e5bad25f906ab3aecd5054e8cc8df588 100644 (file)
@@ -15,6 +15,7 @@ Copyright (c) Corporation for National Research Initiatives.
 #include "pycore_pystate.h"       // _PyInterpreterState_GET()
 #include "pycore_runtime.h"       // _Py_ID()
 #include "pycore_ucnhash.h"       // _PyUnicode_Name_CAPI
+#include "pycore_unicodeobject.h" // _PyUnicode_InternMortal()
 
 
 static const char *codecs_builtin_error_handlers[] = {
index 5a37a83805ba7895b02bf18b0a984522a2580184..583c9b752dfd9000c746c7534e06ee1ab2954dc2 100644 (file)
@@ -2,9 +2,11 @@
 /* Support for dynamic loading of extension modules */
 
 #include "Python.h"
-#include "pycore_interp.h"    // _PyInterpreterState.dlopenflags
-#include "pycore_pystate.h"   // _PyInterpreterState_GET()
+#include "pycore_fileutils.h"     // struct _Py_stat_struct
+#include "pycore_import.h"        // _PyImport_GetDLOpenFlags()
 #include "pycore_importdl.h"
+#include "pycore_interp.h"        // _PyInterpreterState.dlopenflags
+#include "pycore_pystate.h"       // _PyInterpreterState_GET()
 
 #include <sys/types.h>
 #include <sys/stat.h>
index 690793edb807f426eb48cfb31b69e4905f740fdc..8742b6ec767c9bceb946e891b3b504900680fb02 100644 (file)
@@ -18,6 +18,7 @@
 #include "pycore_pystate.h"       // _PyInterpreterState_GET()
 #include "pycore_sysmodule.h"     // _PySys_ClearAttrString()
 #include "pycore_time.h"          // _PyTime_AsMicroseconds()
+#include "pycore_unicodeobject.h" // _PyUnicode_AsUTF8NoNUL()
 #include "pycore_weakref.h"       // _PyWeakref_GET_REF()
 
 #include "marshal.h"              // PyMarshal_ReadObjectFromString()
index 56035d6ae5a5981c1784094c8c8433323a489243..031c450bb600ba7802cd5cd427e27925160199f5 100644 (file)
@@ -12,6 +12,7 @@
 #include "pycore_object.h"
 #include "pycore_opcode_metadata.h" // IS_VALID_OPCODE, _PyOpcode_Caches
 #include "pycore_opcode_utils.h" // IS_CONDITIONAL_JUMP_OPCODE
+#include "pycore_optimizer.h"     // _PyExecutorObject
 #include "pycore_pyatomic_ft_wrappers.h" // FT_ATOMIC_STORE_UINTPTR_RELEASE
 #include "pycore_pyerrors.h"
 #include "pycore_pystate.h"       // _PyInterpreterState_GET()
index 0513d614c6e1ef67fe0d85f88bf8490d8529233a..12a48316cbc243873b341e4c08669b20ceb99fd9 100644 (file)
@@ -1,8 +1,6 @@
 /* Python interpreter top-level routines, including init/exit */
 
 #include "Python.h"
-#include "pycore_runtime_structs.h"
-#include "pycore_unicodeobject.h"
 #include "pycore_audit.h"         // _PySys_ClearAuditHooks()
 #include "pycore_call.h"          // _PyObject_CallMethod()
 #include "pycore_ceval.h"         // _PyEval_FiniGIL()
 #include "pycore_dict.h"          // _PyDict_Fini()
 #include "pycore_exceptions.h"    // _PyExc_InitTypes()
 #include "pycore_fileutils.h"     // _Py_ResetForceASCII()
-#include "pycore_freelist.h"      // _PyObject_ClearFreeLists()
 #include "pycore_floatobject.h"   // _PyFloat_InitTypes()
-#include "pycore_global_objects_fini_generated.h"  // "_PyStaticObjects_CheckRefcnt()
+#include "pycore_freelist.h"      // _PyObject_ClearFreeLists()
+#include "pycore_global_objects_fini_generated.h"  // _PyStaticObjects_CheckRefcnt()
 #include "pycore_hamt.h"          // _PyHamt_Type
 #include "pycore_import.h"        // _PyImport_BootstrapImp()
 #include "pycore_initconfig.h"    // _PyStatus_OK()
 #include "pycore_list.h"          // _PyList_Fini()
 #include "pycore_long.h"          // _PyLong_InitTypes()
 #include "pycore_object.h"        // _PyDebug_PrintTotalRefs()
+#include "pycore_obmalloc.h"      // _PyMem_init_obmalloc()
 #include "pycore_pathconfig.h"    // _PyPathConfig_UpdateGlobal()
 #include "pycore_pyerrors.h"      // _PyErr_Occurred()
 #include "pycore_pylifecycle.h"   // _PyErr_Print()
 #include "pycore_pystate.h"       // _PyThreadState_GET()
 #include "pycore_runtime.h"       // _Py_ID()
 #include "pycore_runtime_init.h"  // _PyRuntimeState_INIT
+#include "pycore_runtime_structs.h"
 #include "pycore_setobject.h"     // _PySet_NextEntry()
 #include "pycore_sliceobject.h"   // _PySlice_Fini()
 #include "pycore_sysmodule.h"     // _PySys_ClearAttrString()
 #include "pycore_traceback.h"     // _Py_DumpTracebackThreads()
-#include "pycore_uniqueid.h"      // _PyObject_FinalizeUniqueIdPool()
 #include "pycore_typeobject.h"    // _PyTypes_InitTypes()
 #include "pycore_typevarobject.h" // _Py_clear_generic_types()
 #include "pycore_unicodeobject.h" // _PyUnicode_InitTypes()
+#include "pycore_uniqueid.h"      // _PyObject_FinalizeUniqueIdPool()
+#include "pycore_warnings.h"      // _PyWarnings_InitState()
 #include "pycore_weakref.h"       // _PyWeakref_GET_REF()
-#include "pycore_obmalloc.h"      // _PyMem_init_obmalloc()
 
 #include "opcode.h"
 
index 3aec10219b038242772a1cd2fff012b6b9466747..c755e0d9f27cc78a067e3077f20f6374487b0429 100644 (file)
@@ -16,6 +16,7 @@
 #include "pycore_freelist.h"      // _PyObject_ClearFreeLists()
 #include "pycore_initconfig.h"    // _PyStatus_OK()
 #include "pycore_object.h"        // _PyType_InitCache()
+#include "pycore_optimizer.h"     // JIT_CLEANUP_THRESHOLD
 #include "pycore_parking_lot.h"   // _PyParkingLot_AfterFork()
 #include "pycore_pyerrors.h"      // _PyErr_Clear()
 #include "pycore_pylifecycle.h"   // _PyAST_Fini()
index 6e24131e5b1113c47401e775ae253d99371df59e..23af8b6f6be8e8d6ffebcfcd7701e9c8bddb9d3b 100644 (file)
@@ -15,6 +15,7 @@
 #include "pycore_ceval.h"         // _Py_EnterRecursiveCall()
 #include "pycore_compile.h"       // _PyAST_Compile()
 #include "pycore_fileutils.h"     // _PyFile_Flush
+#include "pycore_import.h"        // _PyImport_GetImportlibExternalLoader()
 #include "pycore_interp.h"        // PyInterpreterState.importlib
 #include "pycore_object.h"        // _PyDebug_PrintTotalRefs()
 #include "pycore_parser.h"        // _PyParser_ASTFromString()
@@ -24,6 +25,7 @@
 #include "pycore_pythonrun.h"     // export _PyRun_InteractiveLoopObject()
 #include "pycore_sysmodule.h"     // _PySys_SetAttr()
 #include "pycore_traceback.h"     // _PyTraceBack_Print()
+#include "pycore_unicodeobject.h" // _PyUnicode_Equal()
 
 #include "errcode.h"              // E_EOF
 #include "marshal.h"              // PyMarshal_ReadLongFromFile()
index adaa5ee1c74aa593b7c1b3064e05bf0f1e453488..c06ae90ee2bd11e4e36276b5edc5916e6a550f86 100644 (file)
@@ -20,11 +20,13 @@ Data members:
 #include "pycore_ceval.h"         // _PyEval_SetAsyncGenFinalizer()
 #include "pycore_dict.h"          // _PyDict_GetItemWithError()
 #include "pycore_frame.h"         // _PyInterpreterFrame
+#include "pycore_import.h"        // _PyImport_SetDLOpenFlags()
 #include "pycore_initconfig.h"    // _PyStatus_EXCEPTION()
 #include "pycore_long.h"          // _PY_LONG_MAX_STR_DIGITS_THRESHOLD
 #include "pycore_modsupport.h"    // _PyModule_CreateInitialized()
 #include "pycore_namespace.h"     // _PyNamespace_New()
 #include "pycore_object.h"        // _PyObject_DebugTypeStats()
+#include "pycore_optimizer.h"     // _PyDumpExecutors()
 #include "pycore_pathconfig.h"    // _PyPathConfig_ComputeSysPath0()
 #include "pycore_pyerrors.h"      // _PyErr_GetRaisedException()
 #include "pycore_pylifecycle.h"   // _PyErr_WriteUnraisableDefaultHook()
@@ -35,6 +37,7 @@ Data members:
 #include "pycore_structseq.h"     // _PyStructSequence_InitBuiltinWithFlags()
 #include "pycore_sysmodule.h"     // export _PySys_GetSizeOf()
 #include "pycore_tuple.h"         // _PyTuple_FromArray()
+#include "pycore_unicodeobject.h" // _PyUnicode_InternImmortal()
 
 #include "pydtrace.h"             // PyDTrace_AUDIT()
 #include "osdefs.h"               // DELIM