OpenCloudOS-Kernel/Documentation/sphinx
Akira Yokosawa 71483049de docs: kernel_include.py: Cope with docutils 0.21
commit d43ddd5c91802a46354fa4c4381416ef760676e2 upstream.

Running "make htmldocs" on a newly installed Sphinx 7.3.7 ends up in
a build error:

    Sphinx parallel build error:
    AttributeError: module 'docutils.nodes' has no attribute 'reprunicode'

docutils 0.21 has removed nodes.reprunicode, quote from release note [1]:

  * Removed objects:

    docutils.nodes.reprunicode, docutils.nodes.ensure_str()
        Python 2 compatibility hacks

Sphinx 7.3.0 supports docutils 0.21 [2]:

kernel_include.py, whose origin is misc.py of docutils, uses reprunicode.

Upstream docutils removed the offending line from the corresponding file
(docutils/docutils/parsers/rst/directives/misc.py) in January 2022.
Quoting the changelog [3]:

    Deprecate `nodes.reprunicode` and `nodes.ensure_str()`.

    Drop uses of the deprecated constructs (not required with Python 3).

Do the same for kernel_include.py.

Tested against:
  - Sphinx 2.4.5 (docutils 0.17.1)
  - Sphinx 3.4.3 (docutils 0.17.1)
  - Sphinx 5.3.0 (docutils 0.18.1)
  - Sphinx 6.2.1 (docutils 0.19)
  - Sphinx 7.2.6 (docutils 0.20.1)
  - Sphinx 7.3.7 (docutils 0.21.2)

Link: http://www.docutils.org/RELEASE-NOTES.html#release-0-21-2024-04-09 [1]
Link: https://www.sphinx-doc.org/en/master/changes.html#release-7-3-0-released-apr-16-2024 [2]
Link: https://github.com/docutils/docutils/commit/c8471ce47a24 [3]
Signed-off-by: Akira Yokosawa <akiyks@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/faf5fa45-2a9d-4573-9d2e-3930bdc1ed65@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-05-25 16:22:55 +02:00
..
templates docs: Use HTML comments for the kernel-toc SPDX line 2023-02-16 16:06:44 -07:00
automarkup.py docs: automarkup: do not look up symbols twice 2022-07-07 12:57:55 -06:00
cdomain.py Documentation/sphinx: fix Python string escapes 2024-02-05 20:14:13 +00:00
kernel_abi.py Documentation/sphinx: fix Python string escapes 2024-02-05 20:14:13 +00:00
kernel_feat.py docs: kernel_feat.py: fix build error for missing files 2024-02-23 09:25:16 +01:00
kernel_include.py docs: kernel_include.py: Cope with docutils 0.21 2024-05-25 16:22:55 +02:00
kerneldoc-preamble.sty docs: kerneldoc-preamble: Test xeCJK.sty before loading 2022-08-18 11:27:55 -06:00
kerneldoc.py Documentation/sphinx: fix Python string escapes 2024-02-05 20:14:13 +00:00
kernellog.py Move our minimum Sphinx version to 1.7 2021-02-01 16:29:12 -07:00
kfigure.py docs: kfigure.py: Don't warn of missing PDF converter in 'make htmldocs' 2022-03-28 13:52:51 -06:00
load_config.py docs: Fix the docs build with Sphinx 6.0 2023-01-06 13:04:00 -07:00
maintainers_include.py Documentation/sphinx: fix Python string escapes 2024-02-05 20:14:13 +00:00
parallel-wrapper.sh docs: Fix empty parallelism argument 2020-02-25 03:11:04 -07:00
parse-headers.pl tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
requirements.txt docs: sphinx-pre-install: don't require the RTD theme 2022-10-13 11:14:43 -06:00
rstFlatTable.py docs: sphinx: Fix couple of spellings in the file rstFlatTable.py 2021-03-06 17:36:50 -07:00