File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ PyAPI_FUNC(PyObject *) PyEval_EvalCodeEx(PyObject *co,
1919
2020PyAPI_FUNC (PyObject * ) PyEval_GetBuiltins (void );
2121PyAPI_FUNC (PyObject * ) PyEval_GetGlobals (void );
22- PyAPI_FUNC (PyObject * ) PyEval_GetLocals (void );
22+ Py_DEPRECATED ( 3.14 ) PyAPI_FUNC (PyObject * ) PyEval_GetLocals (void );
2323PyAPI_FUNC (PyFrameObject * ) PyEval_GetFrame (void );
2424
2525PyAPI_FUNC (PyObject * ) PyEval_GetFrameBuiltins (void );
Original file line number Diff line number Diff line change @@ -2599,6 +2599,12 @@ _PyEval_GetBuiltinId(_Py_Identifier *name)
25992599PyObject *
26002600PyEval_GetLocals (void )
26012601{
2602+ if (PyErr_WarnEx (PyExc_DeprecationWarning ,
2603+ "PyEval_GetLocals() is deprecated in Python 3.14 "
2604+ "and will be removed in 3.16." , 1 ))
2605+ {
2606+ return NULL ;
2607+ }
26022608 // We need to return a borrowed reference here, so some tricks are needed
26032609 PyThreadState * tstate = _PyThreadState_GET ();
26042610 _PyInterpreterFrame * current_frame = _PyThreadState_GetFrame (tstate );
You can’t perform that action at this time.
0 commit comments