Skip to content

Commit 307dda3

Browse files
authored
PEP 1: Add a separate "Provisional" PEP status (#577)
This adds an explicit "Provisional" status for PEPs, making it easier to track which PEPs are truly Final, and which are pending further further public feedback based on their initially published reference implementations.
1 parent 3714aa1 commit 307dda3

File tree

8 files changed

+637
-12
lines changed

8 files changed

+637
-12
lines changed

pep-0001-1.png

-20.3 KB
Binary file not shown.

pep-0001-1.svg

+580
Loading

pep-0001.txt

+32-3
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,22 @@ Once a PEP has been accepted, the reference implementation must be
245245
completed. When the reference implementation is complete and incorporated
246246
into the main source code repository, the status will be changed to "Final".
247247

248-
A PEP can also be assigned status "Deferred". The PEP author or an
248+
To allow gathering of additional design and interface feedback before committing
249+
to long term stability for a language feature or standard library API, a PEP
250+
may also be marked as "Provisional". This is short for "Provisionally Accepted",
251+
and indicates that the proposal has been accepted for inclusion in the reference
252+
implementation, but additional user feedback is needed before the full design
253+
can be considered "Final". Unlike regular accepted PEPs, provisionally accepted
254+
PEPs may still be Rejected or Withdrawn *even after the related changes have
255+
been included in a Python release*.
256+
257+
Wherever possible, it is considered preferable to reduce the scope of a proposal
258+
to avoid the need to rely on the "Provisional" status (e.g. by deferring some
259+
features to later PEPs), as this status can lead to version compatibility
260+
challenges in the wider Python ecosystem. PEP 411 provides additional details
261+
on potential use cases for the Provisional status.
262+
263+
A PEP can also be assigned the status "Deferred". The PEP author or an
249264
editor can assign the PEP this status when no progress is being made
250265
on the PEP. Once a PEP is deferred, a PEP editor can re-assign it
251266
to draft status.
@@ -267,7 +282,16 @@ an API can replace version 1.
267282

268283
The possible paths of the status of PEPs are as follows:
269284

270-
.. image:: pep-0001-1.png
285+
.. image:: pep-0001-1.svg
286+
287+
While not shown in the diagram, "Accepted" PEPs may technically move to
288+
"Rejected" or "Withdrawn" even after acceptance. This will only occur if
289+
the implementation process reveals fundamental flaws in the design that were
290+
not noticed prior to acceptance of the PEP. Unlike Provisional PEPs, these
291+
transitions are only permitted if the accepted proposal has *not* been included
292+
in a Python release - released changes must instead go through the regular
293+
deprecation process (which may require a new PEP providing the rationale for
294+
the deprecation).
271295

272296
Some Informational and Process PEPs may also have a status of "Active"
273297
if they are never meant to be completed. E.g. PEP 1 (this PEP).
@@ -281,6 +305,11 @@ reached the Final state. Once a PEP has been completed, the Language and
281305
Standard Library References become the formal documentation of the expected
282306
behavior.
283307

308+
If changes based on implementation experience and user feedback are made to
309+
Standards track PEPs while in the Accepted or Provisional State, those changes
310+
should be noted in the PEP, such that the PEP accurately describes the state of
311+
the implementation at the point where it is marked Final.
312+
284313
Informational and Process PEPs may be updated over time to reflect changes
285314
to development practices and other details. The precise process followed in
286315
these cases will depend on the nature and purpose of the PEP being updated.
@@ -379,7 +408,7 @@ optional and are described below. All other headers are required. ::
379408
Author: <list of authors' real names and optionally, email addrs>
380409
* BDFL-Delegate: <PEP czar's real name>
381410
* Discussions-To: <email address>
382-
Status: <Draft | Active | Accepted | Deferred | Rejected |
411+
Status: <Draft | Active | Accepted | Provisional | Deferred | Rejected |
383412
Withdrawn | Final | Superseded>
384413
Type: <Standards Track | Informational | Process>
385414
* Content-Type: <text/x-rst | text/plain>

pep-0484.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Last-Modified: $Date$
55
Author: Guido van Rossum <[email protected]>, Jukka Lehtosalo <[email protected]>, Łukasz Langa <[email protected]>
66
BDFL-Delegate: Mark Shannon
77
Discussions-To: Python-Dev <[email protected]>
8-
Status: Accepted
8+
Status: Provisional
99
Type: Standards Track
1010
Content-Type: text/x-rst
1111
Created: 29-Sep-2014

pep-0517.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Author: Nathaniel J. Smith <[email protected]>,
66
Thomas Kluyver <[email protected]>
77
BDFL-Delegate: Nick Coghlan <[email protected]>
88
Discussions-To: <[email protected]>
9-
Status: Accepted
9+
Status: Provisional
1010
Type: Standards Track
1111
Content-Type: text/x-rst
1212
Created: 30-Sep-2015

pep-0518.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Author: Brett Cannon <[email protected]>,
77
Donald Stufft <[email protected]>
88
BDFL-Delegate: Nick Coghlan
99
Discussions-To: distutils-sig <distutils-sig at python.org>
10-
Status: Accepted
11-
Type: Informational
10+
Status: Provisional
11+
Type: Standards Track
1212
Content-Type: text/x-rst
1313
Created: 10-May-2016
1414
Post-History: 10-May-2016,

pep0/output.py

+14-4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def sort_peps(peps):
4242
and essentially dead."""
4343
meta = []
4444
info = []
45+
provisional = []
4546
accepted = []
4647
open_ = []
4748
finished = []
@@ -74,6 +75,8 @@ def sort_peps(peps):
7475
info.append(pep)
7576
else:
7677
historical.append(pep)
78+
elif pep.status == 'Provisional':
79+
provisional.append(pep)
7780
elif pep.status in ('Accepted', 'Active'):
7881
accepted.append(pep)
7982
elif pep.status == 'Final':
@@ -82,7 +85,8 @@ def sort_peps(peps):
8285
raise PEPError("unsorted (%s/%s)" %
8386
(pep.type_, pep.status),
8487
pep.filename, pep.number)
85-
return meta, info, accepted, open_, finished, historical, deferred, dead
88+
return (meta, info, provisional, accepted, open_,
89+
finished, historical, deferred, dead)
8690

8791

8892
def verify_email_addresses(peps):
@@ -140,8 +144,8 @@ def write_pep0(peps, output=sys.stdout):
140144
print(u"Index by Category", file=output)
141145
print(file=output)
142146
write_column_headers(output)
143-
(meta, info, accepted, open_, finished,
144-
historical, deferred, dead) = sort_peps(peps)
147+
(meta, info, provisional, accepted, open_,
148+
finished, historical, deferred, dead) = sort_peps(peps)
145149
print(file=output)
146150
print(u" Meta-PEPs (PEPs about PEPs or Processes)", file=output)
147151
print(file=output)
@@ -153,6 +157,12 @@ def write_pep0(peps, output=sys.stdout):
153157
for pep in info:
154158
print(constants.text_type(pep), file=output)
155159
print(file=output)
160+
print(u" Provisional PEPs (provisionally accepted; interface may still change)",
161+
file=output)
162+
print(file=output)
163+
for pep in provisional:
164+
print(constants.text_type(pep), file=output)
165+
print(file=output)
156166
print(u" Accepted PEPs (accepted; may not be implemented yet)", file=output)
157167
print(file=output)
158168
for pep in accepted:
@@ -163,7 +173,7 @@ def write_pep0(peps, output=sys.stdout):
163173
for pep in open_:
164174
print(constants.text_type(pep), file=output)
165175
print(file=output)
166-
print(u" Finished PEPs (done, implemented in code repository)", file=output)
176+
print(u" Finished PEPs (done, with a stable interface)", file=output)
167177
print(file=output)
168178
for pep in finished:
169179
print(constants.text_type(pep), file=output)

pep0/pep.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ class PEP(object):
169169
type_values = (u"Standards Track", u"Informational", u"Process")
170170
# Valid values for the Status header.
171171
# Active PEPs can only be for Informational or Process PEPs.
172-
status_values = (u"Accepted", u"Rejected", u"Withdrawn", u"Deferred",
172+
status_values = (u"Accepted", u"Provisional",
173+
u"Rejected", u"Withdrawn", u"Deferred",
173174
u"Final", u"Active", u"Draft", u"Superseded")
174175

175176
def __init__(self, pep_file):
@@ -229,6 +230,11 @@ def __init__(self, pep_file):
229230
raise PEPError("Only Process and Informational PEPs may "
230231
"have an Active status", pep_file.name,
231232
self.number)
233+
# Special case for Provisional PEPs.
234+
if (status == u"Provisional" and self.type_ != "Standards Track"):
235+
raise PEPError("Only Standards Track PEPs may "
236+
"have a Provisional status", pep_file.name,
237+
self.number)
232238
self.status = status
233239
# 'Author'.
234240
authors_and_emails = self._parse_author(metadata['Author'])

0 commit comments

Comments
 (0)