diff options
author | Stanley <46876382+slateny@users.noreply.github.com> | 2022-10-26 03:26:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-26 03:26:28 (GMT) |
commit | 268129a74f01adb7bb14cd71d1f38378e39d304d (patch) | |
tree | 88fca273962c4f769c0c47d52cdcb0156cc34762 /Doc | |
parent | 0ca6a4d64086055a8a3aa4b4c024fc080de148ab (diff) | |
download | cpython-268129a74f01adb7bb14cd71d1f38378e39d304d.zip cpython-268129a74f01adb7bb14cd71d1f38378e39d304d.tar.gz cpython-268129a74f01adb7bb14cd71d1f38378e39d304d.tar.bz2 |
docs: Change links to label refs (#98454)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/howto/clinic.rst | 2 | ||||
-rw-r--r-- | Doc/howto/isolating-extensions.rst | 2 | ||||
-rw-r--r-- | Doc/library/dataclasses.rst | 2 | ||||
-rw-r--r-- | Doc/library/importlib.metadata.rst | 3 | ||||
-rw-r--r-- | Doc/reference/datamodel.rst | 2 | ||||
-rw-r--r-- | Doc/using/venv-create.inc | 4 | ||||
-rw-r--r-- | Doc/whatsnew/2.2.rst | 2 | ||||
-rw-r--r-- | Doc/whatsnew/3.6.rst | 2 | ||||
-rw-r--r-- | Doc/whatsnew/3.8.rst | 4 |
9 files changed, 14 insertions, 9 deletions
diff --git a/Doc/howto/clinic.rst b/Doc/howto/clinic.rst index b8afc7e..a97f1d2 100644 --- a/Doc/howto/clinic.rst +++ b/Doc/howto/clinic.rst @@ -1,5 +1,7 @@ .. highlight:: c +.. _howto-clinic: + ********************** Argument Clinic How-To ********************** diff --git a/Doc/howto/isolating-extensions.rst b/Doc/howto/isolating-extensions.rst index 2657b4e..2eddb58 100644 --- a/Doc/howto/isolating-extensions.rst +++ b/Doc/howto/isolating-extensions.rst @@ -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. diff --git a/Doc/library/dataclasses.rst b/Doc/library/dataclasses.rst index 4364ac3..ab8df8b 100644 --- a/Doc/library/dataclasses.rst +++ b/Doc/library/dataclasses.rst @@ -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, diff --git a/Doc/library/importlib.metadata.rst b/Doc/library/importlib.metadata.rst index 4b94ccc..988d1a3 100644 --- a/Doc/library/importlib.metadata.rst +++ b/Doc/library/importlib.metadata.rst @@ -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 diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 9dacd66..301f41f 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -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__* """""""""""""""""""""""""" diff --git a/Doc/using/venv-create.inc b/Doc/using/venv-create.inc index fd8cc01..d535b25 100644 --- a/Doc/using/venv-create.inc +++ b/Doc/using/venv-create.inc @@ -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. diff --git a/Doc/whatsnew/2.2.rst b/Doc/whatsnew/2.2.rst index 3999766..0c3bfda 100644 --- a/Doc/whatsnew/2.2.rst +++ b/Doc/whatsnew/2.2.rst @@ -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. diff --git a/Doc/whatsnew/3.6.rst b/Doc/whatsnew/3.6.rst index 9308d1a..e4294c8 100644 --- a/Doc/whatsnew/3.6.rst +++ b/Doc/whatsnew/3.6.rst @@ -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 ~~~~ diff --git a/Doc/whatsnew/3.8.rst b/Doc/whatsnew/3.8.rst index 95aa6f7..37a6cf2 100644 --- a/Doc/whatsnew/3.8.rst +++ b/Doc/whatsnew/3.8.rst @@ -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 |