-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Possible regression in linkcheck_allowed_redirects default following PR 13452 #13462
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
Comments
I've begun investigating; we do have some test coverage of projects that include a conf.py
index.rst
Test command:
Those would seem to me to indicate that the problem exists outside of Sphinx -- but even so, it feels to me that we should continue to track it here; it could be an interaction that is commonplace in the Sphinx extension/theme ecosystem, for example. I'm planning to join the downstream bugthread to add any relevant information there. |
Thanks for the help, @jayaddison ! I am not expert with the theme code. At a glance, they don't seem to touch a lot of linkcheck stuff that might affect downstream. Hmm. https://github.com/search?q=repo%3Apydata%2Fpydata-sphinx-theme+redirect&type=code https://github.com/search?q=repo%3Apydata%2Fpydata-sphinx-theme+linkcheck+redirect&type=code https://github.com/search?q=repo%3Apydata%2Fpydata-sphinx-theme+linkcheck&type=code Perhaps @drammock could advise? 🙏 |
I can now replicate the problem, after narrowing in on it downstream in astropy/sphinx-astropy#80. It is not replicable when using the Here is a minimal set of files to replicate the warning, using Sphinx commit 3c4b4e3 as the baseline: requirements.txt
conf.py
index.rst (empty)
Edit: markdown fixup |
I can reproduce locally; this is really odd. The pydata sphinx theme doesn't touch the $ git grep linkcheck src
src/pydata_sphinx_theme/translator.py:94: # some builders, e.g. linkcheck, do not define 'default_translator_class' |
@AA-Turner I'm not precisely certain what the cause of this problem is yet, other than it is something that occurs in combination with the Rolling back to a default value of |
tl;dr: Either setting (doesn't entirely explain why Edit: clarify a detail |
Note: the error also appears in other themes, like Furo. I want to avoid having A |
I'm planning to re-investigate this (particularly re: finding a solution that avoids the default |
I think the main problem is the following line, where we reset an encountered sentinel value to sphinx/sphinx/builders/linkcheck.py Line 754 in 3c4b4e3
Removing that prevents the warning from occurring. The unit tests have to be updated a little to accommodate that, though. I'll plan to open a pull request later today or tomorrow, unless anyone else is planning to! |
I've attempted to fix this with #13483 -- however, one of the I'm not sure how to proceed at the moment; I'll think about it a bit more. |
The most straightforward solution I've thought of is to use |
Describe the bug
Hi. Is it possible that #13452 introduced a regression? We see a new failure at astropy/sphinx-astropy#80 for sphinx-dev but we have no changed anything related to linkcheck lately.
The only specific linkcheck setting we touch is this at https://github.com/astropy/sphinx-astropy/blob/9ee5275a8ccc09f434dc54f66993dbd0356d7200/sphinx_astropy/conf/v2.py#L386
So the warning below is unexpected unless I missed something?
Hope you can advise. Thanks!
How to Reproduce
Run sphinx-astropy test suite using dev version of sphinx.
Environment Information
See https://github.com/astropy/sphinx-astropy/actions/runs/14198250147/job/39778585162
Sphinx extensions
N/A
Additional context
linkcheck_allowed_redirects
is an empty dictionary #13452 (comment)The text was updated successfully, but these errors were encountered: