public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Karolina Surma <ksurma@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-linuxdoc] f45: Fix compatibility with docutils 0.22+
Date: Tue, 10 Nov 2026 22:22:12 GMT [thread overview]
Message-ID: <179434933288.1.946371877504876638.rpms-python-linuxdoc-2048f18b7739@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-linuxdoc
Branch : f45
Commit : 2048f18b77395c1fa36ab448e94ebc93723466b1
Author : Karolina Surma <ksurma@redhat.com>
Date : 2025-11-21T16:23:48+01:00
Stats : +52/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-linuxdoc/c/2048f18b77395c1fa36ab448e94ebc93723466b1?branch=f45
Log:
Fix compatibility with docutils 0.22+
---
diff --git a/Fix-compatibility-with-docutils-0.22.patch b/Fix-compatibility-with-docutils-0.22.patch
new file mode 100644
index 0000000..44fb710
--- /dev/null
+++ b/Fix-compatibility-with-docutils-0.22.patch
@@ -0,0 +1,49 @@
+From 91e0b5332a4bd6c2509c12110575917cc297f3ef Mon Sep 17 00:00:00 2001
+From: Karolina Surma <ksurma@redhat.com>
+Date: Fri, 21 Nov 2025 15:44:16 +0100
+Subject: [PATCH] Fix compatibility with docutils 0.22+
+
+error_reporting module has been removed, per its documentation:
+- SafeString() is to be replaced by the standard Python 3 str()
+- ErrorString() is to be replaced by docutils.io.error_string()
+---
+ linuxdoc/kernel_include.py | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/linuxdoc/kernel_include.py b/linuxdoc/kernel_include.py
+index 1798271..1905978 100755
+--- a/linuxdoc/kernel_include.py
++++ b/linuxdoc/kernel_include.py
+@@ -18,7 +18,6 @@ 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
+@@ -90,10 +89,10 @@ 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, str(path)))
+ except IOError as error:
+ raise self.severe('Problems with "%s" directive path:\n%s.' %
+- (self.name, ErrorString(error)))
++ (self.name, io.error_string(error)))
+ startline = self.options.get('start-line', None)
+ endline = self.options.get('end-line', None)
+ try:
+@@ -105,7 +104,7 @@ class KernelInclude(Include):
+ rawtext = include_file.read()
+ except UnicodeError as error:
+ raise self.severe('Problem with "%s" directive:\n%s' %
+- (self.name, ErrorString(error)))
++ (self.name, io.error_string(error)))
+ # start-after/end-before: no restrictions on newlines in match-text,
+ # and no restrictions on matching inside lines vs. line boundaries
+ after_text = self.options.get('start-after', None)
+--
+2.51.1
+
diff --git a/python-linuxdoc.spec b/python-linuxdoc.spec
index e5e2051..fe2825e 100644
--- a/python-linuxdoc.spec
+++ b/python-linuxdoc.spec
@@ -13,6 +13,8 @@ Summary: Sphinx-doc extensions for sophisticated C developer
License: AGPL-3.0-or-later
URL: https://return42.github.io/linuxdoc/
Source0: %{pypi_source linuxdoc}
+# https://github.com/return42/linuxdoc/pull/40
+Patch: Fix-compatibility-with-docutils-0.22.patch
BuildArch: noarch
@@ -26,7 +28,7 @@ BuildRequires: help2man
%description -n python3-linuxdoc %_description
%prep
-%autosetup -n linuxdoc-%{version}
+%autosetup -n linuxdoc-%{version} -p1
# nothing here, empty package that gets installed in %%{python3_sitelib}
rm -rf tests
reply other threads:[~2026-11-10 22:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179434933288.1.946371877504876638.rpms-python-linuxdoc-2048f18b7739@fedoraproject.org \
--to=ksurma@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox