]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
docs/sphinx: Explicitly convert Sphinx paths to str
authorOliver Faso <erer1243@gmail.com>
Sun, 14 Jan 2024 13:18:19 +0000 (14:18 +0100)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Wed, 17 Jan 2024 07:40:19 +0000 (08:40 +0100)
Sphinx 7.2+ is switching to using pathlib.Path
instead of str to represent paths. This fixes the
current deprecation warnings and eventual breakage.
This conversion will be a no-op when using older
Sphinx versions.

Signed-off-by: Oliver Faso <erer1243@gmail.com>
Tested-by: Akira Yokosawa <akiyks@gmail.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20230910040811.53046-1-erer1243@gmail.com
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
doc/sphinx/kerneldoc.py
doc/sphinx/kfigure.py

index 8189c33b9ddafd540d38c58290d07ce9248a1b2a..01a55429c576093e32bd5a90f04700095d6230ad 100644 (file)
@@ -138,7 +138,7 @@ class KernelDocDirective(Directive):
                     lineoffset = int(match.group(1)) - 1
                     # we must eat our comments since the upset the markup
                 else:
-                    doc = env.srcdir + "/" + env.docname + ":" + str(self.lineno)
+                    doc = str(env.srcdir) + "/" + env.docname + ":" + str(self.lineno)
                     result.append(line, doc + ": " + filename, lineoffset)
                     lineoffset += 1
 
index 788704886eec96abfc1affd6219eb5a3d5fa9bbc..dea7f91ef5abf23a9778f520b25a293f38c61187 100644 (file)
@@ -266,7 +266,7 @@ def convert_image(img_node, translator, src_fname=None):
     if dst_fname:
         # the builder needs not to copy one more time, so pop it if exists.
         translator.builder.images.pop(img_node['uri'], None)
-        _name = dst_fname[len(translator.builder.outdir) + 1:]
+        _name = dst_fname[len(str(translator.builder.outdir)) + 1:]
 
         if isNewer(dst_fname, src_fname):
             kernellog.verbose(app,