Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix]] kernel_include.py: cope with docutils 0.21 #36

Merged
merged 1 commit into from May 9, 2024

Conversation

return42
Copy link
Owner

@return42 return42 commented May 9, 2024

Thie patch was copied from Linux kernel mailing list:


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)

[1] http://www.docutils.org/RELEASE-NOTES.html#release-0-21-2024-04-09
[2] https://www.sphinx-doc.org/en/master/changes.html#release-7-3-0-released-apr-16-2024
[3] docutils/docutils@c8471ce47a24

Thie patch was copied from Linux kernel mailing list:

- https://lore.kernel.org/linux-doc/faf5fa45-2a9d-4573-9d2e-3930bdc1ed65@gmail.com/

----

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)

[1] http://www.docutils.org/RELEASE-NOTES.html#release-0-21-2024-04-09
[2] https://www.sphinx-doc.org/en/master/changes.html#release-7-3-0-released-apr-16-2024
[3] docutils/docutils@c8471ce47a24

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
@return42 return42 merged commit 942fecd into master May 9, 2024
@return42 return42 deleted the fix-kernel_include branch May 9, 2024 13:53
return42 added a commit to return42/searxng that referenced this pull request May 9, 2024
Another trip into the hell of dependencies: docutils tends to put major changes
in minor patches: the executables have been renamed / e.g.

     rst2html.py --> rts2html

so we have to use docutils at least from version 0.21.2, but this version of
docutils is only supported by myst-parser from version 3.0.1 on.

Additionally, docutils decided to drop python 3.8 in version 0.21 [1]

Further, linuxdoc needed an update to cope with docutils 0.21

[1] https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-21-2024-04-09
[2] return42/linuxdoc#36

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to return42/searxng that referenced this pull request May 9, 2024
Another trip into the hell of dependencies: docutils tends to put major changes
in minor patches: the executables have been renamed / e.g.

     rst2html.py --> rts2html

so we have to use docutils at least from version 0.21.2, but this version of
docutils is only supported by myst-parser from version 3.0.1 on.

Additionally, docutils decided to drop python 3.8 in version 0.21 [1]

Further, linuxdoc needed an update to cope with docutils 0.21 [2]

[1] https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-21-2024-04-09
[2] return42/linuxdoc#36

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
return42 added a commit to searxng/searxng that referenced this pull request May 9, 2024
Another trip into the hell of dependencies: docutils tends to put major changes
in minor patches: the executables have been renamed / e.g.

     rst2html.py --> rts2html

so we have to use docutils at least from version 0.21.2, but this version of
docutils is only supported by myst-parser from version 3.0.1 on.

Additionally, docutils decided to drop python 3.8 in version 0.21 [1]

Further, linuxdoc needed an update to cope with docutils 0.21 [2]

[1] https://docutils.sourceforge.io/RELEASE-NOTES.html#release-0-21-2024-04-09
[2] return42/linuxdoc#36

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant