-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Linking to pip index page broken #7130
Comments
Hey I would like to give it a try! |
Could I get some more insight on what the actual problem is? |
hi like to work on this |
Sure! Relevant documentation: https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html Line 37 in e060970
The first step would be to check if the issue can be reproduced with the steps in the issue. Then, you'd want to diagnose why the issue is happening - one thing to try is to see if some part of the generated link is in the conf.py file linked above. Some amount of familiarity with Sphinx would go a long way, but isn't necessary to try to tackle this. |
I think this has something to do rather with the docs hosting than with docs building - the locally built docs are ok, I'd check the url routing. This can only be done by someone that has access to docs deployment process. |
Here's what the docs site exposes:
|
Oh, wait. It exists (missed it because of the long output). So it's either a wrong syntax or a Sphinx bug. std:doc
[...]
index - The Python Package Installer : pip
[...] |
FWIW I recall having troubles linking a doc role in my projects so I ended up just creating a unique alias for it and using just the name w/o the explicit site name. |
Action items:
|
I think we're hitting some very weird bug here. On master:
Changing the heading on
For https://pip.pypa.io/en/latest/objects.inv:
|
The relevant code in Sphinx does say something about handling-of-spaces in intersphinx loading. |
Yeah, could also be different sphinx versions. Also, sphinx uses quite a lot of magic when autocreating refs, not only based on headers but other things too. |
The following patch (build via dirhtml) is what was needed here: diff --git a/tox.ini b/tox.ini
index 993d3f51..bb7fce64 100644
--- a/tox.ini
+++ b/tox.ini
@@ -33,7 +33,7 @@ commands = pytest --timeout 300 --cov=pip --cov-report=term-missing --cov-report
deps = -r{toxinidir}/tools/requirements/docs.txt
basepython = python3.8
commands =
- sphinx-build -W -d {envtmpdir}/doctrees/html -b html docs/html docs/build/html
+ sphinx-build -W -d {envtmpdir}/doctrees/html -b dirhtml docs/html docs/build/html
# Having the conf.py in the docs/html is weird but needed because we
# can not use a different configuration directory vs source directory on RTD
# currently -- https://github.com/rtfd/readthedocs.org/issues/1543.
|
@pradyunsg can you explain why? Also, another quickfix would be putting there something like .. _`pip-index-docs-page`:
|
I mean, they say that the difference is minimal: readthedocs/readthedocs.org#233 (comment) |
🤷♂ This is definitely a sphinx bug, likely, in writing intersphinx files. Adding a
|
Or in parsing... There used to be a special case for |
I'm curious if using |
Well, I stand corrected -- the issue seems to be in their print(repr(entry))
print([name, domainname, typ, prio, uri, dispname]) Comparing the line for 'index' with others, we have:
and
Notice how the latter has a As I'd expected when I started looking into this, the issue is with the regex being used during loading. |
Basically, |
</sherlock_mode> I guess you're the best person to write down the details for the sphinx tracker now. |
I guess the workaround would be |
Hehe.
Something like that, or:
|
#7720: fix? |
Environment
Description
The index ref in
pip
sobjects.inv
leads to a non existent page https://pip.pypa.io/en/stable/pipExpected behavior
The index ref in
pip
sobjects.inv
should reference https://pip.pypa.io/en/stable/How to Reproduce
pip
docs to intersphinx mappingOutput
The text was updated successfully, but these errors were encountered: