Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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

authored by

Oliver Faso and committed by
Jonathan Corbet
f00c19c6 3240c375

+2 -2
+1 -1
Documentation/sphinx/kerneldoc.py
··· 138 138 lineoffset = int(match.group(1)) - 1 139 139 # we must eat our comments since the upset the markup 140 140 else: 141 - doc = env.srcdir + "/" + env.docname + ":" + str(self.lineno) 141 + doc = str(env.srcdir) + "/" + env.docname + ":" + str(self.lineno) 142 142 result.append(line, doc + ": " + filename, lineoffset) 143 143 lineoffset += 1 144 144
+1 -1
Documentation/sphinx/kfigure.py
··· 309 309 if dst_fname: 310 310 # the builder needs not to copy one more time, so pop it if exists. 311 311 translator.builder.images.pop(img_node['uri'], None) 312 - _name = dst_fname[len(translator.builder.outdir) + 1:] 312 + _name = dst_fname[len(str(translator.builder.outdir)) + 1:] 313 313 314 314 if isNewer(dst_fname, src_fname): 315 315 kernellog.verbose(app,