From 163bcfce7fd077edcaf9853b3c7857d481fb41e0 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Fri, 31 May 2024 15:26:33 +0200 Subject: [PATCH] gh-112026: Deprecate _PyDict_GetItemStringWithError() function --- Include/cpython/dictobject.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Include/cpython/dictobject.h b/Include/cpython/dictobject.h index 3fd23b9313c453..e2861c963266ea 100644 --- a/Include/cpython/dictobject.h +++ b/Include/cpython/dictobject.h @@ -37,7 +37,8 @@ typedef struct { PyAPI_FUNC(PyObject *) _PyDict_GetItem_KnownHash(PyObject *mp, PyObject *key, Py_hash_t hash); -PyAPI_FUNC(PyObject *) _PyDict_GetItemStringWithError(PyObject *, const char *); +// PyDict_GetItemStringRef() can be used instead +Py_DEPRECATED(3.14) PyAPI_FUNC(PyObject *) _PyDict_GetItemStringWithError(PyObject *, const char *); PyAPI_FUNC(PyObject *) PyDict_SetDefault( PyObject *mp, PyObject *key, PyObject *defaultobj);