From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Fri, 3 Apr 2026 15:40:32 +0000 (+0200) Subject: [3.13] gh-125895: Fix static asset location for `sphinx-notfound-page` (GH-147984... X-Git-Tag: v3.13.13~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a188aa082bd73e6f191fee97e90ee8f753c0c80;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-125895: Fix static asset location for `sphinx-notfound-page` (GH-147984) (#148041) (cherry picked from commit 80ab6d958a0e4aa322aaf96994c43cd637496be6) Co-authored-by: Stan Ulbrych --- diff --git a/Doc/conf.py b/Doc/conf.py index b218e3e7c046..34715918a5fe 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -561,6 +561,17 @@ extlinks_detect_hardcoded_links = True refcount_file = 'data/refcounts.dat' stable_abi_file = 'data/stable_abi.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 # -------------------------------