From 08bca60eee1789587f4e2ad33dee0f487d456b98 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 9 Jan 2026 16:14:23 +0000 Subject: [PATCH] Bump sphinx min version This allows us to remove some conditional logic. Change-Id: Ie4ced37286bfbabab6a7e451b8cc7a53e8941a41 Signed-off-by: Stephen Finucane --- openstackdocstheme/page_context.py | 10 +--------- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/openstackdocstheme/page_context.py b/openstackdocstheme/page_context.py index da93fb64..88b6e07e 100644 --- a/openstackdocstheme/page_context.py +++ b/openstackdocstheme/page_context.py @@ -16,7 +16,6 @@ import os.path import subprocess import time -import sphinx from sphinx.util import logging from . import version @@ -82,14 +81,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. - # NOTE(sean-k-mooney): on python 3.9 we clamp sphinx to <8 - # app.builder.env.srcdir is a string on py39 - if sphinx.version_info >= (8, 0): - src_file = str(full_src_file.relative_to(app.builder.env.srcdir)) - else: # Sphinx < 8.0 - src_file = full_src_file[len(str(app.builder.env.srcdir)) :].lstrip( - '/' - ) + src_file = str(full_src_file.relative_to(app.builder.env.srcdir)) candidates.append(src_file) if not os.path.exists(src_file): diff --git a/requirements.txt b/requirements.txt index 7effca43..aaff1048 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ pbr!=2.1.0,>=2.0.0 # Apache-2.0 dulwich>=0.15.0 # Apache-2.0 -sphinx>=6.0.0 # BSD +sphinx>=8.0.0 # BSD