◐ Shell
reader mode source ↗
Skip to content

Use :cpy-file: throughout the Devguide#984

Merged
ezio-melotti merged 3 commits into
python:mainfrom
ezio-melotti:use-cpy-file
Dec 9, 2022
Merged

Use :cpy-file: throughout the Devguide#984
ezio-melotti merged 3 commits into
python:mainfrom
ezio-melotti:use-cpy-file

Conversation

@ezio-melotti

Copy link
Copy Markdown
Member

This PR replaces the use of :file: with :cpy-file: (introduced in #961) in most places. Since the generated links are now checked by make linkcheck, I also went through and corrected some of those.

There are a few broken links that I haven't touched yet:

(developer-workflow/grammar: line 40) broken https://github.com/python/cpython/blob/main/Include/Python-ast.h
(developer-workflow/grammar: line 33) broken https://github.com/python/cpython/blob/main/Include/token.h
(internals/compiler: line 516) broken https://github.com/python/cpython/blob/main/Include/code.h
(internals/compiler: line 488) broken https://github.com/python/cpython/blob/main/Python/peephole.c

The respective sections in developer-workflow/grammar.rst and internals/compiler.rst might need to be revisited.
@vstinner and @markshannon: can you advise on whether these are quick fixes that we can include in this PR or if they should be handled separately?

I also found another issue with this section: https://devguide.python.org/internals/compiler/#important-files
In addition to the fact that the listed files don't use any markup, the markup used for most of the files seem incorrect (it's a blockquote due to the indentation). A nested list with full paths for all the files and :cpy-file: should be a better alternative.

The :cpy-file: role could also be improved to support ~, so that in that list (and in a few other places) we can hide the full path and just display the file name.

@ezio-melotti ezio-melotti added the Additions; New content or section needed label Nov 14, 2022
@ezio-melotti ezio-melotti self-assigned this Nov 14, 2022

@hugovk hugovk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide comment

Gave a few a spot check, looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants