@@ -29,6 +29,12 @@ See also :ref:`Reflection <reflection>`.
2929 Previously, this type was only available after including
3030 ``<frameobject.h> ``.
3131
32+ .. c :function :: PyObject *PyFrame_New (PyThreadState *tstate, PyCodeObject *code, PyObject *globals, PyObject *locals)
33+
34+ Create a new frame object. This function returns a :term: `strong reference `
35+ to the new frame object on success; return ``NULL `` with an exception set
36+ on failure.
37+
3238.. c :function :: int PyFrame_Check (PyObject *obj)
3339
3440 Return non-zero if *obj * is a frame object.
@@ -161,6 +167,56 @@ See :pep:`667` for more information.
161167
162168 Return non-zero if *obj * is a frame :func: `locals ` proxy.
163169
170+
171+ Legacy Local Variable APIs
172+ ^^^^^^^^^^^^^^^^^^^^^^^^^^
173+
174+ These APIs are :term: `soft deprecated `. As of Python 3.13, they do nothing.
175+ They exist solely for backwards compatibility.
176+
177+
178+ .. c :function :: void PyFrame_LocalsToFast (PyFrameObject *f, int clear)
179+
180+ This function is :term: `soft deprecated ` and does nothing.
181+
182+ Prior to Python 3.13, this function would copy the :attr: `~frame.f_locals `
183+ attribute of *f * to the internal "fast" array of local variables, allowing
184+ changes in frame objects to be visible to the interpreter. If *clear * was
185+ true, this function would clear exceptions.
186+
187+ .. versionchanged :: 3.13
188+ This function now does nothing.
189+
190+
191+ .. c :function :: void PyFrame_FastToLocals (PyFrameObject *f)
192+
193+ This function is :term: `soft deprecated ` and does nothing.
194+
195+ Prior to Python 3.13, this function would copy the internal "fast" array
196+ of local variables (which is used by the interpreter) to the
197+ :attr:`~frame.f_locals` attribute of *f*, allowing changes in local
198+ variables to be visible to frame objects.
199+
200+ .. versionchanged:: 3.13
201+ This function now does nothing.
202+
203+
204+ .. c:function:: int PyFrame_FastToLocalsWithError(PyFrameObject *f)
205+
206+ This function is :term: `soft deprecated ` and does nothing.
207+
208+ Prior to Python 3.13, this function was similar to
209+ :c:func: `PyFrame_FastToLocals `, but would return ``0 `` on success, and
210+ ``-1 `` with an exception set on failure.
211+
212+ .. versionchanged :: 3.13
213+ This function now does nothing.
214+
215+
216+ .. seealso ::
217+ :pep: `667 `
218+
219+
164220Internal Frames
165221^^^^^^^^^^^^^^^
166222
0 commit comments