From 2983aafa96a9dce202178b6006900ac2fd150a77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Mon, 23 Dec 2024 14:36:29 +0100
Subject: [PATCH] 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.
---
 doc/manual/utils/dynare_dom.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/manual/utils/dynare_dom.py b/doc/manual/utils/dynare_dom.py
index e5b54c1f70..101bb7345e 100644
--- a/doc/manual/utils/dynare_dom.py
+++ b/doc/manual/utils/dynare_dom.py
@@ -97,7 +97,7 @@ class DynObject(ObjectDescription):
                 self.state_machine.reporter.warning(
                     'duplicate object description of %s, ' % fullname +
                     '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)
 
         indextext = self.get_index_text(fullname,name_obj)
-- 
GitLab