https://github.com/python/cpython/commit/0298da432dd1f8e95e7b4e652ad0123c2833711d
commit: 0298da432dd1f8e95e7b4e652ad0123c2833711d
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: AA-Turner <[email protected]>
date: 2024-07-20T19:54:57Z
summary:

[3.12] Docs: Fix duplicate object description warnings (GH-122068) (#122070)

Docs: Fix duplicate object description warnings (GH-122068)
(cherry picked from commit 8db5f480072421bb065d346c3bbc5e88fc368587)

Co-authored-by: Adam Turner <[email protected]>

files:
M Doc/library/email.compat32-message.rst
M Doc/library/xml.etree.elementtree.rst
M Doc/tools/extensions/pyspecific.py

diff --git a/Doc/library/email.compat32-message.rst 
b/Doc/library/email.compat32-message.rst
index c4c322a82e1f44..6e27a6e224a733 100644
--- a/Doc/library/email.compat32-message.rst
+++ b/Doc/library/email.compat32-message.rst
@@ -7,6 +7,7 @@
    :synopsis: The base class representing email messages in a fashion
               backward compatible with Python 3.2
    :noindex:
+   :no-index:
 
 
 The :class:`Message` class is very similar to the
diff --git a/Doc/library/xml.etree.elementtree.rst 
b/Doc/library/xml.etree.elementtree.rst
index 5f13f469609282..ef7f4546137306 100644
--- a/Doc/library/xml.etree.elementtree.rst
+++ b/Doc/library/xml.etree.elementtree.rst
@@ -869,6 +869,7 @@ Element Objects
 
 .. module:: xml.etree.ElementTree
    :noindex:
+   :no-index:
 
 .. class:: Element(tag, attrib={}, **extra)
 
diff --git a/Doc/tools/extensions/pyspecific.py 
b/Doc/tools/extensions/pyspecific.py
index c50139b7b8329a..a9e00ab0571328 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -18,11 +18,12 @@
 import sphinx
 from docutils import nodes
 from docutils.io import StringOutput
+from docutils.parsers.rst import directives
 from docutils.utils import new_document, unescape
 from sphinx import addnodes
 from sphinx.builders import Builder
 from sphinx.domains.changeset import VersionChange, versionlabels, 
versionlabel_classes
-from sphinx.domains.python import PyFunction, PyMethod
+from sphinx.domains.python import PyFunction, PyMethod, PyModule
 from sphinx.errors import NoUri
 from sphinx.locale import _ as sphinx_gettext
 from sphinx.util import logging
@@ -49,6 +50,9 @@
 
 std.token_re = re.compile(r'`((~?[\w-]*:)?\w+)`')
 
+# backport :no-index:
+PyModule.option_spec['no-index'] = directives.flag
+
 
 # Support for marking up and linking to bugs.python.org issues
 

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to