summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>2024-07-20 19:46:41 (GMT)
committerGitHub <noreply@github.com>2024-07-20 19:46:41 (GMT)
commit8db5f480072421bb065d346c3bbc5e88fc368587 (patch)
tree467f848d7fa453fa78cd9a3cd33bcd93763b4bbe
parenta09e215abf3c80a3c99c86b4482b512b42aad072 (diff)
downloadcpython-8db5f480072421bb065d346c3bbc5e88fc368587.zip
cpython-8db5f480072421bb065d346c3bbc5e88fc368587.tar.gz
cpython-8db5f480072421bb065d346c3bbc5e88fc368587.tar.bz2
Docs: Fix duplicate object description warnings (#122068)
-rw-r--r--Doc/library/email.compat32-message.rst1
-rw-r--r--Doc/library/xml.etree.elementtree.rst1
-rw-r--r--Doc/tools/extensions/pyspecific.py6
3 files changed, 7 insertions, 1 deletions
diff --git a/Doc/library/email.compat32-message.rst b/Doc/library/email.compat32-message.rst
index c4c322a..6e27a6e 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 4c1e7bd..51bf883 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 a7588bc..f5be19a 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -18,11 +18,12 @@ from pprint import pformat
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 @@ from sphinx.domains import std
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