Skip to content

Commit a032a96

Browse files
[3.12] Use pep role instead of url (GH-121611) (#124173)
Co-authored-by: Rafael Fontenelle <[email protected]>
1 parent c54ee87 commit a032a96

File tree

11 files changed

+37
-42
lines changed

11 files changed

+37
-42
lines changed

Doc/c-api/code.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ bound into a function.
9090
Return the line number of the instruction that occurs on or before ``byte_offset`` and ends after it.
9191
If you just need the line number of a frame, use :c:func:`PyFrame_GetLineNumber` instead.
9292
93-
For efficiently iterating over the line numbers in a code object, use `the API described in PEP 626
94-
<https://peps.python.org/pep-0626/#out-of-process-debuggers-and-profilers>`_.
93+
For efficiently iterating over the line numbers in a code object, use :pep:`the API described in PEP 626
94+
<0626#out-of-process-debuggers-and-profilers>`.
9595
9696
.. c:function:: int PyCode_Addr2Location(PyObject *co, int byte_offset, int *start_line, int *start_column, int *end_line, int *end_column)
9797

Doc/c-api/refcounting.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ of Python objects.
5959
``NULL``, use :c:func:`Py_XINCREF`.
6060
6161
Do not expect this function to actually modify *o* in any way.
62-
For at least `some objects <https://peps.python.org/pep-0683/>`_,
62+
For at least :pep:`some objects <0683>`,
6363
this function has no effect.
6464
6565
.. versionchanged:: 3.12
@@ -125,7 +125,7 @@ of Python objects.
125125
use :c:func:`Py_XDECREF`.
126126
127127
Do not expect this function to actually modify *o* in any way.
128-
For at least `some objects <https://peps.python.org/pep-0683/>`_,
128+
For at least :pep:`some objects <683>`,
129129
this function has no effect.
130130
131131
.. warning::

Doc/faq/general.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ releases.
311311
The latest stable releases can always be found on the `Python download page
312312
<https://www.python.org/downloads/>`_. There are two production-ready versions
313313
of Python: 2.x and 3.x. The recommended version is 3.x, which is supported by
314-
most widely used libraries. Although 2.x is still widely used, `it is not
315-
maintained anymore <https://peps.python.org/pep-0373/>`_.
314+
most widely used libraries. Although 2.x is still widely used, :pep:`it is not
315+
maintained anymore <0373>`.
316316

317317
How many people are using Python?
318318
---------------------------------

Doc/library/ast.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2060,8 +2060,7 @@ Function and class definitions
20602060
* ``name`` is a raw string for the class name
20612061
* ``bases`` is a list of nodes for explicitly specified base classes.
20622062
* ``keywords`` is a list of :class:`.keyword` nodes, principally for 'metaclass'.
2063-
Other keywords will be passed to the metaclass, as per `PEP-3115
2064-
<https://peps.python.org/pep-3115/>`_.
2063+
Other keywords will be passed to the metaclass, as per :pep:`3115`.
20652064
* ``body`` is a list of nodes representing the code within the class
20662065
definition.
20672066
* ``decorator_list`` is a list of nodes, as in :class:`FunctionDef`.

Doc/library/sqlite3.rst

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -519,21 +519,20 @@ Module constants
519519
The mappings from SQLite threading modes to DB-API 2.0 threadsafety levels
520520
are as follows:
521521

522-
+------------------+-----------------+----------------------+-------------------------------+
523-
| SQLite threading | `threadsafety`_ | `SQLITE_THREADSAFE`_ | DB-API 2.0 meaning |
524-
| mode | | | |
525-
+==================+=================+======================+===============================+
526-
| single-thread | 0 | 0 | Threads may not share the |
527-
| | | | module |
528-
+------------------+-----------------+----------------------+-------------------------------+
529-
| multi-thread | 1 | 2 | Threads may share the module, |
530-
| | | | but not connections |
531-
+------------------+-----------------+----------------------+-------------------------------+
532-
| serialized | 3 | 1 | Threads may share the module, |
533-
| | | | connections and cursors |
534-
+------------------+-----------------+----------------------+-------------------------------+
535-
536-
.. _threadsafety: https://peps.python.org/pep-0249/#threadsafety
522+
+------------------+----------------------+----------------------+-------------------------------+
523+
| SQLite threading | :pep:`threadsafety | `SQLITE_THREADSAFE`_ | DB-API 2.0 meaning |
524+
| mode | <0249#threadsafety>` | | |
525+
+==================+======================+======================+===============================+
526+
| single-thread | 0 | 0 | Threads may not share the |
527+
| | | | module |
528+
+------------------+----------------------+----------------------+-------------------------------+
529+
| multi-thread | 1 | 2 | Threads may share the module, |
530+
| | | | but not connections |
531+
+------------------+----------------------+----------------------+-------------------------------+
532+
| serialized | 3 | 1 | Threads may share the module, |
533+
| | | | connections and cursors |
534+
+------------------+----------------------+----------------------+-------------------------------+
535+
537536
.. _SQLITE_THREADSAFE: https://sqlite.org/compile.html#threadsafe
538537

539538
.. versionchanged:: 3.11

Doc/library/wsgiref.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -783,8 +783,8 @@ in :pep:`3333`.
783783

784784
.. class:: StartResponse()
785785

786-
A :class:`typing.Protocol` describing `start_response()
787-
<https://peps.python.org/pep-3333/#the-start-response-callable>`_
786+
A :class:`typing.Protocol` describing :pep:`start_response()
787+
<3333#the-start-response-callable>`
788788
callables (:pep:`3333`).
789789

790790
.. data:: WSGIEnvironment
@@ -797,18 +797,18 @@ in :pep:`3333`.
797797

798798
.. class:: InputStream()
799799

800-
A :class:`typing.Protocol` describing a `WSGI Input Stream
801-
<https://peps.python.org/pep-3333/#input-and-error-streams>`_.
800+
A :class:`typing.Protocol` describing a :pep:`WSGI Input Stream
801+
<3333#input-and-error-streams>`.
802802

803803
.. class:: ErrorStream()
804804

805-
A :class:`typing.Protocol` describing a `WSGI Error Stream
806-
<https://peps.python.org/pep-3333/#input-and-error-streams>`_.
805+
A :class:`typing.Protocol` describing a :pep:`WSGI Error Stream
806+
<3333#input-and-error-streams>`.
807807

808808
.. class:: FileWrapper()
809809

810-
A :class:`typing.Protocol` describing a `file wrapper
811-
<https://peps.python.org/pep-3333/#optional-platform-specific-file-handling>`_.
810+
A :class:`typing.Protocol` describing a :pep:`file wrapper
811+
<3333#optional-platform-specific-file-handling>`.
812812
See :class:`wsgiref.util.FileWrapper` for a concrete implementation of this
813813
protocol.
814814

Doc/whatsnew/2.7.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2680,14 +2680,12 @@ automatic ``PATH`` modifications to have ``pip`` available from the command
26802680
line by default, otherwise it can still be accessed through the Python
26812681
launcher for Windows as ``py -m pip``.
26822682

2683-
As `discussed in the PEP`__, platform packagers may choose not to install
2683+
As :pep:`discussed in the PEP <0477#disabling-ensurepip-by-downstream-distributors>`,
2684+
platform packagers may choose not to install
26842685
these commands by default, as long as, when invoked, they provide clear and
26852686
simple directions on how to install them on that platform (usually using
26862687
the system package manager).
26872688

2688-
__ https://peps.python.org/pep-0477/#disabling-ensurepip-by-downstream-distributors
2689-
2690-
26912689
Documentation Changes
26922690
~~~~~~~~~~~~~~~~~~~~~
26932691

Doc/whatsnew/3.12.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Important deprecations, removals or restrictions:
154154
reducing the size of every :class:`str` object by at least 8 bytes.
155155

156156
* :pep:`632`: Remove the :mod:`!distutils` package.
157-
See `the migration guide <https://peps.python.org/pep-0632/#migration-advice>`_
157+
See :pep:`the migration guide <0632#migration-advice>`
158158
for advice replacing the APIs it provided.
159159
The third-party `Setuptools <https://setuptools.pypa.io/en/latest/deprecated/distutils-legacy.html>`__
160160
package continues to provide :mod:`!distutils`,

Doc/whatsnew/3.4.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,12 @@ automatic ``PATH`` modifications to have ``pip`` available from the command
215215
line by default, otherwise it can still be accessed through the Python
216216
launcher for Windows as ``py -m pip``.
217217

218-
As `discussed in the PEP`__, platform packagers may choose not to install
218+
As :pep:`discussed in the PEP <0453#recommendations-for-downstream-distributors>`
219+
platform packagers may choose not to install
219220
these commands by default, as long as, when invoked, they provide clear and
220221
simple directions on how to install them on that platform (usually using
221222
the system package manager).
222223

223-
__ https://peps.python.org/pep-0453/#recommendations-for-downstream-distributors
224-
225224
.. note::
226225

227226
To avoid conflicts between parallel Python 2 and Python 3 installations,

Doc/whatsnew/3.7.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ module:
353353

354354
The new functions return the number of nanoseconds as an integer value.
355355

356-
`Measurements <https://peps.python.org/pep-0564/#annex-clocks-resolution-in-python>`_
356+
:pep:`Measurements <0564#annex-clocks-resolution-in-python>`
357357
show that on Linux and Windows the resolution of :func:`time.time_ns` is
358358
approximately 3 times better than that of :func:`time.time`.
359359

Misc/NEWS.d/3.11.0b1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1801,8 +1801,8 @@ The documentation now lists which members of C structs are part of the
18011801
.. section: Documentation
18021802
18031803
All docstrings in code snippets are now wrapped into :c:macro:`PyDoc_STR` to
1804-
follow the guideline of `PEP 7's Documentation Strings paragraph
1805-
<https://www.python.org/dev/peps/pep-0007/#documentation-strings>`_. Patch
1804+
follow the guideline of :pep:`PEP 7's Documentation Strings paragraph
1805+
<0007#documentation-strings>`. Patch
18061806
by Oleg Iarygin.
18071807

18081808
..

0 commit comments

Comments
 (0)