PEP 667: Pre-acceptance edits (#3767)

* Remove obsolete section

* Remove removals
This commit is contained in:
Mark Shannon 2024-05-01 16:37:35 +01:00 committed by GitHub
parent 72595af7b1
commit 2257e94edf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 26 deletions

View File

@ -160,10 +160,6 @@ The following C-API functions will be deprecated, as they return borrowed refere
PyEval_GetGlobals() PyEval_GetGlobals()
PyEval_GetBuiltins() PyEval_GetBuiltins()
They will be removed in 3.15 at the earliest, and 3.18 at the latest.
The exact version of removal will depend on the cost of continuing to
support these functions.
The following functions should be used instead:: The following functions should be used instead::
PyEval_GetFrameLocals() PyEval_GetFrameLocals()
@ -181,8 +177,6 @@ The following three functions will become no-ops, and will be deprecated::
PyFrame_FastToLocals() PyFrame_FastToLocals()
PyFrame_LocalsToFast() PyFrame_LocalsToFast()
They may be removed in the future, but no earlier than 3.18.
Behavior of f_locals for optimized functions Behavior of f_locals for optimized functions
-------------------------------------------- --------------------------------------------
@ -232,26 +226,6 @@ should be replaced with::
goto error_handler; goto error_handler;
} }
PyFrame_FastToLocals, etc.
''''''''''''''''''''''''''
These functions were designed to convert the internal "fast" representation
of the locals variables of a function to a dictionary, and vice versa.
Calls to them are no longer required. C code that directly accesses the
``f_locals`` field of a frame should be modified to call
``PyFrame_GetLocals()`` instead::
PyFrame_FastToLocals(frame);
PyObject *locals = frame.f_locals;
Py_INCREF(locals);
becomes::
PyObject *locals = PyFrame_GetLocals(frame);
if (frame == NULL)
goto error_handler;
Implementation Implementation
============== ==============