Support the Resolution header, required for Standards Track PEPs.
This commit is contained in:
parent
355c2cedee
commit
5d9da43a0a
|
@ -280,6 +280,7 @@ optional and are described below. All other headers are required. ::
|
|||
Post-History: <dates of postings to python-list and python-dev>
|
||||
* Replaces: <pep number>
|
||||
* Replaced-By: <pep number>
|
||||
* Resolution: <url>
|
||||
|
||||
The Author header lists the names, and optionally the email addresses
|
||||
of all the authors/owners of the PEP. The format of the Author header
|
||||
|
@ -301,6 +302,10 @@ following RFC 2822 continuation line conventions. Note that personal
|
|||
email addresses in PEPs will be obscured as a defense against spam
|
||||
harvesters.
|
||||
|
||||
*Note: The Resolution header is required for Standards Track PEPs
|
||||
only. It contains a URL that should point to an email message or
|
||||
other web resource where the pronouncement about the PEP is made.*
|
||||
|
||||
While a PEP is in private discussions (usually during the initial
|
||||
Draft phase), a Discussions-To header will indicate the mailing list
|
||||
or URL where the PEP is being discussed. No Discussions-To header is
|
||||
|
|
|
@ -9,8 +9,7 @@ Content-Type: text/x-rst
|
|||
Created: 2009-12-16
|
||||
Python-Version: 3.2
|
||||
Post-History: 2010-01-30, 2010-02-25, 2010-03-03, 2010-04-12
|
||||
|
||||
Accepted: http://mail.python.org/pipermail/python-dev/2010-April/099414.html
|
||||
Resolution: http://mail.python.org/pipermail/python-dev/2010-April/099414.html
|
||||
|
||||
|
||||
Abstract
|
||||
|
|
25
pep0/pep.py
25
pep0/pep.py
|
@ -106,10 +106,10 @@ class Author(object):
|
|||
def _last_name(self, full_name):
|
||||
"""Find the last name (or nickname) of a full name.
|
||||
|
||||
If no last name (e.g, 'Aahz') then return the full name. If there is a
|
||||
leading, lowercase portion to the last name (e.g., 'van' or 'von') then
|
||||
include it. If there is a suffix (e.g., 'Jr.') that is appended through a
|
||||
comma, then drop the suffix.
|
||||
If no last name (e.g, 'Aahz') then return the full name. If there is
|
||||
a leading, lowercase portion to the last name (e.g., 'van' or 'von')
|
||||
then include it. If there is a suffix (e.g., 'Jr.') that is appended
|
||||
through a comma, then drop the suffix.
|
||||
|
||||
"""
|
||||
name_partition = full_name.partition(u',')
|
||||
|
@ -154,18 +154,19 @@ class PEP(object):
|
|||
# The second item in the nested tuples represents if the header is
|
||||
# required or not.
|
||||
headers = (('PEP', True), ('Title', True), ('Version', True),
|
||||
('Last-Modified', True), ('Author', True),
|
||||
('Discussions-To', False), ('Status', True), ('Type', True),
|
||||
('Content-Type', False), ('Requires', False),
|
||||
('Created', True), ('Python-Version', False),
|
||||
('Post-History', False), ('Replaces', False),
|
||||
('Replaced-By', False))
|
||||
('Last-Modified', True), ('Author', True),
|
||||
('Discussions-To', False), ('Status', True), ('Type', True),
|
||||
('Content-Type', False), ('Requires', False),
|
||||
('Created', True), ('Python-Version', False),
|
||||
('Post-History', False), ('Replaces', False),
|
||||
('Replaced-By', False), ('Resolution', False),
|
||||
)
|
||||
# Valid values for the Type header.
|
||||
type_values = (u"Standards Track", u"Informational", u"Process")
|
||||
# Valid values for the Status header.
|
||||
# Active PEPs can only be for Informational or Process PEPs.
|
||||
status_values = (u"Accepted", u"Rejected", u"Withdrawn", u"Deferred", u"Final",
|
||||
u"Active", u"Draft", u"Replaced")
|
||||
status_values = (u"Accepted", u"Rejected", u"Withdrawn", u"Deferred",
|
||||
u"Final", u"Active", u"Draft", u"Replaced")
|
||||
|
||||
def __init__(self, pep_file):
|
||||
"""Init object from an open PEP file object."""
|
||||
|
|
Loading…
Reference in New Issue