Skip to content

Commit ec21ce3

Browse files
authored
PEP 667: Remove open issues section, as the issues have been resolved (#3731)
1 parent b9c97a4 commit ec21ce3

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

peps/pep-0667.rst

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -425,33 +425,6 @@ whereas this PEP does not.
425425
:pep:`558` does not specify exactly when the internal copy is
426426
updated, making the behavior of :pep:`558` impossible to reason about.
427427

428-
Open Issues
429-
===========
430-
431-
Have locals() return a mapping proxy
432-
------------------------------------
433-
434-
An alternative way to define ``locals()`` would be simply as::
435-
436-
def locals():
437-
return sys._getframe(1).f_locals
438-
439-
This would be simpler and easier to understand. However,
440-
there would be backwards compatibility issues when ``locals()`` is assigned
441-
to a local variable or passed to ``eval`` or ``exec``.
442-
443-
Lifetime of the mapping proxy
444-
-----------------------------
445-
446-
Each read of the ``f_locals`` attributes creates a new mapping proxy.
447-
This is done to avoid creating a reference cycle.
448-
449-
An alternative would be to cache the proxy on the frame, so that
450-
``frame.f_locals is frame.f_locals`` would be true.
451-
The downside of this is that the reference cycle would delay collection
452-
of both the frame and mapping proxy until the next cycle collection.
453-
454-
``PyEval_GetLocals()`` already creates a cycle, as it returns a borrowed reference.
455428

456429
Implementation
457430
==============

0 commit comments

Comments
 (0)