* Please backport commit 00d95fcc4dee ("docs: kdoc: handle the obsolescensce of docutils.ErrorString()") to v6.17.y
@ 2025-10-19 15:22 Salvatore Bonaccorso
2025-10-26 7:36 ` Andreas Radke
0 siblings, 1 reply; 7+ messages in thread
From: Salvatore Bonaccorso @ 2025-10-19 15:22 UTC (permalink / raw)
To: stable
Cc: Greg Kroah-Hartman, Sasha Levin, Zhixu Liu, Jonathan Corbet,
linux-doc, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 976 bytes --]
Hi
When people update docutils to 0.22, then the Documentation build will
start failing as documented with the commit 00d95fcc4dee ("docs: kdoc:
handle the obsolescensce of docutils.ErrorString()").
So it would be nice if people can still build the documenation with
newer versions (was for instance relevant for Debian unstable for
building the 6.17.y based packages): https://bugs.debian.org/1118100
Thus can you please backport 00d95fcc4dee ("docs: kdoc: handle the
obsolescensce of docutils.ErrorString()") down to 6.17.y stable
series? The commit does not apply cleanly so adding a backport for it.
Actually it would be nice to go further back, but I just tested as
well 6.12.y and there due to missing faccc0ec64e1 ("docs:
sphinx/kernel_abi: adjust coding style") there are more work.
faccc0ec64e1 ("docs: sphinx/kernel_abi: adjust coding style") should
be applicable but I'm not sure if you want to support that. Jonathan
what would you think?
Regards,
Salvatore
[-- Attachment #2: 0001-docs-kdoc-handle-the-obsolescensce-of-docutils.Error.patch --]
[-- Type: text/x-diff, Size: 3903 bytes --]
From c2ce9e6de0a3dfea99de08af7b5eef5c983e76c8 Mon Sep 17 00:00:00 2001
From: Jonathan Corbet <corbet@lwn.net>
Date: Tue, 9 Sep 2025 13:35:37 -0600
Subject: [PATCH] docs: kdoc: handle the obsolescensce of
docutils.ErrorString()
commit 00d95fcc4dee66dfb6980de6f2973b32f973a1eb upstream.
The ErrorString() and SafeString() docutils functions were helpers meant to
ease the handling of encodings during the Python 3 transition. There is no
real need for them after Python 3.6, and docutils 0.22 removes them,
breaking the docs build
Handle this by just injecting our own one-liner version of ErrorString(),
and removing the sole SafeString() call entirely.
Reported-by: Zhixu Liu <zhixu.liu@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <87ldmnv2pi.fsf@trenco.lwn.net>
[Salvatore Bonaccorso: Backport to v6.17.y for context changes in
Documentation/sphinx/kernel_include.py with major refactorings for the v6.18
development cycle]
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
---
Documentation/sphinx/kernel_feat.py | 4 +++-
Documentation/sphinx/kernel_include.py | 6 ++++--
Documentation/sphinx/maintainers_include.py | 4 +++-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Documentation/sphinx/kernel_feat.py b/Documentation/sphinx/kernel_feat.py
index e3a51867f27b..aaac76892ceb 100644
--- a/Documentation/sphinx/kernel_feat.py
+++ b/Documentation/sphinx/kernel_feat.py
@@ -40,9 +40,11 @@ import sys
from docutils import nodes, statemachine
from docutils.statemachine import ViewList
from docutils.parsers.rst import directives, Directive
-from docutils.utils.error_reporting import ErrorString
from sphinx.util.docutils import switch_source_input
+def ErrorString(exc): # Shamelessly stolen from docutils
+ return f'{exc.__class__.__name}: {exc}'
+
__version__ = '1.0'
def setup(app):
diff --git a/Documentation/sphinx/kernel_include.py b/Documentation/sphinx/kernel_include.py
index 1e566e87ebcd..641e81c58a8c 100755
--- a/Documentation/sphinx/kernel_include.py
+++ b/Documentation/sphinx/kernel_include.py
@@ -35,13 +35,15 @@
import os.path
from docutils import io, nodes, statemachine
-from docutils.utils.error_reporting import SafeString, ErrorString
from docutils.parsers.rst import directives
from docutils.parsers.rst.directives.body import CodeBlock, NumberLines
from docutils.parsers.rst.directives.misc import Include
__version__ = '1.0'
+def ErrorString(exc): # Shamelessly stolen from docutils
+ return f'{exc.__class__.__name}: {exc}'
+
# ==============================================================================
def setup(app):
# ==============================================================================
@@ -112,7 +114,7 @@ class KernelInclude(Include):
raise self.severe('Problems with "%s" directive path:\n'
'Cannot encode input file path "%s" '
'(wrong locale?).' %
- (self.name, SafeString(path)))
+ (self.name, path))
except IOError as error:
raise self.severe('Problems with "%s" directive path:\n%s.' %
(self.name, ErrorString(error)))
diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sphinx/maintainers_include.py
index d31cff867436..519ad18685b2 100755
--- a/Documentation/sphinx/maintainers_include.py
+++ b/Documentation/sphinx/maintainers_include.py
@@ -22,10 +22,12 @@ import re
import os.path
from docutils import statemachine
-from docutils.utils.error_reporting import ErrorString
from docutils.parsers.rst import Directive
from docutils.parsers.rst.directives.misc import Include
+def ErrorString(exc): # Shamelessly stolen from docutils
+ return f'{exc.__class__.__name}: {exc}'
+
__version__ = '1.0'
def setup(app):
--
2.51.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: Please backport commit 00d95fcc4dee ("docs: kdoc: handle the obsolescensce of docutils.ErrorString()") to v6.17.y 2025-10-19 15:22 Please backport commit 00d95fcc4dee ("docs: kdoc: handle the obsolescensce of docutils.ErrorString()") to v6.17.y Salvatore Bonaccorso @ 2025-10-26 7:36 ` Andreas Radke 2025-10-26 12:56 ` Salvatore Bonaccorso 0 siblings, 1 reply; 7+ messages in thread From: Andreas Radke @ 2025-10-26 7:36 UTC (permalink / raw) To: Salvatore Bonaccorso, stable Cc: Greg Kroah-Hartman, Sasha Levin, Zhixu Liu, Jonathan Corbet, linux-doc, linux-kernel [-- Attachment #1.1.1: Type: text/plain, Size: 673 bytes --] For kernel 6.12 there's just one more place required to add the fix: --- a/Documentation/sphinx/kernel_abi.py 2025-10-23 16:20:48.000000000 +0200 +++ b/Documentation/sphinx/kernel_abi.py.new 2025-10-26 08:08:33.168985951 +0100 @@ -42,9 +42,11 @@ from docutils import nodes, statemachine from docutils.statemachine import ViewList from docutils.parsers.rst import directives, Directive -from docutils.utils.error_reporting import ErrorString from sphinx.util.docutils import switch_source_input +def ErrorString(exc): # Shamelessly stolen from docutils + return f'{exc.__class__.__name}: {exc}' + __version__ = '1.0' def setup(app): [-- Attachment #1.2: 94657AB20F2A092B.asc --] [-- Type: application/pgp-keys, Size: 10414 bytes --] -----BEGIN PGP P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M1naVSuyXJF1lzDzg vFLmbHr6Q1sW40An/wyNw+6AMWhzg1Z85HlMNltEsBuZ+7K+kcD4okwDABEBAAGJ AX4EGAEIAHIFgmLK/YwJEJRlerIPKgkrRxQAAAAAAB4AIHNhbHRAbm90YXRpb25z LnNlcXVvaWEtcGdwLm9yZ8FqFRJwN1LAGHKi+tlFwTJX3AbN8ctS8A1vOZju1LnC AhsMFiEErcih/MFeAdRTEEGelGV6sg8qCSsAABmhB/4oHTincrr0g6pO/BQEOzWH HEcY+Ciom8VL4Qzl5qXcWS0w4QOUDmuYTTO8/fBzRIYfevl5omER5bZ/hpCzo0Dd Eg67YnLg9N6MthqSF34vXeSYm2l1fA6q9Mm7Lq8K1dWaYPgdwIpGb1+NrzqeMt7w moQ87REXNZqQV2KRskrd/VEJKndcbUF+Yb7eOpRpITyVAv+tilLkXaQCsvI1Qyig JFm8EbrHEigNXrzwK1xbK060SxMRJgUVCjvq5eqtbozdcPy7om5LdQCvVJlIL8WG k3MlMhrCGOzU/bo40a8a79KRPz4UMjremdT28FSe8mwmx/WgvV2dHM/L2Zbb36JO =UEx3 -----END PGP PUBLIC KEY BLOCK----- [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Please backport commit 00d95fcc4dee ("docs: kdoc: handle the obsolescensce of docutils.ErrorString()") to v6.17.y 2025-10-26 7:36 ` Andreas Radke @ 2025-10-26 12:56 ` Salvatore Bonaccorso 2025-10-27 16:06 ` Jonathan Corbet 0 siblings, 1 reply; 7+ messages in thread From: Salvatore Bonaccorso @ 2025-10-26 12:56 UTC (permalink / raw) To: Andreas Radke Cc: stable, Greg Kroah-Hartman, Sasha Levin, Zhixu Liu, Jonathan Corbet, linux-doc, linux-kernel Hi, On Sun, Oct 26, 2025 at 08:36:00AM +0100, Andreas Radke wrote: > For kernel 6.12 there's just one more place required to add the fix: > > --- a/Documentation/sphinx/kernel_abi.py 2025-10-23 16:20:48.000000000 +0200 > +++ b/Documentation/sphinx/kernel_abi.py.new 2025-10-26 08:08:33.168985951 +0100 > @@ -42,9 +42,11 @@ > from docutils import nodes, statemachine > from docutils.statemachine import ViewList > from docutils.parsers.rst import directives, Directive > -from docutils.utils.error_reporting import ErrorString > from sphinx.util.docutils import switch_source_input > > +def ErrorString(exc): # Shamelessly stolen from docutils > + return f'{exc.__class__.__name}: {exc}' > + > __version__ = '1.0' > > def setup(app): Yes this is why I asked Jonathan, how to handle backports to older series, if it is wanted to pick specifically as well faccc0ec64e1 ("docs: sphinx/kernel_abi: adjust coding style") or a partial backport of it, or do a 6.12.y backport of 00d95fcc4dee with additional changes (like you pointed out). I'm just not sure what is preferred here. Regards, Salvatore ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Please backport commit 00d95fcc4dee ("docs: kdoc: handle the obsolescensce of docutils.ErrorString()") to v6.17.y 2025-10-26 12:56 ` Salvatore Bonaccorso @ 2025-10-27 16:06 ` Jonathan Corbet 2025-10-28 20:10 ` Salvatore Bonaccorso 0 siblings, 1 reply; 7+ messages in thread From: Jonathan Corbet @ 2025-10-27 16:06 UTC (permalink / raw) To: Salvatore Bonaccorso, Andreas Radke Cc: stable, Greg Kroah-Hartman, Sasha Levin, Zhixu Liu, linux-doc, linux-kernel Salvatore Bonaccorso <carnil@debian.org> writes: > Hi, > > On Sun, Oct 26, 2025 at 08:36:00AM +0100, Andreas Radke wrote: >> For kernel 6.12 there's just one more place required to add the fix: >> >> --- a/Documentation/sphinx/kernel_abi.py 2025-10-23 16:20:48.000000000 +0200 >> +++ b/Documentation/sphinx/kernel_abi.py.new 2025-10-26 08:08:33.168985951 +0100 >> @@ -42,9 +42,11 @@ >> from docutils import nodes, statemachine >> from docutils.statemachine import ViewList >> from docutils.parsers.rst import directives, Directive >> -from docutils.utils.error_reporting import ErrorString >> from sphinx.util.docutils import switch_source_input >> >> +def ErrorString(exc): # Shamelessly stolen from docutils >> + return f'{exc.__class__.__name}: {exc}' >> + >> __version__ = '1.0' >> >> def setup(app): > > Yes this is why I asked Jonathan, how to handle backports to older > series, if it is wanted to pick specifically as well faccc0ec64e1 > ("docs: sphinx/kernel_abi: adjust coding style") or a partial backport > of it, or do a 6.12.y backport of 00d95fcc4dee with additional > changes (like you pointed out). > > I'm just not sure what is preferred here. I'm not sure it matters that much...the additional change suggested by Andreas seems fine. It's just a backport, and it shouldn't break anything, so doesn't seem worth a lot of worry. Thanks, jon ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Please backport commit 00d95fcc4dee ("docs: kdoc: handle the obsolescensce of docutils.ErrorString()") to v6.17.y 2025-10-27 16:06 ` Jonathan Corbet @ 2025-10-28 20:10 ` Salvatore Bonaccorso 2025-10-28 21:29 ` Jonathan Corbet 2025-10-31 12:33 ` Greg Kroah-Hartman 0 siblings, 2 replies; 7+ messages in thread From: Salvatore Bonaccorso @ 2025-10-28 20:10 UTC (permalink / raw) To: Jonathan Corbet Cc: Andreas Radke, stable, Greg Kroah-Hartman, Sasha Levin, Zhixu Liu, linux-doc, linux-kernel [-- Attachment #1: Type: text/plain, Size: 1638 bytes --] Hi, On Mon, Oct 27, 2025 at 10:06:33AM -0600, Jonathan Corbet wrote: > Salvatore Bonaccorso <carnil@debian.org> writes: > > > Hi, > > > > On Sun, Oct 26, 2025 at 08:36:00AM +0100, Andreas Radke wrote: > >> For kernel 6.12 there's just one more place required to add the fix: > >> > >> --- a/Documentation/sphinx/kernel_abi.py 2025-10-23 16:20:48.000000000 +0200 > >> +++ b/Documentation/sphinx/kernel_abi.py.new 2025-10-26 08:08:33.168985951 +0100 > >> @@ -42,9 +42,11 @@ > >> from docutils import nodes, statemachine > >> from docutils.statemachine import ViewList > >> from docutils.parsers.rst import directives, Directive > >> -from docutils.utils.error_reporting import ErrorString > >> from sphinx.util.docutils import switch_source_input > >> > >> +def ErrorString(exc): # Shamelessly stolen from docutils > >> + return f'{exc.__class__.__name}: {exc}' > >> + > >> __version__ = '1.0' > >> > >> def setup(app): > > > > Yes this is why I asked Jonathan, how to handle backports to older > > series, if it is wanted to pick specifically as well faccc0ec64e1 > > ("docs: sphinx/kernel_abi: adjust coding style") or a partial backport > > of it, or do a 6.12.y backport of 00d95fcc4dee with additional > > changes (like you pointed out). > > > > I'm just not sure what is preferred here. > > I'm not sure it matters that much...the additional change suggested by > Andreas seems fine. It's just a backport, and it shouldn't break > anything, so doesn't seem worth a lot of worry. Okay here is a respective backported change for the 6.12.y series as well. Does that look good for you? Regards, Salvatore [-- Attachment #2: 0001-docs-kdoc-handle-the-obsolescensce-of-docutils.Error.patch --] [-- Type: text/x-diff, Size: 4875 bytes --] From aceb23b9348b98fb93a57cb70149ca8c43962aec Mon Sep 17 00:00:00 2001 From: Jonathan Corbet <corbet@lwn.net> Date: Tue, 9 Sep 2025 13:35:37 -0600 Subject: [PATCH] docs: kdoc: handle the obsolescensce of docutils.ErrorString() commit 00d95fcc4dee66dfb6980de6f2973b32f973a1eb upstream. The ErrorString() and SafeString() docutils functions were helpers meant to ease the handling of encodings during the Python 3 transition. There is no real need for them after Python 3.6, and docutils 0.22 removes them, breaking the docs build Handle this by just injecting our own one-liner version of ErrorString(), and removing the sole SafeString() call entirely. Reported-by: Zhixu Liu <zhixu.liu@gmail.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Message-ID: <87ldmnv2pi.fsf@trenco.lwn.net> [ Salvatore Bonaccorso: Backport to v6.17.y for context changes in Documentation/sphinx/kernel_include.py with major refactorings for the v6.18 development cycle. Backport ErrorString definition as well to Documentation/sphinx/kernel_abi.py file for 6.12.y where it is imported from docutils before the faccc0ec64e1 ("docs: sphinx/kernel_abi: adjust coding style") change. ] Suggested-by: Andreas Radke <andreas.radke@mailbox.org> Signed-off-by: Salvatore Bonaccorso <carnil@debian.org> --- Documentation/sphinx/kernel_abi.py | 4 +++- Documentation/sphinx/kernel_feat.py | 4 +++- Documentation/sphinx/kernel_include.py | 6 ++++-- Documentation/sphinx/maintainers_include.py | 4 +++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Documentation/sphinx/kernel_abi.py b/Documentation/sphinx/kernel_abi.py index 5911bd0d7965..51a92b371872 100644 --- a/Documentation/sphinx/kernel_abi.py +++ b/Documentation/sphinx/kernel_abi.py @@ -42,9 +42,11 @@ import kernellog from docutils import nodes, statemachine from docutils.statemachine import ViewList from docutils.parsers.rst import directives, Directive -from docutils.utils.error_reporting import ErrorString from sphinx.util.docutils import switch_source_input +def ErrorString(exc): # Shamelessly stolen from docutils + return f'{exc.__class__.__name}: {exc}' + __version__ = '1.0' def setup(app): diff --git a/Documentation/sphinx/kernel_feat.py b/Documentation/sphinx/kernel_feat.py index 03ace5f01b5c..2db63dd20399 100644 --- a/Documentation/sphinx/kernel_feat.py +++ b/Documentation/sphinx/kernel_feat.py @@ -40,9 +40,11 @@ import sys from docutils import nodes, statemachine from docutils.statemachine import ViewList from docutils.parsers.rst import directives, Directive -from docutils.utils.error_reporting import ErrorString from sphinx.util.docutils import switch_source_input +def ErrorString(exc): # Shamelessly stolen from docutils + return f'{exc.__class__.__name}: {exc}' + __version__ = '1.0' def setup(app): diff --git a/Documentation/sphinx/kernel_include.py b/Documentation/sphinx/kernel_include.py index 638762442336..ccbddcc4af79 100755 --- a/Documentation/sphinx/kernel_include.py +++ b/Documentation/sphinx/kernel_include.py @@ -34,13 +34,15 @@ u""" import os.path from docutils import io, nodes, statemachine -from docutils.utils.error_reporting import SafeString, ErrorString from docutils.parsers.rst import directives from docutils.parsers.rst.directives.body import CodeBlock, NumberLines from docutils.parsers.rst.directives.misc import Include __version__ = '1.0' +def ErrorString(exc): # Shamelessly stolen from docutils + return f'{exc.__class__.__name}: {exc}' + # ============================================================================== def setup(app): # ============================================================================== @@ -111,7 +113,7 @@ class KernelInclude(Include): raise self.severe('Problems with "%s" directive path:\n' 'Cannot encode input file path "%s" ' '(wrong locale?).' % - (self.name, SafeString(path))) + (self.name, path)) except IOError as error: raise self.severe('Problems with "%s" directive path:\n%s.' % (self.name, ErrorString(error))) diff --git a/Documentation/sphinx/maintainers_include.py b/Documentation/sphinx/maintainers_include.py index dcad0fff4723..496489d634c4 100755 --- a/Documentation/sphinx/maintainers_include.py +++ b/Documentation/sphinx/maintainers_include.py @@ -22,10 +22,12 @@ import re import os.path from docutils import statemachine -from docutils.utils.error_reporting import ErrorString from docutils.parsers.rst import Directive from docutils.parsers.rst.directives.misc import Include +def ErrorString(exc): # Shamelessly stolen from docutils + return f'{exc.__class__.__name}: {exc}' + __version__ = '1.0' def setup(app): -- 2.51.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: Please backport commit 00d95fcc4dee ("docs: kdoc: handle the obsolescensce of docutils.ErrorString()") to v6.17.y 2025-10-28 20:10 ` Salvatore Bonaccorso @ 2025-10-28 21:29 ` Jonathan Corbet 2025-10-31 12:33 ` Greg Kroah-Hartman 1 sibling, 0 replies; 7+ messages in thread From: Jonathan Corbet @ 2025-10-28 21:29 UTC (permalink / raw) To: Salvatore Bonaccorso Cc: Andreas Radke, stable, Greg Kroah-Hartman, Sasha Levin, Zhixu Liu, linux-doc, linux-kernel Salvatore Bonaccorso <carnil@debian.org> writes: > Hi, > > On Mon, Oct 27, 2025 at 10:06:33AM -0600, Jonathan Corbet wrote: >> Salvatore Bonaccorso <carnil@debian.org> writes: >> >> > Hi, >> > >> > On Sun, Oct 26, 2025 at 08:36:00AM +0100, Andreas Radke wrote: >> >> For kernel 6.12 there's just one more place required to add the fix: >> >> >> >> --- a/Documentation/sphinx/kernel_abi.py 2025-10-23 16:20:48.000000000 +0200 >> >> +++ b/Documentation/sphinx/kernel_abi.py.new 2025-10-26 08:08:33.168985951 +0100 >> >> @@ -42,9 +42,11 @@ >> >> from docutils import nodes, statemachine >> >> from docutils.statemachine import ViewList >> >> from docutils.parsers.rst import directives, Directive >> >> -from docutils.utils.error_reporting import ErrorString >> >> from sphinx.util.docutils import switch_source_input >> >> >> >> +def ErrorString(exc): # Shamelessly stolen from docutils >> >> + return f'{exc.__class__.__name}: {exc}' >> >> + >> >> __version__ = '1.0' >> >> >> >> def setup(app): >> > >> > Yes this is why I asked Jonathan, how to handle backports to older >> > series, if it is wanted to pick specifically as well faccc0ec64e1 >> > ("docs: sphinx/kernel_abi: adjust coding style") or a partial backport >> > of it, or do a 6.12.y backport of 00d95fcc4dee with additional >> > changes (like you pointed out). >> > >> > I'm just not sure what is preferred here. >> >> I'm not sure it matters that much...the additional change suggested by >> Andreas seems fine. It's just a backport, and it shouldn't break >> anything, so doesn't seem worth a lot of worry. > > Okay here is a respective backported change for the 6.12.y series as > well. > > Does that look good for you? I haven't actually tried it, but it looks OK to me. jon ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Please backport commit 00d95fcc4dee ("docs: kdoc: handle the obsolescensce of docutils.ErrorString()") to v6.17.y 2025-10-28 20:10 ` Salvatore Bonaccorso 2025-10-28 21:29 ` Jonathan Corbet @ 2025-10-31 12:33 ` Greg Kroah-Hartman 1 sibling, 0 replies; 7+ messages in thread From: Greg Kroah-Hartman @ 2025-10-31 12:33 UTC (permalink / raw) To: Salvatore Bonaccorso Cc: Jonathan Corbet, Andreas Radke, stable, Sasha Levin, Zhixu Liu, linux-doc, linux-kernel On Tue, Oct 28, 2025 at 09:10:45PM +0100, Salvatore Bonaccorso wrote: > Hi, > > On Mon, Oct 27, 2025 at 10:06:33AM -0600, Jonathan Corbet wrote: > > Salvatore Bonaccorso <carnil@debian.org> writes: > > > > > Hi, > > > > > > On Sun, Oct 26, 2025 at 08:36:00AM +0100, Andreas Radke wrote: > > >> For kernel 6.12 there's just one more place required to add the fix: > > >> > > >> --- a/Documentation/sphinx/kernel_abi.py 2025-10-23 16:20:48.000000000 +0200 > > >> +++ b/Documentation/sphinx/kernel_abi.py.new 2025-10-26 08:08:33.168985951 +0100 > > >> @@ -42,9 +42,11 @@ > > >> from docutils import nodes, statemachine > > >> from docutils.statemachine import ViewList > > >> from docutils.parsers.rst import directives, Directive > > >> -from docutils.utils.error_reporting import ErrorString > > >> from sphinx.util.docutils import switch_source_input > > >> > > >> +def ErrorString(exc): # Shamelessly stolen from docutils > > >> + return f'{exc.__class__.__name}: {exc}' > > >> + > > >> __version__ = '1.0' > > >> > > >> def setup(app): > > > > > > Yes this is why I asked Jonathan, how to handle backports to older > > > series, if it is wanted to pick specifically as well faccc0ec64e1 > > > ("docs: sphinx/kernel_abi: adjust coding style") or a partial backport > > > of it, or do a 6.12.y backport of 00d95fcc4dee with additional > > > changes (like you pointed out). > > > > > > I'm just not sure what is preferred here. > > > > I'm not sure it matters that much...the additional change suggested by > > Andreas seems fine. It's just a backport, and it shouldn't break > > anything, so doesn't seem worth a lot of worry. > > Okay here is a respective backported change for the 6.12.y series as > well. > > Does that look good for you? > Now queued up, thanks! greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-10-31 12:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-19 15:22 Please backport commit 00d95fcc4dee ("docs: kdoc: handle the obsolescensce of docutils.ErrorString()") to v6.17.y Salvatore Bonaccorso
2025-10-26 7:36 ` Andreas Radke
2025-10-26 12:56 ` Salvatore Bonaccorso
2025-10-27 16:06 ` Jonathan Corbet
2025-10-28 20:10 ` Salvatore Bonaccorso
2025-10-28 21:29 ` Jonathan Corbet
2025-10-31 12:33 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).