[PATCH 1/1] doc: invalid escape sequences in maintainers_include.py

Update maintainers_include.py from Linux next-20240202.
Signed-off-by: Heinrich Schuchardt heinrich.schuchardt@canonical.com --- doc/sphinx/maintainers_include.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/doc/sphinx/maintainers_include.py b/doc/sphinx/maintainers_include.py index dc8fed48d3c..dcad0fff472 100755 --- a/doc/sphinx/maintainers_include.py +++ b/doc/sphinx/maintainers_include.py @@ -61,8 +61,6 @@ class MaintainersInclude(Include): field_content = ""
for line in open(path): - if sys.version_info.major == 2: - line = unicode(line, 'utf-8') # Have we reached the end of the preformatted Descriptions text? if descriptions and line.startswith('Maintainers'): descriptions = False @@ -79,7 +77,7 @@ class MaintainersInclude(Include): line = line.rstrip()
# Linkify all non-wildcard refs to ReST files in Documentation/. - pat = '(Documentation/([^\s?*]*).rst)' + pat = r'(Documentation/([^\s?*]*).rst)' m = re.search(pat, line) if m: # maintainers.rst is in a subdirectory, so include "../". @@ -92,11 +90,11 @@ class MaintainersInclude(Include): output = "| %s" % (line.replace("\", "\\")) # Look for and record field letter to field name mappings: # R: Designated *reviewer*: FullName address@domain - m = re.search("\s(\S):\s", line) + m = re.search(r"\s(\S):\s", line) if m: field_letter = m.group(1) if field_letter and not field_letter in fields: - m = re.search("*([^*]+)*", line) + m = re.search(r"*([^*]+)*", line) if m: fields[field_letter] = m.group(1) elif subsystems: @@ -114,7 +112,7 @@ class MaintainersInclude(Include): field_content = ""
# Collapse whitespace in subsystem name. - heading = re.sub("\s+", " ", line) + heading = re.sub(r"\s+", " ", line) output = output + "%s\n%s" % (heading, "~" * len(heading)) field_prev = "" else:

On 03.03.24 15:14, Tom Rini wrote:
On Sun, Mar 03, 2024 at 02:40:22PM +0100, Heinrich Schuchardt wrote:
Update maintainers_include.py from Linux next-20240202.
Is there no better upstream tag/commit to base this from?
The relevant changes in Linux were in 2023 and 2021:
86a0adc029d3 ("Documentation/sphinx: fix Python string escapes") 4217e5074f33 ("Docs: drop Python 2 support")
We could also refer to Linux v6.7.
So maybe we better copy these patches instead of only a single file.
Best regards
Heinrich

On Mon, Mar 04, 2024 at 10:34:50AM +0100, Heinrich Schuchardt wrote:
On 03.03.24 15:14, Tom Rini wrote:
On Sun, Mar 03, 2024 at 02:40:22PM +0100, Heinrich Schuchardt wrote:
Update maintainers_include.py from Linux next-20240202.
Is there no better upstream tag/commit to base this from?
The relevant changes in Linux were in 2023 and 2021:
86a0adc029d3 ("Documentation/sphinx: fix Python string escapes") 4217e5074f33 ("Docs: drop Python 2 support")
We could also refer to Linux v6.7.
So maybe we better copy these patches instead of only a single file.
We can sync the whole file, that's fine, but just do it vs one of Linus' releases and not a -next tag, thanks.
participants (2)
-
Heinrich Schuchardt
-
Tom Rini