From 2257e94edfd3a1e38aa402ea10b83c571306de34 Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Wed, 1 May 2024 16:37:35 +0100 Subject: [PATCH] PEP 667: Pre-acceptance edits (#3767) * Remove obsolete section * Remove removals --- peps/pep-0667.rst | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/peps/pep-0667.rst b/peps/pep-0667.rst index d54b23be6..bdb1b4b2b 100644 --- a/peps/pep-0667.rst +++ b/peps/pep-0667.rst @@ -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 ==============