]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] Use pep role instead of url (GH-121611) (#124173)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 17 Sep 2024 13:08:38 +0000 (15:08 +0200)
committerGitHub <noreply@github.com>
Tue, 17 Sep 2024 13:08:38 +0000 (13:08 +0000)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Doc/c-api/code.rst
Doc/c-api/refcounting.rst
Doc/faq/general.rst
Doc/library/ast.rst
Doc/library/sqlite3.rst
Doc/library/wsgiref.rst
Doc/whatsnew/2.7.rst
Doc/whatsnew/3.12.rst
Doc/whatsnew/3.4.rst
Doc/whatsnew/3.7.rst
Misc/NEWS.d/3.11.0b1.rst

index f6fdd7574323c7ef6ee15388a0818faebf0a8a08..d7e89b7348fae331a90f62048c4c1faf3f11230c 100644 (file)
@@ -90,8 +90,8 @@ bound into a function.
     Return the line number of the instruction that occurs on or before ``byte_offset`` and ends after it.
     If you just need the line number of a frame, use :c:func:`PyFrame_GetLineNumber` instead.
 
-    For efficiently iterating over the line numbers in a code object, use `the API described in PEP 626
-    <https://peps.python.org/pep-0626/#out-of-process-debuggers-and-profilers>`_.
+    For efficiently iterating over the line numbers in a code object, use :pep:`the API described in PEP 626
+    <0626#out-of-process-debuggers-and-profilers>`.
 
 .. c:function:: int PyCode_Addr2Location(PyObject *co, int byte_offset, int *start_line, int *start_column, int *end_line, int *end_column)
 
index a484fa4469a184adfc92b4d4e68cb280ee78e395..158aa73745957d88b468c1a55b96fbdc664eb812 100644 (file)
@@ -59,7 +59,7 @@ of Python objects.
    ``NULL``, use :c:func:`Py_XINCREF`.
 
    Do not expect this function to actually modify *o* in any way.
-   For at least `some objects <https://peps.python.org/pep-0683/>`_,
+   For at least :pep:`some objects <0683>`,
    this function has no effect.
 
    .. versionchanged:: 3.12
@@ -125,7 +125,7 @@ of Python objects.
    use :c:func:`Py_XDECREF`.
 
    Do not expect this function to actually modify *o* in any way.
-   For at least `some objects <https://peps.python.org/pep-0683/>`_,
+   For at least :pep:`some objects <683>`,
    this function has no effect.
 
    .. warning::
index eb859c5d5992dad76440b85da02c609ac4858dee..31df5ebbfb83dd916e8f02aa2e6aac2a8c317029 100644 (file)
@@ -311,8 +311,8 @@ releases.
 The latest stable releases can always be found on the `Python download page
 <https://www.python.org/downloads/>`_.  There are two production-ready versions
 of Python: 2.x and 3.x. The recommended version is 3.x, which is supported by
-most widely used libraries.  Although 2.x is still widely used, `it is not
-maintained anymore <https://peps.python.org/pep-0373/>`_.
+most widely used libraries.  Although 2.x is still widely used, :pep:`it is not
+maintained anymore <0373>`.
 
 How many people are using Python?
 ---------------------------------
index 46e5e8f63da5a5d94a88ed08a38139d6a7dc2419..e745924dac111aea694b1d012743555ccdef7c89 100644 (file)
@@ -2060,8 +2060,7 @@ Function and class definitions
    * ``name`` is a raw string for the class name
    * ``bases`` is a list of nodes for explicitly specified base classes.
    * ``keywords`` is a list of :class:`.keyword` nodes, principally for 'metaclass'.
-     Other keywords will be passed to the metaclass, as per `PEP-3115
-     <https://peps.python.org/pep-3115/>`_.
+     Other keywords will be passed to the metaclass, as per :pep:`3115`.
    * ``body`` is a list of nodes representing the code within the class
      definition.
    * ``decorator_list`` is a list of nodes, as in :class:`FunctionDef`.
index 6d078c59223c18117c018eb421865b7a1306042e..e85a63531a36aaa9a001277d2d6add6732e2d866 100644 (file)
@@ -519,21 +519,20 @@ Module constants
    The mappings from SQLite threading modes to DB-API 2.0 threadsafety levels
    are as follows:
 
-   +------------------+-----------------+----------------------+-------------------------------+
-   | SQLite threading | `threadsafety`_ | `SQLITE_THREADSAFE`_ | DB-API 2.0 meaning            |
-   | mode             |                 |                      |                               |
-   +==================+=================+======================+===============================+
-   | single-thread    | 0               | 0                    | Threads may not share the     |
-   |                  |                 |                      | module                        |
-   +------------------+-----------------+----------------------+-------------------------------+
-   | multi-thread     | 1               | 2                    | Threads may share the module, |
-   |                  |                 |                      | but not connections           |
-   +------------------+-----------------+----------------------+-------------------------------+
-   | serialized       | 3               | 1                    | Threads may share the module, |
-   |                  |                 |                      | connections and cursors       |
-   +------------------+-----------------+----------------------+-------------------------------+
-
-   .. _threadsafety: https://peps.python.org/pep-0249/#threadsafety
+   +------------------+----------------------+----------------------+-------------------------------+
+   | SQLite threading | :pep:`threadsafety   | `SQLITE_THREADSAFE`_ | DB-API 2.0 meaning            |
+   | mode             | <0249#threadsafety>` |                      |                               |
+   +==================+======================+======================+===============================+
+   | single-thread    | 0                    | 0                    | Threads may not share the     |
+   |                  |                      |                      | module                        |
+   +------------------+----------------------+----------------------+-------------------------------+
+   | multi-thread     | 1                    | 2                    | Threads may share the module, |
+   |                  |                      |                      | but not connections           |
+   +------------------+----------------------+----------------------+-------------------------------+
+   | serialized       | 3                    | 1                    | Threads may share the module, |
+   |                  |                      |                      | connections and cursors       |
+   +------------------+----------------------+----------------------+-------------------------------+
+
    .. _SQLITE_THREADSAFE: https://sqlite.org/compile.html#threadsafe
 
    .. versionchanged:: 3.11
index 6faf7e8ccd81ca556b70d1e2861787207a8ac94d..95327736eb8b43ddc63cb887cf22483ec7cc12ba 100644 (file)
@@ -783,8 +783,8 @@ in :pep:`3333`.
 
 .. class:: StartResponse()
 
-   A :class:`typing.Protocol` describing `start_response()
-   <https://peps.python.org/pep-3333/#the-start-response-callable>`_
+   A :class:`typing.Protocol` describing :pep:`start_response()
+   <3333#the-start-response-callable>`
    callables (:pep:`3333`).
 
 .. data:: WSGIEnvironment
@@ -797,18 +797,18 @@ in :pep:`3333`.
 
 .. class:: InputStream()
 
-   A :class:`typing.Protocol` describing a `WSGI Input Stream
-   <https://peps.python.org/pep-3333/#input-and-error-streams>`_.
+   A :class:`typing.Protocol` describing a :pep:`WSGI Input Stream
+   <3333#input-and-error-streams>`.
 
 .. class:: ErrorStream()
 
-   A :class:`typing.Protocol` describing a `WSGI Error Stream
-   <https://peps.python.org/pep-3333/#input-and-error-streams>`_.
+   A :class:`typing.Protocol` describing a :pep:`WSGI Error Stream
+   <3333#input-and-error-streams>`.
 
 .. class:: FileWrapper()
 
-   A :class:`typing.Protocol` describing a `file wrapper
-   <https://peps.python.org/pep-3333/#optional-platform-specific-file-handling>`_.
+   A :class:`typing.Protocol` describing a :pep:`file wrapper
+   <3333#optional-platform-specific-file-handling>`.
    See :class:`wsgiref.util.FileWrapper` for a concrete implementation of this
    protocol.
 
index a599393ff397e1ee8fbdbdd530622c62c9695f28..1231bd76fd2ce255c51d63a05837e2a1de08ce92 100644 (file)
@@ -2680,14 +2680,12 @@ automatic ``PATH`` modifications to have ``pip`` available from the command
 line by default, otherwise it can still be accessed through the Python
 launcher for Windows as ``py -m pip``.
 
-As `discussed in the PEP`__, platform packagers may choose not to install
+As :pep:`discussed in the PEP <0477#disabling-ensurepip-by-downstream-distributors>`,
+platform packagers may choose not to install
 these commands by default, as long as, when invoked, they provide clear and
 simple directions on how to install them on that platform (usually using
 the system package manager).
 
-__ https://peps.python.org/pep-0477/#disabling-ensurepip-by-downstream-distributors
-
-
 Documentation Changes
 ~~~~~~~~~~~~~~~~~~~~~
 
index b1eae4732923a11d6dd8d1f9e37bef49f86563fe..3d213076199b4d7250c9022908c570ae4a9e4338 100644 (file)
@@ -154,7 +154,7 @@ Important deprecations, removals or restrictions:
   reducing the size of every :class:`str` object by at least 8 bytes.
 
 * :pep:`632`: Remove the :mod:`!distutils` package.
-  See `the migration guide <https://peps.python.org/pep-0632/#migration-advice>`_
+  See :pep:`the migration guide <0632#migration-advice>`
   for advice replacing the APIs it provided.
   The third-party `Setuptools <https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html>`__
   package continues to provide :mod:`!distutils`,
index 9aa04e84e481ad663f08127fa2ba72e29cbe417c..3cf50e428e21fb9fe53caf864099d3216cff8fb9 100644 (file)
@@ -215,13 +215,12 @@ automatic ``PATH`` modifications to have ``pip`` available from the command
 line by default, otherwise it can still be accessed through the Python
 launcher for Windows as ``py -m pip``.
 
-As `discussed in the PEP`__, platform packagers may choose not to install
+As :pep:`discussed in the PEP <0453#recommendations-for-downstream-distributors>`
+platform packagers may choose not to install
 these commands by default, as long as, when invoked, they provide clear and
 simple directions on how to install them on that platform (usually using
 the system package manager).
 
-__ https://peps.python.org/pep-0453/#recommendations-for-downstream-distributors
-
 .. note::
 
    To avoid conflicts between parallel Python 2 and Python 3 installations,
index 6806ac205b248c49436e6051dacba75e9fcbf499..996d0a93cae5fc1f0b724aff48796fb522e1b7ed 100644 (file)
@@ -353,7 +353,7 @@ module:
 
 The new functions return the number of nanoseconds as an integer value.
 
-`Measurements <https://peps.python.org/pep-0564/#annex-clocks-resolution-in-python>`_
+:pep:`Measurements <0564#annex-clocks-resolution-in-python>`
 show that on Linux and Windows the resolution of :func:`time.time_ns` is
 approximately 3 times better than that of :func:`time.time`.
 
index 00ebe79a694e4c4dd77eec197f7146e4adf70317..cb17498fba0c11964c86e766e267048549e0c9dd 100644 (file)
@@ -1801,8 +1801,8 @@ The documentation now lists which members of C structs are part of the
 .. section: Documentation
 
 All docstrings in code snippets are now wrapped into :c:macro:`PyDoc_STR` to
-follow the guideline of `PEP 7's Documentation Strings paragraph
-<https://www.python.org/dev/peps/pep-0007/#documentation-strings>`_. Patch
+follow the guideline of :pep:`PEP 7's Documentation Strings paragraph
+<0007#documentation-strings>`. Patch
 by Oleg Iarygin.
 
 ..