Skip to content

Commit bba3413

Browse files
authored
Merge pull request #1489 from edgarrmondragon/intersphinx-more-links
Use intersphinx to link to other Python docs
2 parents 5cc1cce + 70ec8b1 commit bba3413

File tree

6 files changed

+31
-31
lines changed

6 files changed

+31
-31
lines changed

source/specifications/dependency-specifiers.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -234,37 +234,37 @@ error like all other unknown variables.
234234
- Python equivalent
235235
- Sample values
236236
* - ``os_name``
237-
- ``os.name``
237+
- :py:data:`os.name`
238238
- ``posix``, ``java``
239239
* - ``sys_platform``
240-
- ``sys.platform``
240+
- :py:data:`sys.platform`
241241
- ``linux``, ``linux2``, ``darwin``, ``java1.8.0_51`` (note that "linux"
242242
is from Python3 and "linux2" from Python2)
243243
* - ``platform_machine``
244-
- ``platform.machine()``
244+
- :py:func:`platform.machine()`
245245
- ``x86_64``
246246
* - ``platform_python_implementation``
247-
- ``platform.python_implementation()``
247+
- :py:func:`platform.python_implementation()`
248248
- ``CPython``, ``Jython``
249249
* - ``platform_release``
250-
- ``platform.release()``
250+
- :py:func:`platform.release()`
251251
- ``3.14.1-x86_64-linode39``, ``14.5.0``, ``1.8.0_51``
252252
* - ``platform_system``
253-
- ``platform.system()``
253+
- :py:func:`platform.system()`
254254
- ``Linux``, ``Windows``, ``Java``
255255
* - ``platform_version``
256-
- ``platform.version()``
256+
- :py:func:`platform.version()`
257257
- ``#1 SMP Fri Apr 25 13:07:35 EDT 2014``
258258
``Java HotSpot(TM) 64-Bit Server VM, 25.51-b03, Oracle Corporation``
259259
``Darwin Kernel Version 14.5.0: Wed Jul 29 02:18:53 PDT 2015; root:xnu-2782.40.9~2/RELEASE_X86_64``
260260
* - ``python_version``
261261
- ``'.'.join(platform.python_version_tuple()[:2])``
262262
- ``3.4``, ``2.7``
263263
* - ``python_full_version``
264-
- ``platform.python_version()``
264+
- :py:func:`platform.python_version()`
265265
- ``3.4.0``, ``3.5.0b1``
266266
* - ``implementation_name``
267-
- ``sys.implementation.name``
267+
- :py:data:`sys.implementation.name <sys.implementation>`
268268
- ``cpython``
269269
* - ``implementation_version``
270270
- see definition below
@@ -275,7 +275,7 @@ error like all other unknown variables.
275275
- ``test``
276276

277277
The ``implementation_version`` marker variable is derived from
278-
``sys.implementation.version``:
278+
:py:data:`sys.implementation.version <sys.implementation>`:
279279

280280
.. code-block:: python
281281

source/specifications/entry-points.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ example:
1818

1919
The entry point file format was originally developed to allow packages built
2020
with setuptools to provide integration point metadata that would be read at
21-
runtime with ``importlib.metadata``. It is now defined as a PyPA interoperability
22-
specification in order to allow build tools other than setuptools to publish
23-
``importlib.metadata`` compatible entry point metadata, and runtime libraries other
24-
than ``importlib.metadata`` to portably read published entry point metadata
21+
runtime with :py:mod:`importlib.metadata`. It is now defined as a PyPA interoperability
22+
specification in order to allow build tools other than ``setuptools`` to publish
23+
:py:mod:`importlib.metadata` compatible entry point metadata, and runtime libraries other
24+
than :py:mod:`importlib.metadata` to portably read published entry point metadata
2525
(potentially with different caching and conflict resolution strategies).
2626

2727
Data model
@@ -144,11 +144,11 @@ For instance, the entry point ``mycmd = mymod:main`` would create a command
144144

145145
The difference between ``console_scripts`` and ``gui_scripts`` only affects
146146
Windows systems. ``console_scripts`` are wrapped in a console executable,
147-
so they are attached to a console and can use ``sys.stdin``, ``sys.stdout`` and
148-
``sys.stderr`` for input and output. ``gui_scripts`` are wrapped in a GUI
149-
executable, so they can be started without a console, but cannot use standard
150-
streams unless application code redirects them. Other platforms do not have the
151-
same distinction.
147+
so they are attached to a console and can use :py:data:`sys.stdin`,
148+
:py:data:`sys.stdout` and :py:data:`sys.stderr` for input and output.
149+
``gui_scripts`` are wrapped in a GUI executable, so they can be started without
150+
a console, but cannot use standard streams unless application code redirects them.
151+
Other platforms do not have the same distinction.
152152

