Use `:cpy-file:` throughout the Devguide by ezio-melotti · Pull Request #984 · python/devguide
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
Include/Python-ast.hwas removed by @vstinnerInclude/token.hwas removed by @vstinnerInclude/code.hwas removed by @vstinnerPython/peephole.cwas removed by @markshannon
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.