diff options
| author | Oliver Faso <[email protected]> | 2024-01-14 14:18:19 +0100 |
|---|---|---|
| committer | Heinrich Schuchardt <[email protected]> | 2024-01-17 08:40:19 +0100 |
| commit | f5209829af5c032514c19be7e0652e2e7377d1fd (patch) | |
| tree | def79e186ef40359a8b21975a4aa814f516943a6 /doc/sphinx | |
| parent | 60971e63e60b36203a5e3cb30deaa05dbd276f82 (diff) | |
docs/sphinx: Explicitly convert Sphinx paths to str
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 <[email protected]>
Tested-by: Akira Yokosawa <[email protected]>
Signed-off-by: Jonathan Corbet <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'doc/sphinx')
| -rw-r--r-- | doc/sphinx/kerneldoc.py | 2 | ||||
| -rw-r--r-- | doc/sphinx/kfigure.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/sphinx/kerneldoc.py b/doc/sphinx/kerneldoc.py index 8189c33b9dd..01a55429c57 100644 --- a/doc/sphinx/kerneldoc.py +++ b/doc/sphinx/kerneldoc.py @@ -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 diff --git a/doc/sphinx/kfigure.py b/doc/sphinx/kfigure.py index 788704886ee..dea7f91ef5a 100644 --- a/doc/sphinx/kfigure.py +++ b/doc/sphinx/kfigure.py @@ -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, |