153153
Install tools are expected to set up wrappers for both ``console_scripts`` and
154154
``gui_scripts`` in the scripts directory of the install scheme. They are not

source/specifications/name-normalization.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Name format
1515
A valid name consists only of ASCII letters and numbers, period,
1616
underscore and hyphen. It must start and end with a letter or number.
1717
This means that valid project names are limited to those which match the
18-
following regex (run with ``re.IGNORECASE``)::
18+
following regex (run with :py:data:`re.IGNORECASE`)::
1919

2020
^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$
2121

source/specifications/platform-compatibility-tags.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ a distribution. Major implementations have abbreviated codes, initially:
4545
* pp: PyPy
4646
* jy: Jython
4747

48-
Other Python implementations should use ``sys.implementation.name``.
48+
Other Python implementations should use :py:data:`sys.implementation.name <sys.implementation>`.
4949

5050
The version is ``py_version_nodot``. CPython gets away with no dot,
5151
but if one is needed the underscore ``_`` is used instead. PyPy should
@@ -85,7 +85,7 @@ Platform Tag
8585
Basic platform tags
8686
-------------------
8787

88-
In its simplest form, the platform tag is ``sysconfig.get_platform()`` with
88+
In its simplest form, the platform tag is :py:func:`sysconfig.get_platform()` with
8989
all hyphens ``-`` and periods ``.`` replaced with underscore ``_``.
9090
Until the removal of :ref:`distutils` in Python 3.12, this
9191
was ``distutils.util.get_platform()``. For example:
@@ -113,7 +113,7 @@ The current standard is the future-proof ``manylinux_x_y`` standard. It defines
113113
tags of the form ``manylinux_x_y_arch``, where ``x`` and ``y`` are glibc major
114114
and minor versions supported (e.g. ``manylinux_2_24_xxx`` should work on any
115115
distro using glibc 2.24+), and ``arch`` is the architecture, matching the value
116-
of ``sysconfig.get_platform()`` on the system as in the "simple" form above.
116+
of :py:func:`sysconfig.get_platform()` on the system as in the "simple" form above.
117117

118118
The following older tags are still supported for backward compatibility:
119119

source/specifications/recording-installed-packages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ On Windows, directories may be separated either by forward- or backslashes
114114
The *hash* is either an empty string or the name of a hash algorithm from
115115
:py:data:`hashlib.algorithms_guaranteed`, followed by the equals character ``=`` and
116116
the digest of the file's contents, encoded with the urlsafe-base64-nopad
117-
encoding (``base64.urlsafe_b64encode(digest)`` with trailing ``=`` removed).
117+
encoding (:py:func:`base64.urlsafe_b64encode(digest) <base64.urlsafe_b64encode()>` with trailing ``=`` removed).
118118

119119
The *size* is either the empty string, or file's size in bytes,
120120
as a base 10 integer.

source/specifications/virtual-environments.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ there was no previously standardised mechanism for declaring or discovering them
1717
Runtime detection of virtual environments
1818
=========================================
1919

20-
At runtime, virtual environments can be identified by virtue of ``sys.prefix``
21-
(the filesystem location of the running interpreter) having a different value
22-
from ``sys.base_prefix`` (the default filesystem location of the standard library
23-
directories).
20+
At runtime, virtual environments can be identified by virtue of
21+
:py:data:`sys.prefix` (the filesystem location of the running interpreter)
22+
having a different value from :py:data:`sys.base_prefix` (the default filesystem
23+
location of the standard library directories).
2424

2525
:ref:`venv-explanation` in the Python standard library documentation for the
2626
:py:mod:`venv` module covers this along with the concept of "activating" a
@@ -45,9 +45,9 @@ nesting is required or desired.
4545

4646
Even in the absence of a ``pyvenv.cfg`` file, any approach (e.g.
4747
``sitecustomize.py``, patching the installed Python runtime) that results in
48-
``sys.prefix`` and ``sys.base_prefix`` having different values, while still
49-
providing a matching default package installation scheme in ``sysconfig``, will
50-
be detected and behave as a Python virtual environment.
48+
:py:data:`sys.prefix` and :py:data:`sys.base_prefix` having different values,
49+
while still providing a matching default package installation scheme in
50+
:py:mod:`sysconfig`, will be detected and behave as a Python virtual environment.
5151

5252

5353
History

0 commit comments

Comments
 (0)