Skip to content

Commit c12f81e

Browse files
authored
[3.13] GH-121970: Rewrite the C-API annotations extension (#121985) (#122027)
GH-121970: Rewrite the C-API annotations extension (#121985) Co-authored-by: Petr Viktorin <[email protected]> (cherry picked from commit 22c9d9c)
1 parent 1565093 commit c12f81e

File tree

6 files changed

+1155
-1066
lines changed

6 files changed

+1155
-1066
lines changed

Doc/.ruff.toml

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ line-length = 79
55
extend-exclude = [
66
"includes/*",
77
# Temporary exclusions:
8-
"tools/extensions/c_annotations.py",
98
"tools/extensions/escape4chm.py",
109
"tools/extensions/patchlevel.py",
1110
"tools/extensions/pyspecific.py",

Doc/c-api/module.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@ The available slot types are:
342342
The *value* pointer of this slot must point to a function of the signature:
343343
344344
.. c:function:: PyObject* create_module(PyObject *spec, PyModuleDef *def)
345-
:noindex:
345+
:no-index-entry:
346+
:no-contents-entry:
346347
347348
The function receives a :py:class:`~importlib.machinery.ModuleSpec`
348349
instance, as defined in :PEP:`451`, and the module definition.
@@ -377,7 +378,8 @@ The available slot types are:
377378
The signature of the function is:
378379
379380
.. c:function:: int exec_module(PyObject* module)
380-
:noindex:
381+
:no-index-entry:
382+
:no-contents-entry:
381383
382384
If multiple ``Py_mod_exec`` slots are specified, they are processed in the
383385
order they appear in the *m_slots* array.

Doc/conf.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -589,14 +589,16 @@
589589
}
590590
extlinks_detect_hardcoded_links = True
591591

592-
# Options for extensions
593-
# ----------------------
592+
# Options for c_annotations
593+
# -------------------------
594594

595595
# Relative filename of the data files
596596
refcount_file = 'data/refcounts.dat'
597597
stable_abi_file = 'data/stable_abi.dat'
598598

599-
# sphinxext-opengraph config
599+
# Options for sphinxext-opengraph
600+
# -------------------------------
601+
600602
ogp_site_url = 'https://docs.python.org/3/'
601603
ogp_site_name = 'Python documentation'
602604
ogp_image = '_static/og-image.png'

0 commit comments

Comments
 (0)