From 7e4e2b0c85216288a215d74d57c78cd97a040abf Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 17 Aug 2023 11:25:15 +0100 Subject: [PATCH] Sphinx 7.2.0 updates Environment.srcdir is now a pathlib.Path object rather than string [1]. [1] https://github.com/sphinx-doc/sphinx/commit/49d8304670 Change-Id: Ifd26e2dd2fa36bbc9b0335db08e698db638de26d Signed-off-by: Stephen Finucane --- openstackdocstheme/page_context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstackdocstheme/page_context.py b/openstackdocstheme/page_context.py index 7a6e8a6d..3337e01a 100644 --- a/openstackdocstheme/page_context.py +++ b/openstackdocstheme/page_context.py @@ -67,7 +67,7 @@ def _get_last_updated(app, pagename): # Strip the prefix from the filename so the git command recognizes # the file as part of the current repository. - src_file = full_src_file[len(app.builder.env.srcdir):].lstrip('/') + src_file = full_src_file[len(str(app.builder.env.srcdir)):].lstrip('/') candidates.append(src_file) if not os.path.exists(src_file):