* [PATCH] docs: kernel_include.py: Cope with docutils 0.21
@ 2024-05-01 3:16 Akira Yokosawa
2024-05-01 7:49 ` Bagas Sanjaya
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Akira Yokosawa @ 2024-05-01 3:16 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-doc, Akira Yokosawa
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>
---
Documentation/sphinx/kernel_include.py | 1 -
1 file changed, 1 deletion(-)
diff --git a/Documentation/sphinx/kernel_include.py b/Documentation/sphinx/kernel_include.py
index abe768088377..638762442336 100755
--- a/Documentation/sphinx/kernel_include.py
+++ b/Documentation/sphinx/kernel_include.py
@@ -97,7 +97,6 @@ class KernelInclude(Include):
# HINT: this is the only line I had to change / commented out:
#path = utils.relative_path(None, path)
- path = nodes.reprunicode(path)
encoding = self.options.get(
'encoding', self.state.document.settings.input_encoding)
e_handler=self.state.document.settings.input_encoding_error_handler
base-commit: fcb5bcefdbfbd939bf4edfa71182df0b56d20a49
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] docs: kernel_include.py: Cope with docutils 0.21
2024-05-01 3:16 [PATCH] docs: kernel_include.py: Cope with docutils 0.21 Akira Yokosawa
@ 2024-05-01 7:49 ` Bagas Sanjaya
2024-05-02 14:46 ` Akira Yokosawa
2024-05-02 16:01 ` Jonathan Corbet
2 siblings, 0 replies; 5+ messages in thread
From: Bagas Sanjaya @ 2024-05-01 7:49 UTC (permalink / raw)
To: Akira Yokosawa, Jonathan Corbet; +Cc: linux-doc
[-- Attachment #1: Type: text/plain, Size: 1698 bytes --]
On Wed, May 01, 2024 at 12:16:11PM +0900, Akira Yokosawa wrote:
> 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>
No htmldocs regressions on Sphinx 5.0.1.
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
--
An old man doll... just what I always wanted! - Clara
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs: kernel_include.py: Cope with docutils 0.21
2024-05-01 3:16 [PATCH] docs: kernel_include.py: Cope with docutils 0.21 Akira Yokosawa
2024-05-01 7:49 ` Bagas Sanjaya
@ 2024-05-02 14:46 ` Akira Yokosawa
2024-05-02 14:52 ` Jonathan Corbet
2024-05-02 16:01 ` Jonathan Corbet
2 siblings, 1 reply; 5+ messages in thread
From: Akira Yokosawa @ 2024-05-02 14:46 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-doc, Akira Yokosawa
Hi Jon,
On Wed, 1 May 2024 12:16:11 +0900, Akira Yokosawa wrote:
> 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>
I forgot to put a Cc: stable@ tag.
Jon, could you do it for me?
I'm not sure how far this wants to be backported.
Maybe v6.1? It's up to you!
Thanks, Akira
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs: kernel_include.py: Cope with docutils 0.21
2024-05-02 14:46 ` Akira Yokosawa
@ 2024-05-02 14:52 ` Jonathan Corbet
0 siblings, 0 replies; 5+ messages in thread
From: Jonathan Corbet @ 2024-05-02 14:52 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: linux-doc, Akira Yokosawa
Akira Yokosawa <akiyks@gmail.com> writes:
> Hi Jon,
>
> On Wed, 1 May 2024 12:16:11 +0900, Akira Yokosawa wrote:
>> 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>
>
> I forgot to put a Cc: stable@ tag.
>
> Jon, could you do it for me?
> I'm not sure how far this wants to be backported.
> Maybe v6.1? It's up to you!
I was planning to do that, yes. I'll try to get to the queue today.
Thanks,
jon
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs: kernel_include.py: Cope with docutils 0.21
2024-05-01 3:16 [PATCH] docs: kernel_include.py: Cope with docutils 0.21 Akira Yokosawa
2024-05-01 7:49 ` Bagas Sanjaya
2024-05-02 14:46 ` Akira Yokosawa
@ 2024-05-02 16:01 ` Jonathan Corbet
2 siblings, 0 replies; 5+ messages in thread
From: Jonathan Corbet @ 2024-05-02 16:01 UTC (permalink / raw)
To: Akira Yokosawa; +Cc: linux-doc, Akira Yokosawa
Akira Yokosawa <akiyks@gmail.com> writes:
> 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>
> ---
> Documentation/sphinx/kernel_include.py | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/Documentation/sphinx/kernel_include.py b/Documentation/sphinx/kernel_include.py
> index abe768088377..638762442336 100755
> --- a/Documentation/sphinx/kernel_include.py
> +++ b/Documentation/sphinx/kernel_include.py
> @@ -97,7 +97,6 @@ class KernelInclude(Include):
> # HINT: this is the only line I had to change / commented out:
> #path = utils.relative_path(None, path)
>
> - path = nodes.reprunicode(path)
> encoding = self.options.get(
Applied, thanks.
jon
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-05-02 16:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-01 3:16 [PATCH] docs: kernel_include.py: Cope with docutils 0.21 Akira Yokosawa
2024-05-01 7:49 ` Bagas Sanjaya
2024-05-02 14:46 ` Akira Yokosawa
2024-05-02 14:52 ` Jonathan Corbet
2024-05-02 16:01 ` Jonathan Corbet
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.