[3.14] gh-125895: Fix static asset location for sphinx-notfound-page (GH-147984) (#148040)

(cherry picked from commit 80ab6d958a)

Co-authored-by: Stan Ulbrych <stan@python.org>
This commit is contained in:
Miss Islington (bot) 2026-04-03 17:40:12 +02:00 committed by GitHub
parent 3d49e490e2
commit 242ededffd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -570,6 +570,17 @@
stable_abi_file = 'data/stable_abi.dat'
threadsafety_file = 'data/threadsafety.dat'
# Options for notfound.extension
# -------------------------------
if not os.getenv("READTHEDOCS"):
if language_code:
notfound_urls_prefix = (
f'/{language_code.replace("_", "-").lower()}/{version}/'
)
else:
notfound_urls_prefix = f'/{version}/'
# Options for sphinxext-opengraph
# -------------------------------