From 9cbc953aa0906f9984f074ac6548310a564ac571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Cederberg?= Date: Sat, 17 Aug 2024 11:43:29 +0200 Subject: [PATCH] Fixed #262 - Convert path-like object to str. --- CHANGES.rst | 12 +++++++++++- sphinxcontrib/matlab.py | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 283eba0..456eca6 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,13 @@ +sphinxcontrib-matlabdomain-0.22.1 (2024-08-17) +============================================== + +* Fixed `Isssue 262`_. The API for + ``sphinx.environment.BuildEnvironment.doc2path`` was changed to return a + path-like object in Sphinx 8.0.2. + +.. _Issue 262: https://github.com/sphinx-contrib/matlabdomain/issues/243 + + sphinxcontrib-matlabdomain-0.22.0 (2024-07-17) ============================================== @@ -16,7 +26,7 @@ sphinxcontrib-matlabdomain-0.22.0 (2024-07-17) .. image:: docs/render_property_specs_0.22.0.png :alt: Rendering property specs in 0.22.0 -.. _Issue 243: https://github.com/sphinx-contrib/matlabdomain/issues/249 +.. _Issue 243: https://github.com/sphinx-contrib/matlabdomain/issues/243 .. _Issue 249: https://github.com/sphinx-contrib/matlabdomain/issues/249 .. _Issue 250: https://github.com/sphinx-contrib/matlabdomain/issues/250 .. _Issue 252: https://github.com/sphinx-contrib/matlabdomain/issues/252 diff --git a/sphinxcontrib/matlab.py b/sphinxcontrib/matlab.py index 1e22f7c..43b96ab 100644 --- a/sphinxcontrib/matlab.py +++ b/sphinxcontrib/matlab.py @@ -286,7 +286,7 @@ def add_target_and_index(self, name_cls, sig, signode): self.state_machine.reporter.warning( "duplicate object description of %s, " % fullname_out + "other instance in " - + self.env.doc2path(objects[fullname_out][0]) + + str(self.env.doc2path(objects[fullname_out][0])) + ", use :noindex: for one of them", line=self.lineno, )