Ticket #4582 enhancement new

Opened 3 years ago

Last modified 2 years ago

Twisted's Sphinx documentation should allow linking to stdlib documentation.

Reported by: Screwtape Owned by:
Priority: normal Milestone:
Component: core Keywords: documentation
Cc: khorn, thijs Branch:
Author: Launchpad Bug:

Description

In ticket #4567 comment 4, exarkun writes:

I suppose eventually we can have a stdlib module role which is both fixed-width like code and a link. Does that make sense? Can you file a ticket for this?

I don't know of any other Python projects whose docs link to the Python stdlib docs (especially since I don't think the Python stdlib has any version-independent permalinks), but it would be a nice feature.

Change History

1

follow-up: ↓ 5   Changed 3 years ago by khorn

This can be done one of two ways:

  1. Since the python stdlib docs use Sphinx, we can use Intersphinx, which allows links between Sphinx projects. This has the advantage that it's a built-in Sphinx feature with no additional code to maintain.
  2. Create a custom extension with a stdlib role or something as exarkun suggested. This would allow a bit more flexibility than the Intersphinx option as far as formatting, etc.

2

  Changed 3 years ago by thijs

  • cc thijs added

+1 for intersphinx.

3

  Changed 2 years ago by khorn

  • milestone set to Lore to Sphinx

4

  Changed 2 years ago by khorn

  • owner changed from glyph to khorn

5

in reply to: ↑ 1   Changed 2 years ago by thijs

Replying to khorn:

This can be done one of two ways: 1. Since the python stdlib docs use Sphinx, we can use Intersphinx, which allows links between Sphinx projects. This has the advantage that it's a built-in Sphinx feature with no additional code to maintain.

With InterSphinx you can use syntax like:

:py:mod:`urllib2`

in conf.py:

# refer to the Python standard library.
intersphinx_mapping = {'python': ('http://docs.python.org', None)}

6

  Changed 2 years ago by <automation>

  • owner khorn deleted

7

  Changed 2 years ago by khorn

  • milestone Lore to Sphinx deleted

This should not be part of the Lore to Sphinx milestone

Note: See TracTickets for help on using tickets.