gh-106320: Remove private pylifecycle.h functions (#106400)

Remove private pylifecycle.h functions: move them to the internal C
API ( pycore_atexit.h, pycore_pylifecycle.h and pycore_signal.h). No
longer export most of these functions.

Move _testcapi.test_atexit() to _testinternalcapi.
This commit is contained in:
Victor Stinner 2023-07-04 11:41:43 +02:00 committed by GitHub
parent 8a73b57b9b
commit c9ce983ae1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 104 additions and 76 deletions

View file

@ -1,10 +1,11 @@
#include "Python.h"
#include "pycore_frame.h"
#include "pycore_initconfig.h"
#include "pycore_interp.h" // PyInterpreterState.warnings
#include "pycore_long.h" // _PyLong_GetZero()
#include "pycore_pyerrors.h"
#include "pycore_pylifecycle.h" // _Py_IsInterpreterFinalizing()
#include "pycore_pystate.h" // _PyThreadState_GET()
#include "pycore_frame.h"
#include "clinic/_warnings.c.h"
#define MODULE_NAME "_warnings"

View file

@ -1,6 +1,7 @@
#include "Python.h"
#include "pycore_initconfig.h"
#include "pycore_fileutils.h" // _Py_fstat_noraise()
#include "pycore_initconfig.h"
#include "pycore_pylifecycle.h" // _PyOS_URandomNonblock()
#include "pycore_runtime.h" // _PyRuntime
#ifdef MS_WINDOWS

View file

@ -2,6 +2,7 @@
#include "pycore_fileutils.h" // DECODE_LOCALE_ERR
#include "pycore_getopt.h" // _PyOS_GetOpt()
#include "pycore_initconfig.h" // _PyArgv
#include "pycore_pylifecycle.h" // _Py_LegacyLocaleDetected()
#include "pycore_pymem.h" // _PyMem_GetAllocatorName()
#include "pycore_runtime.h" // _PyRuntime_Initialize()