[Python-checkins] bpo-45786: Remove _PyFrame_Fini() and _PyFrame_DebugMallocStats() (GH-31874)

vstinner webhook-mailer at python.org
Fri Mar 18 06:17:21 EDT 2022


https://github.com/python/cpython/commit/2217462bda1865a047d358306088682ee6a091ed
commit: 2217462bda1865a047d358306088682ee6a091ed
branch: main
author: Victor Stinner <vstinner at python.org>
committer: vstinner <vstinner at python.org>
date: 2022-03-18T11:16:55+01:00
summary:

bpo-45786: Remove _PyFrame_Fini() and _PyFrame_DebugMallocStats() (GH-31874)

Remove private empty _PyFrame_Fini() and _PyFrame_DebugMallocStats()
functions.

files:
M Include/cpython/frameobject.h
M Include/internal/pycore_frame.h
M Objects/frameobject.c
M Objects/object.c
M Python/pylifecycle.c

diff --git a/Include/cpython/frameobject.h b/Include/cpython/frameobject.h
index ebaecbed1b487..9b697fb3cbaf5 100644
--- a/Include/cpython/frameobject.h
+++ b/Include/cpython/frameobject.h
@@ -22,6 +22,4 @@ PyAPI_FUNC(void) PyFrame_LocalsToFast(PyFrameObject *, int);
 PyAPI_FUNC(int) PyFrame_FastToLocalsWithError(PyFrameObject *f);
 PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *);
 
-PyAPI_FUNC(void) _PyFrame_DebugMallocStats(FILE *out);
-
 PyAPI_FUNC(PyFrameObject *) PyFrame_GetBack(PyFrameObject *frame);
diff --git a/Include/internal/pycore_frame.h b/Include/internal/pycore_frame.h
index 207983dcc22d7..e2f551ef2c062 100644
--- a/Include/internal/pycore_frame.h
+++ b/Include/internal/pycore_frame.h
@@ -21,10 +21,6 @@ struct _frame {
 
 extern PyFrameObject* _PyFrame_New_NoTrack(PyCodeObject *code);
 
-/* runtime lifecycle */
-
-extern void _PyFrame_Fini(PyInterpreterState *interp);
-
 
 /* other API */
 
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index eb7fdb30cd75e..73b6c3d9f8ab7 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -1034,17 +1034,6 @@ PyFrame_LocalsToFast(PyFrameObject *f, int clear)
     _PyFrame_LocalsToFast(f->f_frame, clear);
 }
 
-void
-_PyFrame_Fini(PyInterpreterState *interp)
-{
-}
-
-/* Print summary info about the state of the optimized allocator */
-void
-_PyFrame_DebugMallocStats(FILE *out)
-{
-}
-
 
 PyCodeObject *
 PyFrame_GetCode(PyFrameObject *frame)
diff --git a/Objects/object.c b/Objects/object.c
index f029a72dd3145..33dab5ecbf205 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -2118,7 +2118,6 @@ _PyObject_DebugTypeStats(FILE *out)
 {
     _PyDict_DebugMallocStats(out);
     _PyFloat_DebugMallocStats(out);
-    _PyFrame_DebugMallocStats(out);
     _PyList_DebugMallocStats(out);
     _PyTuple_DebugMallocStats(out);
 }
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index 8abd536f5534d..0754c1ac3bf40 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -9,7 +9,6 @@
 #include "pycore_dict.h"          // _PyDict_Fini()
 #include "pycore_fileutils.h"     // _Py_ResetForceASCII()
 #include "pycore_floatobject.h"   // _PyFloat_InitTypes()
-#include "pycore_frame.h"         // _PyFrame_Fini()
 #include "pycore_genobject.h"     // _PyAsyncGen_Fini()
 #include "pycore_import.h"        // _PyImport_BootstrapImp()
 #include "pycore_initconfig.h"    // _PyStatus_OK()
@@ -1667,7 +1666,6 @@ finalize_interp_types(PyInterpreterState *interp)
     _PyUnicode_FiniTypes(interp);
     _PySys_Fini(interp);
     _PyExc_Fini(interp);
-    _PyFrame_Fini(interp);
     _PyAsyncGen_Fini(interp);
     _PyContext_Fini(interp);
     _PyFloat_FiniType(interp);



More information about the Python-checkins mailing list