From 3316374bd480916b08fee75debae64a8014bc40d Mon Sep 17 00:00:00 2001 From: Xia Jiang Date: Sat, 24 Oct 2026 23:35:23 +0800 Subject: [PATCH 1/2] Add missing intersphinx prefixes to cross-references Seven :ref: targets in the extension, clinic, and documentation pages resolved to nothing because their labels live in the CPython docs. Prefix them with the python: intersphinx name. --- developer-workflow/extension-modules.rst | 4 ++-- development-tools/clinic/howto.rst | 6 +++--- development-tools/clinic/index.rst | 2 +- documentation/start-documenting.rst | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/developer-workflow/extension-modules.rst b/developer-workflow/extension-modules.rst index cab46c834b..c78fff3014 100644 --- a/developer-workflow/extension-modules.rst +++ b/developer-workflow/extension-modules.rst @@ -615,7 +615,7 @@ using `Podman `__. Missing ``Py_BUILD_CORE`` define when using internal headers ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -By default, the CPython :ref:`Stable ABI ` is exposed via +By default, the CPython :ref:`Stable ABI ` is exposed via :code:`#include "Python.h"`. In some cases, this may be insufficient and internal headers from :cpy-file:`Include/internal` are needed; in particular, those headers require the :c:macro:`!Py_BUILD_CORE` @@ -650,7 +650,7 @@ Restricting to the Limited API ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In order for non-CPython implementations to benefit from new extension modules, -it is recommended to use the :ref:`Limited API `. Instead of +it is recommended to use the :ref:`Limited API `. Instead of exposing the entire Stable ABI, define the :c:macro:`Py_LIMITED_API` macro *before* the :code:`#include "Python.h"` directive: diff --git a/development-tools/clinic/howto.rst b/development-tools/clinic/howto.rst index 43e8c20e87..fe78f66fea 100644 --- a/development-tools/clinic/howto.rst +++ b/development-tools/clinic/howto.rst @@ -219,7 +219,7 @@ of these arguments, along with their meanings: *converter* Only supported by the ``object`` converter. Specifies the name of a - :ref:`C "converter function" ` + :ref:`C "converter function" ` to use to convert this object to a native type. *encoding* @@ -677,7 +677,7 @@ How to use the "defining class" converter ----------------------------------------- Argument Clinic facilitates gaining access to the defining class of a method. -This is useful for :ref:`heap type ` methods that need to fetch +This is useful for :ref:`heap type ` methods that need to fetch module level state. Use :c:func:`PyType_FromModuleAndSpec` to associate a new heap type with a module. You can now use :c:func:`PyType_GetModuleState` on the defining class to fetch the module state, for example from a module method. @@ -1267,7 +1267,7 @@ How to use the Limited C API If Argument Clinic :term:`input` is located within a C source file that contains ``#define Py_LIMITED_API``, Argument Clinic will generate C code -that uses the :ref:`Limited API ` to parse arguments. The +that uses the :ref:`Limited API ` to parse arguments. The advantage of this is that the generated code will not use private functions. However, this *can* result in Argument Clinic generating less efficient code in some cases. The extent of the performance penalty will depend diff --git a/development-tools/clinic/index.rst b/development-tools/clinic/index.rst index b6d351983e..b224461425 100644 --- a/development-tools/clinic/index.rst +++ b/development-tools/clinic/index.rst @@ -193,7 +193,7 @@ The CLI supports the following options: .. option:: --limited - Use the :ref:`Limited API ` to parse arguments in the generated C code. + Use the :ref:`Limited API ` to parse arguments in the generated C code. See :ref:`clinic-howto-limited-capi`. .. option:: FILE ... diff --git a/documentation/start-documenting.rst b/documentation/start-documenting.rst index 917cb30bfa..2a9be53dd6 100644 --- a/documentation/start-documenting.rst +++ b/documentation/start-documenting.rst @@ -25,7 +25,7 @@ written using the :ref:`reStructuredText format ` and contained in the If you're interested in contributing to Python's documentation, there's no need to write reStructuredText if you're not so inclined; plain text contributions are more than welcome as well. Send an e-mail to - docs@python.org or open an issue on the :ref:`tracker `. + docs@python.org or open an issue on the :ref:`tracker `. Introduction From 0c925aa73150864b887730b48e5ef5ed548cb2a4 Mon Sep 17 00:00:00 2001 From: Xia Jiang Date: Sat, 24 Oct 2026 23:42:46 +0800 Subject: [PATCH 2/2] Trigger CLA recheck