mirror of
https://github.com/python/cpython.git
synced 2025-07-12 22:05:16 +00:00
Remove CALL_PROFILE special build
Issue #28799: * Remove the PyEval_GetCallStats() function. * Deprecate the untested and undocumented sys.callstats() function. * Remove the CALL_PROFILE special build Use the sys.setprofile() function, cProfile or profile module to profile function calls.
This commit is contained in:
parent
214678e44b
commit
048afd98b3
5 changed files with 19 additions and 133 deletions
|
@ -1287,6 +1287,19 @@ a 11-tuple where the entries in the tuple are counts of:\n\
|
|||
10. Number of stack pops performed by call_function()"
|
||||
);
|
||||
|
||||
static PyObject *
|
||||
sys_callstats(PyObject *self)
|
||||
{
|
||||
if (PyErr_WarnEx(PyExc_DeprecationWarning,
|
||||
"sys.callstats() has been deprecated in Python 3.7 "
|
||||
"and will be removed in the future", 1) < 0) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -1352,7 +1365,7 @@ Return True if Python is exiting.");
|
|||
|
||||
static PyMethodDef sys_methods[] = {
|
||||
/* Might as well keep this in alphabetic order */
|
||||
{"callstats", (PyCFunction)PyEval_GetCallStats, METH_NOARGS,
|
||||
{"callstats", (PyCFunction)sys_callstats, METH_NOARGS,
|
||||
callstats_doc},
|
||||
{"_clear_type_cache", sys_clear_type_cache, METH_NOARGS,
|
||||
sys_clear_type_cache__doc__},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue