diff options
Diffstat (limited to 'sphinx/util/docutils.py')
-rw-r--r-- | sphinx/util/docutils.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/sphinx/util/docutils.py b/sphinx/util/docutils.py index 63c9a06ef..d27ad6ba0 100644 --- a/sphinx/util/docutils.py +++ b/sphinx/util/docutils.py @@ -588,16 +588,6 @@ class SphinxTranslator(nodes.NodeVisitor): logger.warning(__('unknown node type: %r'), node, location=node) -# Node.findall() is a new interface to traverse a doctree since docutils-0.18. -# This applies a patch to docutils up to 0.18 inclusive to provide Node.findall() -# method to use it from our codebase. -if docutils.__version_info__[:2] <= (0, 17): - def findall(self, *args, **kwargs): - return iter(self.traverse(*args, **kwargs)) - - Node.findall = findall # type: ignore - - # cache a vanilla instance of nodes.document # Used in new_document() function __document_cache__: Tuple["Values", Reporter] |