Skip to content

Commit

Permalink
pythonGH-121970: Rewrite the C-API annotations extension (python#121985)
Browse files Browse the repository at this point in the history
Co-authored-by: Petr Viktorin <encukou@gmail.com>
(cherry picked from commit 22c9d9c)
  • Loading branch information
AA-Turner committed Jul 19, 2024
1 parent 1565093 commit 613f84a
Show file tree
Hide file tree
Showing 6 changed files with 1,155 additions and 1,066 deletions.
1 change: 0 additions & 1 deletion Doc/.ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ line-length = 79
extend-exclude = [
"includes/*",
# Temporary exclusions:
"tools/extensions/c_annotations.py",
"tools/extensions/escape4chm.py",
"tools/extensions/patchlevel.py",
"tools/extensions/pyspecific.py",
Expand Down
6 changes: 4 additions & 2 deletions Doc/c-api/module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,8 @@ The available slot types are:
The *value* pointer of this slot must point to a function of the signature:
.. c:function:: PyObject* create_module(PyObject *spec, PyModuleDef *def)
:noindex:
:no-index-entry:
:no-contents-entry:
The function receives a :py:class:`~importlib.machinery.ModuleSpec`
instance, as defined in :PEP:`451`, and the module definition.
Expand Down Expand Up @@ -377,7 +378,8 @@ The available slot types are:
The signature of the function is:
.. c:function:: int exec_module(PyObject* module)
:noindex:
:no-index-entry:
:no-contents-entry:
If multiple ``Py_mod_exec`` slots are specified, they are processed in the
order they appear in the *m_slots* array.
Expand Down
8 changes: 5 additions & 3 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,14 +589,16 @@
}
extlinks_detect_hardcoded_links = True

# Options for extensions
# ----------------------
# Options for c_annotations
# -------------------------

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

# sphinxext-opengraph config
# Options for sphinxext-opengraph
# -------------------------------

ogp_site_url = 'https://docs.python.org/3/'
ogp_site_name = 'Python documentation'
ogp_image = '_static/og-image.png'
Expand Down
Loading

0 comments on commit 613f84a

Please sign in to comment.