bpo-39489: Remove COUNT_ALLOCS special build (GH-18259)

Remove:

* COUNT_ALLOCS macro
* sys.getcounts() function
* SHOW_ALLOC_COUNT code in listobject.c
* SHOW_TRACK_COUNT code in tupleobject.c
* PyConfig.show_alloc_count field
* -X showalloccount command line option
* @test.support.requires_type_collecting decorator
This commit is contained in:
Victor Stinner 2020-02-03 15:17:15 +01:00 committed by GitHub
parent 869c0c99b9
commit c6e5c1123b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 24 additions and 469 deletions

View file

@ -758,27 +758,6 @@ exit:
return return_value;
}
#if defined(COUNT_ALLOCS)
PyDoc_STRVAR(sys_getcounts__doc__,
"getcounts($module, /)\n"
"--\n"
"\n");
#define SYS_GETCOUNTS_METHODDEF \
{"getcounts", (PyCFunction)sys_getcounts, METH_NOARGS, sys_getcounts__doc__},
static PyObject *
sys_getcounts_impl(PyObject *module);
static PyObject *
sys_getcounts(PyObject *module, PyObject *Py_UNUSED(ignored))
{
return sys_getcounts_impl(module);
}
#endif /* defined(COUNT_ALLOCS) */
PyDoc_STRVAR(sys__getframe__doc__,
"_getframe($module, depth=0, /)\n"
"--\n"
@ -988,11 +967,7 @@ sys_getandroidapilevel(PyObject *module, PyObject *Py_UNUSED(ignored))
#define SYS_GETTOTALREFCOUNT_METHODDEF
#endif /* !defined(SYS_GETTOTALREFCOUNT_METHODDEF) */
#ifndef SYS_GETCOUNTS_METHODDEF
#define SYS_GETCOUNTS_METHODDEF
#endif /* !defined(SYS_GETCOUNTS_METHODDEF) */
#ifndef SYS_GETANDROIDAPILEVEL_METHODDEF
#define SYS_GETANDROIDAPILEVEL_METHODDEF
#endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */
/*[clinic end generated code: output=decd687b7631de4b input=a9049054013a1b77]*/
/*[clinic end generated code: output=39eb34a01fb9a919 input=a9049054013a1b77]*/