-
Notifications
You must be signed in to change notification settings - Fork 621
Link to the correct PEP source file. #1195
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<!-- | ||
This HTML is auto-generated. DO NOT EDIT THIS FILE! If you are writing a new | ||
PEP, see http://www.python.org/dev/peps/pep-0001 for instructions and links | ||
to templates. DO NOT USE THIS HTML FILE AS YOUR TEMPLATE! | ||
--> | ||
<table class="rfc2822 docutils field-list" frame="void" rules="none"> | ||
<col class="field-name" /> | ||
<col class="field-body" /> | ||
<tbody valign="top"> | ||
<tr class="field"><th class="field-name">PEP:</th><td class="field-body">12</td> | ||
</tr> | ||
<tr class="field"><th class="field-name">Title:</th><td class="field-body">Sample reStructuredText PEP Template</td> | ||
</tr> | ||
<tr class="field"><th class="field-name">Author:</th><td class="field-body">David Goodger <goodger at python.org>, | ||
Barry Warsaw <barry at python.org></td> | ||
</tr> | ||
<tr class="field"><th class="field-name">Status:</th><td class="field-body">Active</td> | ||
</tr> | ||
<tr class="field"><th class="field-name">Type:</th><td class="field-body">Process</td> | ||
</tr> | ||
<tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference external" href="/dev/peps/pep-0012">text/x-rst</a></td> | ||
</tr> | ||
<tr class="field"><th class="field-name">Created:</th><td class="field-body">05-Aug-2002</td> | ||
</tr> | ||
<tr class="field"><th class="field-name">Post-History:</th><td class="field-body">30-Aug-2002</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<hr /> | ||
<div class="contents topic" id="contents"> | ||
<p class="topic-title first">Contents</p> | ||
<ul class="simple"> | ||
<li><a class="reference internal" href="#abstract" id="id2">Abstract</a></li> | ||
<li><a class="reference internal" href="#copyright" id="id3">Copyright</a></li> | ||
</ul> | ||
</div> | ||
<div class="section" id="abstract"> | ||
<h1><a class="toc-backref" href="#id2">Abstract</a></h1> | ||
<p>This PEP provides a boilerplate or sample template for creating your | ||
own reStructuredText PEPs.</p> | ||
</div> | ||
<div class="section" id="copyright"> | ||
<h1><a class="toc-backref" href="#id3">Copyright</a></h1> | ||
<p>This document has been placed in the public domain.</p> | ||
<!-- Local Variables: | ||
mode: indented-text | ||
indent-tabs-mode: nil | ||
sentence-end-double-space: t | ||
fill-column: 70 | ||
coding: utf-8 | ||
End: --> | ||
</div> | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
PEP: 12 | ||
Title: Sample reStructuredText PEP Template | ||
Author: David Goodger <[email protected]>, | ||
Barry Warsaw <[email protected]> | ||
Status: Active | ||
Type: Process | ||
Content-Type: text/x-rst | ||
Created: 05-Aug-2002 | ||
Post-History: 30-Aug-2002 | ||
|
||
|
||
Abstract | ||
======== | ||
|
||
This PEP provides a boilerplate or sample template for creating your | ||
own reStructuredText PEPs. | ||
|
||
|
||
Copyright | ||
========= | ||
|
||
This document has been placed in the public domain. | ||
|
||
|
||
|
||
.. | ||
Local Variables: | ||
mode: indented-text | ||
indent-tabs-mode: nil | ||
sentence-end-double-space: t | ||
fill-column: 70 | ||
coding: utf-8 | ||
End: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,16 @@ def test_source_link(self): | |
pep.content.rendered | ||
) | ||
|
||
@override_settings(PEP_REPO_PATH=FAKE_PEP_REPO) | ||
def test_source_link_rst(self): | ||
pep = get_pep_page('0012') | ||
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. Is it possible to make the content of the PEP shorter? |
||
self.assertEqual(pep.title, 'PEP 12 -- Sample reStructuredText PEP Template') | ||
self.assertIn( | ||
'Source: <a href="https://github.com/python/peps/blob/master/' | ||
'pep-0012.rst">https://github.com/python/peps/blob/master/pep-0012.rst</a>', | ||
pep.content.rendered | ||
) | ||
|
||
@override_settings(PEP_REPO_PATH=FAKE_PEP_REPO) | ||
def test_invalid_pep_number(self): | ||
with captured_stdout() as stdout: | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an OK solution for just
.txt
or.rst
.Wouldn't it be possible to write a generic test, by looking for a glob pattern
pep-{}.*
and selecting the extension from that?Because if the documentation system goes to
.md
or whatever new extension, the website code would again have to be changed here!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure we aren't going to support another documentation format (especially Markdown) within the Python organization. Plus, we are going to move all PEP infrastructure to RtD so YAGNI :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@berkerpeksag OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if we ever did, we'd probably move generation of the source link inside
pep2html.py
in the PEP's repo (we were even considering that as an option this time).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK @ncoghlan, I see.