Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

jayaddison
Copy link
Contributor

@jayaddison jayaddison commented Apr 14, 2025

Purpose

Patches the linkcheck module so that linkcheck_allowed_redirects is never assigned a value of None -- 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 the redirected (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

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).

@pllim
Copy link

pllim commented May 6, 2025

FWIW this PR turns our downstream job from red to green: astropy/sphinx-astropy#82

Thanks!

@jayaddison
Copy link
Contributor Author

Thank you @pllim for testing it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Possible regression in linkcheck_allowed_redirects default following PR 13452
2 participants