From 24a2467bf7fb63bc8a46cca4002091994f56fe1f Mon Sep 17 00:00:00 2001 From: gabalafou Date: Thu, 8 May 2025 15:20:19 +0200 Subject: [PATCH] Fix Sphinx dev error linkcheck_allowed_redirects Tests against the latest/dev Sphinx version have been seeing: > WARNING: The config value `linkcheck_allowed_redirects' has type `NoneType'; expected `dict'. --- tests/sites/base/conf.py | 3 +++ tests/sites/breadcrumbs/conf.py | 3 +++ tests/sites/colors/conf.py | 3 +++ tests/sites/deprecated/conf.py | 3 +++ tests/sites/sidebars/conf.py | 3 +++ tests/sites/test_included_toc/conf.py | 3 +++ tests/sites/test_navbar_no_in_page_headers/conf.py | 3 +++ tests/sites/version_switcher/conf.py | 3 +++ 8 files changed, 24 insertions(+) diff --git a/tests/sites/base/conf.py b/tests/sites/base/conf.py index 53117ab820..55cd5df872 100644 --- a/tests/sites/base/conf.py +++ b/tests/sites/base/conf.py @@ -21,3 +21,6 @@ # Base options, we can add other key/vals later html_sidebars = {"section1/index": ["sidebar-nav-bs.html"]} + +# see https://github.com/sphinx-doc/sphinx/issues/13462 +linkcheck_allowed_redirects = {} diff --git a/tests/sites/breadcrumbs/conf.py b/tests/sites/breadcrumbs/conf.py index 777fc8dab2..b4a0244e25 100644 --- a/tests/sites/breadcrumbs/conf.py +++ b/tests/sites/breadcrumbs/conf.py @@ -30,3 +30,6 @@ "secondary_sidebar_items": ["breadcrumbs"], "article_header_start": ["breadcrumbs"], } + +# see https://github.com/sphinx-doc/sphinx/issues/13462 +linkcheck_allowed_redirects = {} diff --git a/tests/sites/colors/conf.py b/tests/sites/colors/conf.py index dcc46be53c..c0b83f5a67 100644 --- a/tests/sites/colors/conf.py +++ b/tests/sites/colors/conf.py @@ -17,3 +17,6 @@ html_theme = "pydata_sphinx_theme" html_copy_source = True html_sourcelink_suffix = "" + +# see https://github.com/sphinx-doc/sphinx/issues/13462 +linkcheck_allowed_redirects = {} diff --git a/tests/sites/deprecated/conf.py b/tests/sites/deprecated/conf.py index 8d565d1b3e..85cc134d7d 100644 --- a/tests/sites/deprecated/conf.py +++ b/tests/sites/deprecated/conf.py @@ -27,3 +27,6 @@ } html_sidebars = {"section1/index": ["sidebar-nav-bs.html"]} + +# see https://github.com/sphinx-doc/sphinx/issues/13462 +linkcheck_allowed_redirects = {} diff --git a/tests/sites/sidebars/conf.py b/tests/sites/sidebars/conf.py index becfdb45bb..e78bb265a7 100644 --- a/tests/sites/sidebars/conf.py +++ b/tests/sites/sidebars/conf.py @@ -14,3 +14,6 @@ html_sidebars = { "section2/no-sidebar": [], # Turn off primary/left sidebar } + +# see https://github.com/sphinx-doc/sphinx/issues/13462 +linkcheck_allowed_redirects = {} diff --git a/tests/sites/test_included_toc/conf.py b/tests/sites/test_included_toc/conf.py index d014360480..1c3c1a41ed 100644 --- a/tests/sites/test_included_toc/conf.py +++ b/tests/sites/test_included_toc/conf.py @@ -13,3 +13,6 @@ # -- Options for HTML output ------------------------------------------------- html_theme = "pydata_sphinx_theme" + +# see https://github.com/sphinx-doc/sphinx/issues/13462 +linkcheck_allowed_redirects = {} diff --git a/tests/sites/test_navbar_no_in_page_headers/conf.py b/tests/sites/test_navbar_no_in_page_headers/conf.py index a7c9f95c85..a2e9b00e65 100644 --- a/tests/sites/test_navbar_no_in_page_headers/conf.py +++ b/tests/sites/test_navbar_no_in_page_headers/conf.py @@ -14,3 +14,6 @@ html_copy_source = True html_sourcelink_suffix = "" + +# see https://github.com/sphinx-doc/sphinx/issues/13462 +linkcheck_allowed_redirects = {} diff --git a/tests/sites/version_switcher/conf.py b/tests/sites/version_switcher/conf.py index 769baf8207..4cb32a4aa5 100644 --- a/tests/sites/version_switcher/conf.py +++ b/tests/sites/version_switcher/conf.py @@ -20,3 +20,6 @@ }, "navbar_start": ["navbar-logo", "version-switcher"], } + +# see https://github.com/sphinx-doc/sphinx/issues/13462 +linkcheck_allowed_redirects = {}