Skip to content

Commit 8d09efe

Browse files
authored
Withdraw PEP 558 in favour of PEP 667 (GH-3762)
The original rationale for keeping PEP 558 open as an alternative to PEP 667 no longer applies, so withdrawn is a more appropriate state than deferred.
1 parent 2a860a6 commit 8d09efe

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

peps/pep-0558.rst

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,36 @@ Title: Defined semantics for locals()
33
Author: Alyssa Coghlan <[email protected]>
44
BDFL-Delegate: Nathaniel J. Smith
55
Discussions-To: [email protected]
6-
Status: Deferred
6+
Status: Withdrawn
77
Type: Standards Track
88
Content-Type: text/x-rst
99
Created: 08-Sep-2017
1010
Python-Version: 3.13
1111
Post-History: 08-Sep-2017, 22-May-2019, 30-May-2019, 30-Dec-2019, 18-Jul-2021,
1212
26-Aug-2021
1313

14-
PEP Deferral
15-
============
14+
PEP Withdrawal
15+
==============
1616

17-
While the original reference implementation for this PEP served a useful purpose
18-
in determining that it *is* feasible to solve the known problems with the
19-
semantics of the ``locals()`` namespace, that implementation itself is no longer
20-
viable as an implementation of the PEP as written.
17+
In December 2021, this PEP and :pep:`667` converged on a common definition of the
18+
proposed changes to the Python level semantics of the ``locals()`` builtin (as
19+
documented in the PEP text below), with the only remaining differences being
20+
in the proposed C API changes and various internal implementation details.
2121

22-
This situation came about for two main reasons:
22+
Of those remaining differences, the most significant one was that :pep:`667`
23+
at the time still proposed an immediate backwards compatibility break for the
24+
``PyEval_GetLocals()`` API as soon as the PEP was accepted and implemented.
2325

24-
* first, several key parts of the original implementation were invalidated when
25-
the semantic improvements arising from the development of :pep:`667` resulted in
26-
the proposal in the PEP diverging from what had previously been implemented
27-
* second, several remaining practical aspects of the original implementation were
28-
invalidated by the frame management changes that formed part of the significant
29-
performance improvements published in the CPython 3.11 release, so the development
30-
branch doesn't even offer a useful starting point for an updated implementation
26+
:pep:`667` has since been changed to propose a generous deprecation period for
27+
the ``PyEval_GetLocals()`` API, continuing to support it in parallel with the
28+
improved semantics offered by the new ``PyEval_GetFrameLocals()`` API.
3129

32-
As a result, further progress on this PEP requires the development of a new reference
33-
implementation, either for this PEP or for :pep:`667` (the semantics of the two PEPs
34-
are so close together now that an implementation for either would require only a few
35-
relatively small changes to instead implement the other).
30+
Any remaining C API design concerns relate to new informational APIs that can be
31+
added at a later date if they are deemed necessary, and any potential concerns
32+
about the exact performance characteristics of the frame locals view implementation
33+
are outweighed by the availability of a viable reference implementation.
3634

37-
Since the PEP author has no current plans to produce that new reference implementation
38-
themselves, but the semantics proposed by the PEPs seem generally acceptable to the
39-
Python core development team, the most appropriate state for the PEP is "Deferred".
35+
Accordingly, this PEP has been withdrawn in favour of proceeding with :pep:`667`.
4036

4137
Abstract
4238
========
@@ -984,6 +980,10 @@ flexibility in how they provide those capabilities.
984980
Comparison with PEP 667
985981
-----------------------
986982

983+
NOTE: the comparison below is against PEP 667 as it was in December 2021.
984+
It does not reflect the state of PEP 667 as of April 2024 (when this PEP was
985+
withdrawn in favour of proceeding with PEP 667).
986+
987987
:pep:`667` offers a partially competing proposal for this PEP that suggests it
988988
would be reasonable to eliminate the internal frame value cache on optimised
989989
frames entirely.

0 commit comments

Comments
 (0)