-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
PEP 1: Make text/x-rst officially the default and update accordingly #2355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -205,8 +205,8 @@ The standard PEP workflow is: | |||||||
* The title accurately describes the content. | ||||||||
* The PEP's language (spelling, grammar, sentence structure, etc.) | ||||||||
and code style (examples should match :pep:`7` & :pep:`8`) should be | ||||||||
correct and conformant. The PEP text will be automatically checked for | ||||||||
correct reStructuredText formatting when the pull request is submitted. | ||||||||
correct and conformant. The PEP text will be automatically checked for | ||||||||
correct reStructuredText formatting when the pull request is submitted. | ||||||||
PEPs with invalid reST markup will not be approved. | ||||||||
|
||||||||
Editors are generally quite lenient about this initial review, | ||||||||
|
@@ -547,7 +547,7 @@ optional and are described below. All other headers are required. | |||||||
Status: <Draft | Active | Accepted | Provisional | Deferred | Rejected | | ||||||||
Withdrawn | Final | Superseded> | ||||||||
Type: <Standards Track | Informational | Process> | ||||||||
* Content-Type: <text/x-rst | text/plain> | ||||||||
* Content-Type: text/x-rst | ||||||||
* Requires: <pep numbers> | ||||||||
Created: <date created on, in dd-mmm-yyyy format> | ||||||||
* Python-Version: <version number> | ||||||||
|
@@ -603,11 +603,9 @@ The Type header specifies the type of PEP: Standards Track, | |||||||
Informational, or Process. | ||||||||
|
||||||||
The format of a PEP is specified with a Content-Type header. | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Explicitly only support
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I ended up using the "must" verbiage suggested by @warsaw |
||||||||
Valid values are ``text/plain`` for plaintext PEPs (see :pep:`9`) | ||||||||
and ``text/x-rst`` for reStructuredText PEPs (see :pep:`12`). | ||||||||
All new and active PEPs must use reStructuredText, but for backwards | ||||||||
compatibility, plain text is currently still the default if no | ||||||||
Content-Type header is present. | ||||||||
All PEPs must use reStructuredText (see :pep:`12`), | ||||||||
and have a value of ``text/x-rst``, the default. | ||||||||
Previously, plaintext PEPs used ``text/plain`` (see :pep:`9`). | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should clearly explain whether There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd remove this line, PEP-0009 itself has a notice stating that it is withdrawn. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If people think this should simply be removed, I can remove it. Otherwise, I could revise the above to say "All PEPs must use reStructuredText"... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I think the must language is worth adding. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added above, thanks |
||||||||
|
||||||||
The Created header records the date that the PEP was assigned a | ||||||||
number, while Post-History is used to record the dates of when new | ||||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -6,6 +6,7 @@ PEP-Delegate: <PEP delegate's real name> | |||||
Discussions-To: <email address or URL> | ||||||
Status: <REQUIRED: Draft | Active | Accepted | Provisional | Deferred | Rejected | Withdrawn | Final | Superseded> | ||||||
Type: <REQUIRED: Standards Track | Informational | Process> | ||||||
Content-Type: text/x-rst | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Content Type is required, but as there's only one valid value it feels odd to use the
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had the same thought. One possible reason is forward compatibility: maybe in the future we'll allow PEPs in markdown or something. Then again, even in that case we can just reintroduce the header later. And another reason is just to avoid making a change without a strong reason. There is little cost to having PEP authors copy this field from the template. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm inclined to keep it, for clarity. Lots of things have their MIME types designated in headers. And as Jelle says, maybe in the future there will be others, so it'd mean we don't need to say "Optional - if omitted, defaults to text/x-rst". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's no techincal reason the header couldn't simply be removed from the template (and even all PEPs), since they all use If we did add support for a new format, it presumably would be handled via file extension, like any common format these days (e.g. MyST with That being said, while it is redundant, there isn't too much cost to keeping it around (at least on existing PEPs), so I don't feel too strongly about it. |
||||||
Requires: <pep numbers> | ||||||
Created: <date created on, in dd-mmm-yyyy format> | ||||||
Python-Version: <version number> | ||||||
|
Uh oh!
There was an error while loading. Please reload this page.