From 4d1d1e598a50dae9debe33d90307841ce0f20b0a Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Sat, 22 Jul 2023 21:19:24 +0200 Subject: [PATCH 1/2] Docs: Use :c:var: consistently for Py_Version --- Doc/c-api/apiabiversion.rst | 2 +- Doc/library/ctypes.rst | 2 +- Doc/whatsnew/3.11.rst | 2 +- Misc/NEWS.d/3.11.0a4.rst | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Doc/c-api/apiabiversion.rst b/Doc/c-api/apiabiversion.rst index 62d542966622ce..f6c8284daeacb0 100644 --- a/Doc/c-api/apiabiversion.rst +++ b/Doc/c-api/apiabiversion.rst @@ -60,7 +60,7 @@ See :ref:`stable` for a discussion of API and ABI stability across versions. Use this for numeric comparisons, e.g. ``#if PY_VERSION_HEX >= ...``. - This version is also available via the symbol :data:`Py_Version`. + This version is also available via the symbol :c:var:`Py_Version`. .. c:var:: const unsigned long Py_Version diff --git a/Doc/library/ctypes.rst b/Doc/library/ctypes.rst index c253a45e1a8b54..bb31e78fff85a7 100644 --- a/Doc/library/ctypes.rst +++ b/Doc/library/ctypes.rst @@ -1099,7 +1099,7 @@ Accessing values exported from dlls ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Some shared libraries not only export functions, they also export variables. An -example in the Python library itself is the :c:data:`Py_Version`, Python +example in the Python library itself is the :c:var:`Py_Version`, Python runtime version number encoded in a single constant integer. :mod:`ctypes` can access values like this with the :meth:`in_dll` class methods of diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index bae78c1d9c205f..e16b8c7951bbcd 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -2203,7 +2203,7 @@ New Features suspend and resume tracing and profiling. (Contributed by Victor Stinner in :issue:`43760`.) -* Added the :c:data:`Py_Version` constant which bears the same value as +* Added the :c:var:`Py_Version` constant which bears the same value as :c:macro:`PY_VERSION_HEX`. (Contributed by Gabriele N. Tornetta in :issue:`43931`.) diff --git a/Misc/NEWS.d/3.11.0a4.rst b/Misc/NEWS.d/3.11.0a4.rst index 3dd335929d655f..bf83c8497ca6ff 100644 --- a/Misc/NEWS.d/3.11.0a4.rst +++ b/Misc/NEWS.d/3.11.0a4.rst @@ -409,7 +409,7 @@ keyword parameters. .. nonce: zpChDi .. section: Core and Builtins -Added the :c:data:`Py_Version` constant which bears the same value as +Added the :c:var:`Py_Version` constant which bears the same value as :c:macro:`PY_VERSION_HEX`. Patch by Gabriele N. Tornetta. .. From f0ee01d5cab8a36475cf4078e0d55ddc931c4843 Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Sat, 22 Jul 2023 23:40:16 +0200 Subject: [PATCH 2/2] Remove Doc/c-api/apiabiversion.rst from nitignore --- Doc/tools/.nitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/Doc/tools/.nitignore b/Doc/tools/.nitignore index 14d9b2e121d3b6..f87f9028c6d216 100644 --- a/Doc/tools/.nitignore +++ b/Doc/tools/.nitignore @@ -3,7 +3,6 @@ # Keep lines sorted lexicographically to help avoid merge conflicts. Doc/c-api/allocation.rst -Doc/c-api/apiabiversion.rst Doc/c-api/arg.rst Doc/c-api/bool.rst Doc/c-api/buffer.rst