Replace deprecated nodes.Node.traverse

It was deprecated in docutils 0.18.1 in favor of nodes.Node.Findall() ,
and now triggers the following warning message.

```
DeprecationWarning: nodes.Node.traverse() is obsoleted by
Node.findall().
```

The docutils library is added to the dependency list because it is
directly imported.

[1] https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-18-1-2021-12-23

Change-Id: Ie988a510897d98b68581ee6dcc927aa9701c77e8
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-12-23 00:00:13 +09:00
parent a870746f0d
commit f10fd6039f
2 changed files with 2 additions and 5 deletions

View File

@@ -675,7 +675,7 @@ def build_mv_item(major: int, micro: int, releases: dict[str, str]) -> str:
def resolve_rest_references(app: Sphinx, doctree: nodes.document) -> None:
for node in doctree.traverse():
for node in list(doctree.findall()):
if isinstance(node, rest_method):
rest_node = node
rest_method_section = node.parent

View File

@@ -1,8 +1,5 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr!=2.1.0,>=2.0.0 # Apache-2.0
PyYAML>=3.12 # MIT
sphinx>=4.0.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
docutils>=0.18.0 # OSI-Approved Open Source, Public Domain