Skip to content

bpo-40896: add missing links to source-code to library documentation #20843

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

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Doc/library/2to3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

.. sectionauthor:: Benjamin Peterson <benjamin@python.org>

**Source code:** :source:`Lib/lib2to3`
Copy link
Member

Choose a reason for hiding this comment

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

Also deprecated.


--------------

2to3 is a Python program that reads Python 2.x source code and applies a series
of *fixers* to transform it into valid Python 3.x code. The standard library
contains a rich set of fixers that will handle almost all code. 2to3 supporting
Expand Down
5 changes: 5 additions & 0 deletions Doc/library/asyncio-protocol.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
Transports and Protocols
========================

**Source code:** :source:`Lib/asyncio/protocols.py`,
:source:`Lib/asyncio/transports.py`

------------------------------------

.. rubric:: Preface

Transports and Protocols are used by the **low-level** event loop
Expand Down
6 changes: 6 additions & 0 deletions Doc/library/asyncio-task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
Coroutines and Tasks
====================


**Source code:** :source:`Lib/asyncio/coroutines.py`,
:source:`Lib/asyncio/tasks.py`

------------------------------------

This section outlines high-level asyncio APIs to work with coroutines
and Tasks.

Expand Down
2 changes: 2 additions & 0 deletions Doc/library/asyncio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
.. module:: asyncio
:synopsis: Asynchronous I/O.

**Source code:** :source:`Lib/asyncio`

-------------------------------

.. sidebar:: Hello World!
Expand Down
2 changes: 2 additions & 0 deletions Doc/library/ctypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

.. moduleauthor:: Thomas Heller <theller@python.net>

**Source code:** :source:`Lib/ctypes`

--------------

:mod:`ctypes` is a foreign function library for Python. It provides C compatible
Expand Down
2 changes: 2 additions & 0 deletions Doc/library/curses.ascii.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
.. moduleauthor:: Eric S. Raymond <esr@thyrsus.com>
.. sectionauthor:: Eric S. Raymond <esr@thyrsus.com>

**Source code:** :source:`Lib/curses/ascii.py`

--------------

The :mod:`curses.ascii` module supplies name constants for ASCII characters and
Expand Down
2 changes: 2 additions & 0 deletions Doc/library/curses.panel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

.. sectionauthor:: A.M. Kuchling <amk@amk.ca>

**Source code:** :source:`Lib/curses/panel.py`
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is not really useful.

Copy link
Contributor Author

@edison12a edison12a Jun 13, 2020

Choose a reason for hiding this comment

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

@remilapeyre Why, Has it been deprecated?

Copy link
Contributor

Choose a reason for hiding this comment

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

Not, it's just that the file is a wrapper for the C module: https://github.com/python/cpython/blob/master/Lib/curses/panel.py


--------------

Panels are windows with the added feature of depth, so they can be stacked on
Expand Down
2 changes: 2 additions & 0 deletions Doc/library/curses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il>
.. sectionauthor:: Eric Raymond <esr@thyrsus.com>

**Source code:** :source:`Lib/curses`

--------------

The :mod:`curses` module provides an interface to the curses library, the
Expand Down
2 changes: 2 additions & 0 deletions Doc/library/distutils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>

**Source code:** :source:`Lib/distutils`

--------------

The :mod:`distutils` package provides support for building and installing
Expand Down
2 changes: 2 additions & 0 deletions Doc/library/ensurepip.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

.. versionadded:: 3.4

**Source code:** :source:`Lib/ensurepip`

--------------

The :mod:`ensurepip` package provides support for bootstrapping the ``pip``
Expand Down
2 changes: 2 additions & 0 deletions Doc/library/formatter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
.. deprecated:: 3.4
Due to lack of usage, the formatter module has been deprecated.

**Source code:** :source:`Lib/formatter.py`
Copy link
Member

Choose a reason for hiding this comment

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

I an not sure that adding this for a deprecated module is a good idea.


--------------

This module supports two interface definitions, each with multiple
Expand Down
4 changes: 4 additions & 0 deletions Doc/library/importlib.metadata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
Using :mod:`!importlib.metadata`
=================================

**Source code:** :source:`Lib/importlib/metadata.py`

--------------

.. note::
This functionality is provisional and may deviate from the usual
version semantics of the standard library.
Expand Down
2 changes: 2 additions & 0 deletions Doc/library/signal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
.. module:: signal
:synopsis: Set handlers for asynchronous events.

**Source code:** :source:`Lib/signal.py`

--------------

This module provides mechanisms to use signal handlers in Python.
Expand Down
2 changes: 2 additions & 0 deletions Doc/library/wsgiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
.. moduleauthor:: Phillip J. Eby <pje@telecommunity.com>
.. sectionauthor:: Phillip J. Eby <pje@telecommunity.com>

**Source code:** :source:`Lib/wsgiref`

--------------

The Web Server Gateway Interface (WSGI) is a standard interface between web
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add links to Library source code to Documentation. Enhanced by Edison Abahurire.
Copy link
Contributor

Choose a reason for hiding this comment

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

Documentation only changes don't need a blurb.

Copy link
Member

Choose a reason for hiding this comment

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

But they can and for non-trivial changes ofter do. 'Documentation' is a section in the blurb template and in the changelog.
https://docs.python.org/3/whatsnew/changelog.html#changelog
I would change and expand to
"Add source links to doc for 2to3, asyncio/, ..., curses/, ... wsgiref."

Copy link
Contributor

Choose a reason for hiding this comment

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

I think in this case it could be reasonable either way, but I wouldn't consider it to be strictly required for small documentation enhancements.