-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
reSTify PEP 0 #463
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
reSTify PEP 0 #463
Conversation
Thanks for the PR! My steps are:
Problem is at https://github.com/python/pythondotorg/blob/master/peps/converters.py#L40:
The new PEP 0 does not have the We'll need to coordinate and update pythondotorg before merging this PR. |
@Mariatta Thanks for your review. I'll submit a PR to pythondotorg for fixing this. |
@Mariatta The PR to pythondotorg is here: python/pythondotorg#1192 |
The new PEP 0 pull request can be found at python/peps#463.
The new PEP 0 pull request can be found at python/peps#463. Conflicts: peps/converters.py
FYI, I've just merged and deployed python/pythondotorg#1192. |
@berkerpeksag Done. |
@Mariatta This PR is ready for review. |
@Mariatta Is anything holding this up? |
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.
Some suggestions based on what I learned writing #705 (I forgot this PR already existed, sorry), as well as a proposed adjustment for a misleading name on some variables.
Feel free to mine #705 for ideas as well - while I prefer this PR in general, one item I still like from #705 is adding explicitly named anchors for each of the section titles (along with some helper functions to make them easier to emit).
.gitignore
Outdated
@@ -1,4 +1,4 @@ | |||
pep-0000.txt | |||
pep-0000.rst |
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.
Old checkouts may still have the text file around, so best to keep both files here for now.
Makefile
Outdated
@@ -31,7 +31,7 @@ install: | |||
echo "Installing is not necessary anymore. It will be done in post-commit." | |||
|
|||
clean: | |||
-rm pep-0000.txt | |||
-rm pep-0000.rst |
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.
Old checkouts may still have the text file around, so best to remove both files here for now.
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.
rm non-existent-file
would result in an exit code of 1, which would make make
abort the build. Adding a -
before the command would make make
ignore these errors:
clean:
-rm pep-0000.txt
-rm pep-0000.rst
(see also https://www.gnu.org/software/make/manual/html_node/Errors.html)
genpepindex.py
Outdated
@@ -36,7 +36,7 @@ def main(argv): | |||
peps = [] | |||
if os.path.isdir(path): | |||
for file_path in os.listdir(path): | |||
if file_path == 'pep-0000.txt': | |||
if file_path == 'pep-0000.rst': |
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.
Best to switch this to file_path.startswith('pep-0000.')
so old text files also get ignored.
pep0/output.py
Outdated
print(markup_line, file=output) | ||
|
||
|
||
def write_table(columns, output, include_header=False): |
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.
The parameter here is a sequence of rows
, rather than a sequence of columns
pep0/output.py
Outdated
return | ||
|
||
lengths = [[] for x in columns[0]] | ||
for column in columns: |
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.
for row in rows:
(I won't make any further comments that relate to the name change)
FWIW, I find Nick's PR a bit simpler than this one. The downside is that it requires Python 3.6 and I don't think we have Python 3.6 installed on python.org servers (but it might not that hard to create a separate venv for the peps repository) |
@berkerpeksag I also think Nick's PR is better. IHMO we should accept #705 instead of this PR 😄 . |
The new PEP 0 pull request can be found at python/peps#463.
make -j
./manage.py generate_pep_pages
)