Give Deferred PEPs their own section in PEP 0

This commit is contained in:
Nick Coghlan 2011-04-16 03:39:10 +10:00
parent 1bc641e90b
commit 6164a5aeb5
1 changed files with 14 additions and 5 deletions

View File

@ -31,6 +31,7 @@ def sort_peps(peps):
open_ = []
finished = []
historical = []
deferred = []
dead = []
for pep in peps:
# Order of 'if' statement important. Key Status values take precedence
@ -44,8 +45,10 @@ def sort_peps(peps):
historical.append(pep)
elif pep.status == 'Draft':
open_.append(pep)
elif pep.status in ('Rejected', 'Withdrawn', 'Deferred',
'Incomplete', 'Superseded'):
elif pep.status == 'Deferred':
deferred.append(pep)
elif pep.status in ('Rejected', 'Withdrawn',
'Incomplete', 'Superseded'):
dead.append(pep)
elif pep.type_ == 'Informational':
# Hack until the conflict between the use of "Final"
@ -64,7 +67,7 @@ def sort_peps(peps):
raise PEPError("unsorted (%s/%s)" %
(pep.type_, pep.status),
pep.filename, pep.number)
return meta, info, accepted, open_, finished, historical, dead
return meta, info, accepted, open_, finished, historical, deferred, dead
def verify_email_addresses(peps):
@ -122,7 +125,8 @@ def write_pep0(peps, output=sys.stdout):
print>>output, u"Index by Category"
print>>output
write_column_headers(output)
meta, info, accepted, open_, finished, historical, dead = sort_peps(peps)
(meta, info, accepted, open_, finished,
historical, deferred, dead) = sort_peps(peps)
print>>output
print>>output, u" Meta-PEPs (PEPs about PEPs or Processes)"
print>>output
@ -154,7 +158,12 @@ def write_pep0(peps, output=sys.stdout):
for pep in historical:
print>>output, unicode(pep)
print>>output
print>>output, u" Deferred, Abandoned, Withdrawn, and Rejected PEPs"
print>>output, u" Deferred PEPs"
print>>output
for pep in deferred:
print>>output, unicode(pep)
print>>output
print>>output, u" Abandoned, Withdrawn, and Rejected PEPs"
print>>output
for pep in dead:
print>>output, unicode(pep)