diff options
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 3e0165a..1a7b01b 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -2208,6 +2208,14 @@ static PyObject * sys__clear_type_cache_impl(PyObject *module) /*[clinic end generated code: output=20e48ca54a6f6971 input=127f3e04a8d9b555]*/ { + if (PyErr_WarnEx(PyExc_DeprecationWarning, + "sys._clear_type_cache() is deprecated and" + " scheduled for removal in a future version." + " Use sys._clear_internal_caches() instead.", + 1) < 0) + { + return NULL; + } PyType_ClearCache(); Py_RETURN_NONE; } |