Skip to content
Snippets Groups Projects
Verified Commit fe5b92f0 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Manual: compatibility fix for Sphinx 8

In Sphinx 8, returned filesystem path objects are no longer extended to have
implicit string conversion methods. The conversion to a string must now be made
explicitly.

See this entry in the changelog for Sphinx 8.0:

 #12650, #12686, #12690: Extend the deprecation for string methods on
 :py:class:`~pathlib.Path` objects to Sphinx 9. Use :py:func:`os.fspath` to
 convert :py:class:`~pathlib.Path` objects to strings, or
 :py:class:`~pathlib.Path`'s methods to work with path objects. Patch by Adam
 Turner.

(cherry picked from commit 2983aafa)
parent 950c6922
Branches
Tags
No related merge requests found
...@@ -97,7 +97,7 @@ class DynObject(ObjectDescription): ...@@ -97,7 +97,7 @@ class DynObject(ObjectDescription):
self.state_machine.reporter.warning( self.state_machine.reporter.warning(
'duplicate object description of %s, ' % fullname + 'duplicate object description of %s, ' % fullname +
'other instance in ' + 'other instance in ' +
self.env.doc2path(objects[fullname][0]),line=self.lineno) str(self.env.doc2path(objects[fullname][0])),line=self.lineno)
objects[fullname] = (self.env.docname, self.objtype) objects[fullname] = (self.env.docname, self.objtype)
indextext = self.get_index_text(fullname,name_obj) indextext = self.get_index_text(fullname,name_obj)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment