https://github.com/python/cpython/commit/8db5f480072421bb065d346c3bbc5e88fc368587
commit: 8db5f480072421bb065d346c3bbc5e88fc368587
branch: main
author: Adam Turner <9087854+aa-tur...@users.noreply.github.com>
committer: AA-Turner <9087854+aa-tur...@users.noreply.github.com>
date: 2024-07-20T19:46:41Z
summary:

Docs: Fix duplicate object description warnings (#122068)

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 4c1e7bd7e6734a..51bf88313e5b7a 100644
--- a/Doc/library/xml.etree.elementtree.rst
+++ b/Doc/library/xml.etree.elementtree.rst
@@ -874,6 +874,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 a7588bc622e99a..f5be19a8d49cc9 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 -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to