r55999 - sandbox/trunk/pep0/pep0/output.py sandbox/trunk/pep0/pep0/pep.py
Author: brett.cannon Date: Sat Jun 16 00:29:17 2007 New Revision: 55999 Modified: sandbox/trunk/pep0/pep0/output.py sandbox/trunk/pep0/pep0/pep.py Log: Add support for replaced PEPs. This also led to tightening up error reporting when sorting PEPs if the PEP couldn't be sorted. That led to tweaking the sort algorithm. Modified: sandbox/trunk/pep0/pep0/output.py ============================================================================== --- sandbox/trunk/pep0/pep0/output.py (original) +++ sandbox/trunk/pep0/pep0/output.py Sat Jun 16 00:29:17 2007 @@ -34,16 +34,19 @@ if pep.status == 'Draft': open_.append(pep) elif pep.status in ('Rejected', 'Withdrawn', 'Deferred', - 'Incomplete'): + 'Incomplete', 'Replaced'): dead.append(pep) elif pep.type_ == 'Process': meta.append(pep) elif pep.type_ == 'Informational': info.append(pep) - elif pep.status == 'Accepted': + elif pep.status in ('Accepted', 'Active'): accepted.append(pep) elif pep.status == 'Final': finished.append(pep) + else: + raise ValueError("PEP %s unsorted (%s/%s)" % (pep.number, + pep.type_, pep.status)) return meta, info, accepted, open_, finished, dead Modified: sandbox/trunk/pep0/pep0/pep.py ============================================================================== --- sandbox/trunk/pep0/pep0/pep.py (original) +++ sandbox/trunk/pep0/pep0/pep.py Sat Jun 16 00:29:17 2007 @@ -30,7 +30,7 @@ type_values = ("Standards Track", "Informational", "Process") # Active and Draft are not listed in the index. status_values = ("Accepted", "Rejected", "Withdrawn", "Deferred", "Final", - "Active", "Draft") + "Active", "Draft", "Replaced") # XXX Uncomment to valid author names (along with code in __init__). #valid_authors = set(x[0] for x in constants.email_addresses)
participants (1)
-
brett.cannon