-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
linkcheck: disallow 'None' value for 'linkcheck_allowed_redirects' setting #13483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
jayaddison
wants to merge
9
commits into
sphinx-doc:master
Choose a base branch
from
jayaddison:issue-13462/fix-linkcheck-theme-regression-when-allow-redirects-is-none
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…-when-allow-redirects-is-none
…-allow-redirects value
…-closely-resemble existing defaults
FWIW this PR turns our downstream job from red to green: astropy/sphinx-astropy#82 Thanks! |
Thank you @pllim for testing it :) |
…-when-allow-redirects-is-none
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
Patches the
linkcheck
module so thatlinkcheck_allowed_redirects
is never assigned a value ofNone
-- this was failing to typecheck against the allowed values for the config value when HTML themes were enabled (ref: #13462).The range of possible values for the
linkcheck_allowed_redirects
config setting are:False
(new default): report all redirects using theredirected
(non-success) report code.{}
(new): warn about all redirects and report them as redirections instead of success.{ ... }
: existing logic; permit a selection of regex-based source-to-destination redirections to be considered successful.References
linkcheck_allowed_redirects
is non-empty #13439.Edit: possible-values in this description requires redrafting; add a todo placeholder.
Edit: update proposed config value behaviours.
Edit: invert default value (was: true; now: false).