]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
docs: Change links to label refs (#98454)
authorStanley <46876382+slateny@users.noreply.github.com>
Wed, 26 Oct 2022 03:26:28 +0000 (20:26 -0700)
committerGitHub <noreply@github.com>
Wed, 26 Oct 2022 03:26:28 +0000 (20:26 -0700)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Doc/howto/clinic.rst
Doc/howto/isolating-extensions.rst
Doc/library/dataclasses.rst
Doc/library/importlib.metadata.rst
Doc/reference/datamodel.rst
Doc/using/venv-create.inc
Doc/whatsnew/2.2.rst
Doc/whatsnew/3.6.rst
Doc/whatsnew/3.8.rst
Misc/NEWS.d/3.9.0a3.rst

index b8afc7e6d762aa8ca3e39bd1fa330d037ac72dac..a97f1d23f53f3184a5e20af435b307c8ee7a417b 100644 (file)
@@ -1,5 +1,7 @@
 .. highlight:: c
 
+.. _howto-clinic:
+
 **********************
 Argument Clinic How-To
 **********************
index 2657b4ec6aaf9fa4c6ad51ae60bf3e7c8ee1c184..2eddb582da7c248b455768e516125f6bdf352143 100644 (file)
@@ -461,7 +461,7 @@ Module State Access from Slot Methods, Getters and Setters
 
    .. After adding to limited API:
 
-      If you use the `limited API <https://docs.python.org/3/c-api/stable.html>__,
+      If you use the :ref:`limited API <stable>,
       you must update ``Py_LIMITED_API`` to ``0x030b0000``, losing ABI
       compatibility with earlier versions.
 
index 4364ac342471eb672f959bae38f74d33d02efe07..ab8df8b02c5f7f2df89ba9e7f56f8ca10f938e7b 100644 (file)
@@ -191,7 +191,7 @@ Module contents
     .. versionchanged:: 3.11
        If a field name is already included in the ``__slots__``
        of a base class, it will not be included in the generated ``__slots__``
-       to prevent `overriding them <https://docs.python.org/3/reference/datamodel.html#notes-on-using-slots>`_.
+       to prevent :ref:`overriding them <datamodel-note-slots>`.
        Therefore, do not use ``__slots__`` to retrieve the field names of a
        dataclass. Use :func:`fields` instead.
        To be able to determine inherited slots,
index 4b94ccc49c47e71128fd836b72cbf1bd669b72c3..988d1a317f596029ff3aae12fef46dcf93c4abbb 100644 (file)
@@ -360,7 +360,7 @@ Because `Distribution Package <https://packaging.python.org/en/latest/glossary/#
 is not available through :data:`sys.path` searches, or
 package loaders directly,
 the metadata for a distribution is found through import
-system `finders`_.  To find a distribution package's metadata,
+system :ref:`finders <finders-and-loaders>`.  To find a distribution package's metadata,
 ``importlib.metadata`` queries the list of :term:`meta path finders <meta path finder>` on
 :data:`sys.meta_path`.
 
@@ -396,4 +396,3 @@ a custom finder, return instances of this derived ``Distribution`` in the
 
 .. _`entry point API`: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#entry-points
 .. _`metadata API`: https://setuptools.readthedocs.io/en/latest/pkg_resources.html#metadata-api
-.. _`finders`: https://docs.python.org/3/reference/import.html#finders-and-loaders
index 9dacd66ee564fd5850b733fb0da997af0fdd71b0..301f41f3952c961400806ae35c7b6707022f6825 100644 (file)
@@ -1904,6 +1904,8 @@ Attribute lookup speed can be significantly improved as well.
    and *__weakref__* for each instance.
 
 
+.. _datamodel-note-slots:
+
 Notes on using *__slots__*
 """"""""""""""""""""""""""
 
index fd8cc019b4d1a835105ef1524f6f256129b168c3..d535b254f05698bb2116a3c6018e56c86f9c750d 100644 (file)
@@ -16,8 +16,8 @@ re-used.
 
 .. deprecated:: 3.6
    ``pyvenv`` was the recommended tool for creating virtual environments for
-   Python 3.3 and 3.4, and is `deprecated in Python 3.6
-   <https://docs.python.org/dev/whatsnew/3.6.html#id8>`_.
+   Python 3.3 and 3.4, and is
+   :ref:`deprecated in Python 3.6 <whatsnew36-venv>`.
 
 .. versionchanged:: 3.5
    The use of ``venv`` is now recommended for creating virtual environments.
index 39997661bb96c4f29ae58cfed8db52dcce88110f..0c3bfda19339573c9e5986ff73085548b674ff52 100644 (file)
@@ -395,7 +395,7 @@ This section has just been a quick overview of the new features, giving enough
 of an explanation to start you programming, but many details have been
 simplified or ignored.  Where should you go to get a more complete picture?
 
-https://docs.python.org/dev/howto/descriptor.html is a lengthy tutorial introduction to
+The :ref:`descriptorhowto` is a lengthy tutorial introduction to
 the descriptor features, written by Guido van Rossum. If my description has
 whetted your appetite, go read this tutorial next, because it goes into much
 more detail about the new features while still remaining quite easy to read.
index 9308d1a76fec7a1bf98916001bf38e618640c0e4..e4294c88b58572142fe3501f592ce7f84f72ab27 100644 (file)
@@ -2052,6 +2052,8 @@ tkinter
 The :mod:`tkinter.tix` module is now deprecated.  :mod:`tkinter` users
 should use :mod:`tkinter.ttk` instead.
 
+.. _whatsnew36-venv:
+
 venv
 ~~~~
 
index 95aa6f7a8582aef72340711e2c67b255035d9d31..37a6cf24e545629cc4df9f2eff169aa4f3c7fd27 100644 (file)
@@ -122,8 +122,8 @@ Positional-only parameters
 There is a new function parameter syntax ``/`` to indicate that some
 function parameters must be specified positionally and cannot be used as
 keyword arguments.  This is the same notation shown by ``help()`` for C
-functions annotated with Larry Hastings' `Argument Clinic
-<https://docs.python.org/3/howto/clinic.html>`_ tool.
+functions annotated with Larry Hastings'
+:ref:`Argument Clinic <howto-clinic>` tool.
 
 In the following example, parameters *a* and *b* are positional-only,
 while *c* or *d* can be positional or keyword, and *e* or *f* are
index 77ccc7453c2157a520876759bc161b34fd716bdb..54b61ca3b7785f19bbc2c99d849ae8a05c819632 100644 (file)
@@ -805,8 +805,7 @@ event loop only if called from the main thread.
 .. section: Documentation
 
 Add an entry for ``__module__`` in the "function" & "method" sections of the
-`inspect docs types and members table
-<https://docs.python.org/3/library/inspect.html#types-and-members>`_
+:mod:`inspect` docs' :ref:`inspect-types` table.
 
 ..