PEP 667: Pre-acceptance edits (#3767)
* Remove obsolete section * Remove removals
This commit is contained in:
parent
72595af7b1
commit
2257e94edf
|
@ -160,10 +160,6 @@ The following C-API functions will be deprecated, as they return borrowed refere
|
|||
PyEval_GetGlobals()
|
||||
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::
|
||||
|
||||
PyEval_GetFrameLocals()
|
||||
|
@ -181,8 +177,6 @@ The following three functions will become no-ops, and will be deprecated::
|
|||
PyFrame_FastToLocals()
|
||||
PyFrame_LocalsToFast()
|
||||
|
||||
They may be removed in the future, but no earlier than 3.18.
|
||||
|
||||
Behavior of f_locals for optimized functions
|
||||
--------------------------------------------
|
||||
|
||||
|
@ -232,26 +226,6 @@ should be replaced with::
|
|||
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
|
||||
==============
|
||||
|
||||
|
|
Loading…
Reference in New Issue