Skip to content

Commit ff98d90

Browse files
AA-Turnerencukou
andauthored
[3.12] GH-121970: Rewrite the C-API annotations extension (GH-121985) (#122025)
(cherry picked from commit 22c9d9c) Co-authored-by: Petr Viktorin <[email protected]>
1 parent 7c8b6f8 commit ff98d90

File tree

6 files changed

+1138
-1049
lines changed

6 files changed

+1138
-1049
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
@@ -574,14 +574,16 @@
574574
}
575575
extlinks_detect_hardcoded_links = True
576576

577-
# Options for extensions
578-
# ----------------------
577+
# Options for c_annotations
578+
# -------------------------
579579

580580
# Relative filename of the data files
581581
refcount_file = 'data/refcounts.dat'
582582
stable_abi_file = 'data/stable_abi.dat'
583583

584-
# sphinxext-opengraph config
584+
# Options for sphinxext-opengraph
585+
# -------------------------------
586+
585587
ogp_site_url = 'https://docs.python.org/3/'
586588
ogp_site_name = 'Python documentation'
587589
ogp_image = '_static/og-image.png'

0 commit comments

Comments
 (0)