Missing links to Source Code in Documentation pages
| BPO | 40896 |
|---|---|
| Nosy | @ezio-melotti, @merwok, @willingc, @JulienPalard, @remilapeyre, @simicode |
| PRs |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = None
closed_at = None
created_at = <Date 2020-06-07.00:20:06.597>
labels = ['3.7', '3.8', '3.9', '3.10', 'type-feature', 'docs']
title = 'Missing links to Source Code in Documentation pages'
updated_at = <Date 2020-06-12.21:20:39.631>
user = 'https://github.com/simicode'
bugs.python.org fields:
activity = <Date 2020-06-12.21:20:39.631>
actor = 'python-dev'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2020-06-07.00:20:06.597>
creator = 'edison.abahurire'
dependencies = []
files = []
hgrepos = []
issue_num = 40896
keywords = ['patch']
message_count = 3.0
messages = ['370863', '370881', '370900']
nosy_count = 8.0
nosy_names = ['ezio.melotti', 'eric.araujo', 'docs@python', 'python-dev', 'willingc', 'mdk', 'remi.lapeyre', 'edison.abahurire']
pr_nums = ['20843']
priority = 'normal'
resolution = None
stage = 'patch review'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue40896'
versions = ['Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10']
- PR: gh-99363
Just below the Module heading, most library documenation pages like https://docs.python.org/3/library/datetime.html have a link to the source code in the form of Source code: [Lib/datetime.py](https://github.com/python/cpython/blob/main/Lib/datetime.py) that links to the cpython github file of that module.
Some modules like https://docs.python.org/3/library/time.html are missing this though and yet I think it would be quite useful for people who want to navigate the depths of the implementation.
Now, the challenge is that most modules are not located in single code files but what if, instead of leaving it blank, we link to the folder that contains the code of that module? Wouldn't that be helpful?
For example: For https://docs.python.org/3/library/wsgiref.html, we can add this https://github.com/python/cpython/tree/master/Lib/wsgiref as the link to source code.
In the case of time, it's a C module. Those usually don't have a link to their implementation at the top. Others like wsgiref should have a link as having a quick way to read the implementation is a nice way to check on the implementation details and get acquainted with Python's internal.
Could you open a PR to add those?
Thanks for the review. I'll open a PR.
Nice, thanks for finishing this!