Skip to content
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

Closed
hoefling opened this issue Oct 2, 2019 · 25 comments · Fixed by #7720
Closed

Linking to pip index page broken #7130

hoefling opened this issue Oct 2, 2019 · 25 comments · Fixed by #7720
Labels
auto-locked Outdated issues that have been locked by automation state: blocked Can not be done until something else is done type: bug A confirmed bug or unintended behavior type: docs Documentation related

Comments

@hoefling
Copy link

hoefling commented Oct 2, 2019

Environment

  • pip version: 19.2.3
  • Python version: 3.6
  • OS: Linux

Description

The index ref in pips objects.inv leads to a non existent page https://pip.pypa.io/en/stable/pip

Expected behavior

The index ref in pips objects.inv should reference https://pip.pypa.io/en/stable/

How to Reproduce

  1. create new Sphinx project
  2. add pip docs to intersphinx mapping
  3. reference index page (maybe more are affected)
  4. rendered link leads to nowhere

Output

$ sphinx-quickstart -p spam -a eggs -v 0.1 -r 0.1 -l en --sep --ext-intersphinx
# add pip to intersphinx mapping
$ sed -i 's;^intersphinx_mapping.*$;intersphinx_mapping = {"pip": ("https://pip.pypa.io/en/stable/", None)};' source/conf.py
# write dummy index
$ echo ':doc:`pip:index`' > source/index.rst
# run links validation
$ sphinx-build -Eab linkcheck source/ build
Running Sphinx v2.2.0
loading translations [en]... done
loading intersphinx inventory from https://pip.pypa.io/en/stable/objects.inv...
building [mo]: all of 0 po files
building [linkcheck]: all source files
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index                                                                                                     
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index                                                                                                      
(line    1) broken    https://pip.pypa.io/en/stable/pip - 404 Client Error: Not Found for url: https://pip.pypa.io/en/stable/pip

build finished with problems.
@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Oct 2, 2019
@pradyunsg pradyunsg added type: bug A confirmed bug or unintended behavior type: docs Documentation related labels Oct 2, 2019
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Oct 2, 2019
@ghost
Copy link

ghost commented Feb 2, 2020

Hey I would like to give it a try!

@ghost
Copy link

ghost commented Feb 2, 2020

Could I get some more insight on what the actual problem is?

@PSY27
Copy link

PSY27 commented Feb 2, 2020

hi like to work on this

@pradyunsg
Copy link
Member

Sure!

Relevant documentation: https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html
Relevant code location in pip:

intersphinx_mapping = {

tox -e docs can be used to build the documentation. There is an objects.inv file generated in this process (apparently, I don't know the details!).

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.

@hoefling
Copy link
Author

hoefling commented Feb 2, 2020

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.

@webknjaz
Copy link
Member

webknjaz commented Feb 4, 2020

Here's what the docs site exposes:

$ python -m sphinx.ext.intersphinx https://pip.pypa.io/en/latest/objects.inv
std:cmdoption
	--abi                                    reference/pip_install/#cmdoption-abi
	--algorithm                              reference/pip_hash/#cmdoption-a
	--all                                    reference/pip_freeze/#cmdoption-all
	--build                                  reference/pip_wheel/#cmdoption-b
	--build-option                           reference/pip_wheel/#cmdoption-build-option
	--cache-dir                              reference/pip/#cmdoption-cache-dir
	--cert                                   reference/pip/#cmdoption-cert
	--client-cert                            reference/pip/#cmdoption-client-cert
	--compile                                reference/pip_install/#cmdoption-compile
	--constraint                             reference/pip_wheel/#cmdoption-c
	--dest                                   reference/pip_download/#cmdoption-d
	--disable-pip-version-check              reference/pip/#cmdoption-disable-pip-version-check
	--editable                               reference/pip_wheel/#cmdoption-e
	--editor                                 reference/pip_config/#cmdoption-editor
	--exclude-editable                       reference/pip_list/#cmdoption-exclude-editable
	--exists-action                          reference/pip/#cmdoption-exists-action
	--extra-index-url                        reference/pip_wheel/#cmdoption-extra-index-url
	--files                                  reference/pip_show/#cmdoption-f
	--find-links                             reference/pip_wheel/#cmdoption-f
	--force-reinstall                        reference/pip_install/#cmdoption-force-reinstall
	--format                                 reference/pip_list/#cmdoption-format
	--global                                 reference/pip_config/#cmdoption-global
	--global-option                          reference/pip_wheel/#cmdoption-global-option
	--help                                   reference/pip/#cmdoption-h
	--ignore-installed                       reference/pip_install/#cmdoption-i
	--ignore-requires-python                 reference/pip_wheel/#cmdoption-ignore-requires-python
	--implementation                         reference/pip_install/#cmdoption-implementation
	--include-editable                       reference/pip_list/#cmdoption-include-editable
	--index                                  reference/pip_search/#cmdoption-i
	--index-url                              reference/pip_wheel/#cmdoption-i
	--install-option                         reference/pip_install/#cmdoption-install-option
	--isolated                               reference/pip/#cmdoption-isolated
	--local                                  reference/pip_list/#cmdoption-l
	--log                                    reference/pip/#cmdoption-log
	--no-binary                              reference/pip_wheel/#cmdoption-no-binary
	--no-build-isolation                     reference/pip_wheel/#cmdoption-no-build-isolation
	--no-cache-dir                           reference/pip/#cmdoption-no-cache-dir
	--no-clean                               reference/pip_wheel/#cmdoption-no-clean
	--no-color                               reference/pip/#cmdoption-no-color
	--no-compile                             reference/pip_install/#cmdoption-no-compile
	--no-deps                                reference/pip_wheel/#cmdoption-no-deps
	--no-index                               reference/pip_wheel/#cmdoption-no-index
	--no-python-version-warning              reference/pip/#cmdoption-no-python-version-warning
	--no-setuptools                          installing/#cmdoption-no-setuptools
	--no-warn-conflicts                      reference/pip_install/#cmdoption-no-warn-conflicts
	--no-warn-script-location                reference/pip_install/#cmdoption-no-warn-script-location
	--no-wheel                               installing/#cmdoption-no-wheel
	--not-required                           reference/pip_list/#cmdoption-not-required
	--only-binary                            reference/pip_wheel/#cmdoption-only-binary
	--outdated                               reference/pip_list/#cmdoption-o
	--path                                   reference/pip_list/#cmdoption-path
	--platform                               reference/pip_install/#cmdoption-platform
	--pre                                    reference/pip_wheel/#cmdoption-pre
	--prefer-binary                          reference/pip_wheel/#cmdoption-prefer-binary
	--prefix                                 reference/pip_install/#cmdoption-prefix
	--progress-bar                           reference/pip_wheel/#cmdoption-progress-bar
	--proxy                                  reference/pip/#cmdoption-proxy
	--python-version                         reference/pip_install/#cmdoption-python-version
	--quiet                                  reference/pip/#cmdoption-q
	--require-hashes                         reference/pip_wheel/#cmdoption-require-hashes
	--requirement                            reference/pip_wheel/#cmdoption-r
	--retries                                reference/pip/#cmdoption-retries
	--root                                   reference/pip_install/#cmdoption-root
	--site                                   reference/pip_config/#cmdoption-site
	--src                                    reference/pip_wheel/#cmdoption-src
	--target                                 reference/pip_install/#cmdoption-t
	--timeout                                reference/pip/#cmdoption-timeout
	--trusted-host                           reference/pip/#cmdoption-trusted-host
	--upgrade                                reference/pip_install/#cmdoption-u
	--upgrade-strategy                       reference/pip_install/#cmdoption-upgrade-strategy
	--uptodate                               reference/pip_list/#cmdoption-u
	--use-pep517                             reference/pip_wheel/#cmdoption-use-pep517
	--user                                   reference/pip_list/#cmdoption-user
	--verbose                                reference/pip/#cmdoption-v
	--version                                reference/pip/#cmdoption-version
	--wheel-dir                              reference/pip_wheel/#cmdoption-w
	--yes                                    reference/pip_uninstall/#cmdoption-y
	-I                                       reference/pip_install/#cmdoption-i
	-U                                       reference/pip_install/#cmdoption-u
	-V                                       reference/pip/#cmdoption-version
	-a                                       reference/pip_hash/#cmdoption-a
	-b                                       reference/pip_wheel/#cmdoption-b
	-c                                       reference/pip_wheel/#cmdoption-c
	-d                                       reference/pip_download/#cmdoption-d
	-e                                       reference/pip_wheel/#cmdoption-e
	-f                                       reference/pip_wheel/#cmdoption-f
	-h                                       reference/pip/#cmdoption-h
	-i                                       reference/pip_wheel/#cmdoption-i
	-l                                       reference/pip_list/#cmdoption-l
	-o                                       reference/pip_list/#cmdoption-o
	-q                                       reference/pip/#cmdoption-q
	-r                                       reference/pip_wheel/#cmdoption-r
	-t                                       reference/pip_install/#cmdoption-t
	-u                                       reference/pip_list/#cmdoption-u
	-v                                       reference/pip/#cmdoption-v
	-w                                       reference/pip_wheel/#cmdoption-w
	-y                                       reference/pip_uninstall/#cmdoption-y
std:doc
	cookbook                                 Cookbook                                : cookbook/
	development/architecture/anatomy         Repository anatomy & directory structure: development/architecture/anatomy/
	development/architecture/index           Architecture of pip’s internals         : development/architecture/
	development/architecture/overview        Broad functionality overview            : development/architecture/overview/
	development/architecture/package-finding Finding and choosing files (index and PackageFinder): development/architecture/package-finding/
	development/ci                           Continuous Integration                  : development/ci/
	development/configuration                Configuration                           : development/configuration/
	development/contributing                 Contributing                            : development/contributing/
	development/getting-started              Getting Started                         : development/getting-started/
	development/index                        Development                             : development/
	development/issue-triage                 Issue Triage                            : development/issue-triage/
	development/release-process              Release process                         : development/release-process/
	development/vendoring-policy             Vendoring Policy                        : development/vendoring-policy/
	index                                    - The Python Package Installer          : pip
	installing                               Installation                            : installing/
	logic                                    Internal Details                        : logic/
	news                                     Release Notes                           : news/
	quickstart                               Quickstart                              : quickstart/
	reference/index                          Reference Guide                         : reference/
	reference/pip                            pip                                     : reference/pip/
	reference/pip_check                      pip check                               : reference/pip_check/
	reference/pip_config                     pip config                              : reference/pip_config/
	reference/pip_debug                      pip debug                               : reference/pip_debug/
	reference/pip_download                   pip download                            : reference/pip_download/
	reference/pip_freeze                     pip freeze                              : reference/pip_freeze/
	reference/pip_hash                       pip hash                                : reference/pip_hash/
	reference/pip_install                    pip install                             : reference/pip_install/
	reference/pip_list                       pip list                                : reference/pip_list/
	reference/pip_search                     pip search                              : reference/pip_search/
	reference/pip_show                       pip show                                : reference/pip_show/
	reference/pip_uninstall                  pip uninstall                           : reference/pip_uninstall/
	reference/pip_wheel                      pip wheel                               : reference/pip_wheel/
	usage                                    Usage                                   : usage/
	user_guide                               User Guide                              : user_guide/
std:label
	--cache-dir                              reference/pip/#cache-dir
	--cert                                   reference/pip/#cert
	--client-cert                            reference/pip/#client-cert
	--disable-pip-version-check              reference/pip/#disable-pip-version-check
	--exists-action                          reference/pip/#id3
	--help                                   reference/pip/#help
	--isolated                               reference/pip/#isolated
	--log                                    reference/pip/#log
	--no-cache-dir                           reference/pip/#no-cache-dir
	--no-color                               reference/pip/#no-color
	--no-python-version-warning              reference/pip/#no-python-version-warning
	--proxy                                  reference/pip/#proxy
	--quiet                                  reference/pip/#quiet
	--require-hashes                         reference/pip_install/#require-hashes
	--retries                                reference/pip/#retries
	--timeout                                reference/pip/#timeout
	--trusted-host                           reference/pip/#trusted-host
	--verbose                                reference/pip/#verbose
	--version                                reference/pip/#version
	best-candidate-result-class              The BestCandidateResult class           : development/architecture/package-finding/#best-candidate-result-class
	build-interface                          Build System Interface                  : reference/pip/#build-interface
	caching                                  Caching                                 : reference/pip_install/#caching
	candidate-evaluator-class                The CandidateEvaluator class            : development/architecture/package-finding/#candidate-evaluator-class
	candidate-preferences-class              The CandidatePreferences class          : development/architecture/package-finding/#candidate-preferences-class
	choosing-news-entry-type                 Choosing the type of NEWS entry         : development/contributing/#choosing-news-entry-type
	compatibility-requirements               Python and OS Compatibility             : installing/#compatibility-requirements
	config-file                              Config file                             : user_guide/#config-file
	config_--editor                          reference/pip_config/#config-editor
	config_--global                          reference/pip_config/#config-global
	config_--site                            reference/pip_config/#config-site
	config_--user                            reference/pip_config/#config-user
	configuration                            Configuration                           : user_guide/#configuration
	constraints files                        Constraints Files                       : user_guide/#constraints-files
	controlling-setup-requires               Controlling setup_requires              : reference/pip_install/#controlling-setup-requires
	debug_--abi                              reference/pip_debug/#debug-abi
	debug_--implementation                   reference/pip_debug/#debug-implementation
	debug_--platform                         reference/pip_debug/#debug-platform
	debug_--python-version                   reference/pip_debug/#debug-python-version
	download_--abi                           reference/pip_download/#download-abi
	download_--build                         reference/pip_download/#download-build
	download_--constraint                    reference/pip_download/#download-constraint
	download_--dest                          reference/pip_download/#download-dest
	download_--extra-index-url               reference/pip_download/#download-extra-index-url
	download_--find-links                    reference/pip_download/#download-find-links
	download_--global-option                 reference/pip_download/#download-global-option
	download_--implementation                reference/pip_download/#download-implementation
	download_--index-url                     reference/pip_download/#download-index-url
	download_--no-binary                     reference/pip_download/#download-no-binary
	download_--no-build-isolation            reference/pip_download/#download-no-build-isolation
	download_--no-clean                      reference/pip_download/#download-no-clean
	download_--no-deps                       reference/pip_download/#download-no-deps
	download_--no-index                      reference/pip_download/#download-no-index
	download_--only-binary                   reference/pip_download/#download-only-binary
	download_--platform                      reference/pip_download/#download-platform
	download_--pre                           reference/pip_download/#download-pre
	download_--prefer-binary                 reference/pip_download/#download-prefer-binary
	download_--progress-bar                  reference/pip_download/#download-progress-bar
	download_--python-version                reference/pip_download/#download-python-version
	download_--require-hashes                reference/pip_download/#download-require-hashes
	download_--requirement                   reference/pip_download/#download-requirement
	download_--src                           reference/pip_download/#download-src
	download_--use-pep517                    reference/pip_download/#download-use-pep517
	editable-installs                        “Editable” Installs                     : reference/pip_install/#editable-installs
	example requirements file                Example Requirements File               : reference/pip_install/#example-requirements-file
	exists-action                            --exists-action option                  : reference/pip/#exists-action
	filelogging                              File logging                            : reference/pip/#filelogging
	freeze_--all                             reference/pip_freeze/#freeze-all
	freeze_--exclude-editable                reference/pip_freeze/#freeze-exclude-editable
	freeze_--find-links                      reference/pip_freeze/#freeze-find-links
	freeze_--local                           reference/pip_freeze/#freeze-local
	freeze_--path                            reference/pip_freeze/#freeze-path
	freeze_--requirement                     reference/pip_freeze/#freeze-requirement
	freeze_--user                            reference/pip_freeze/#freeze-user
	general options                          General Options                         : reference/pip/#general-options
	genindex                                 Index                                   : genindex/
	get-pip                                  Installing with get-pip.py              : installing/#get-pip
	hash-checking mode                       Hash-Checking Mode                      : reference/pip_install/#hash-checking-mode
	hash_--algorithm                         reference/pip_hash/#hash-algorithm
	index-overview                           Overview                                : development/architecture/package-finding/#index-overview
	install_--abi                            reference/pip_install/#install-abi
	install_--build                          reference/pip_install/#install-build
	install_--compile                        reference/pip_install/#install-compile
	install_--constraint                     reference/pip_install/#install-constraint
	install_--editable                       reference/pip_install/#install-editable
	install_--extra-index-url                reference/pip_install/#install-extra-index-url
	install_--find-links                     reference/pip_install/#install-find-links
	install_--force-reinstall                reference/pip_install/#install-force-reinstall
	install_--global-option                  reference/pip_install/#install-global-option
	install_--ignore-installed               reference/pip_install/#install-ignore-installed
	install_--ignore-requires-python         reference/pip_install/#install-ignore-requires-python
	install_--implementation                 reference/pip_install/#install-implementation
	install_--index-url                      reference/pip_install/#install-index-url
	install_--install-option                 reference/pip_install/#install-install-option
	install_--no-binary                      reference/pip_install/#install-no-binary
	install_--no-build-isolation             reference/pip_install/#install-no-build-isolation
	install_--no-clean                       reference/pip_install/#install-no-clean
	install_--no-compile                     reference/pip_install/#install-no-compile
	install_--no-deps                        reference/pip_install/#install-no-deps
	install_--no-index                       reference/pip_install/#install-no-index
	install_--no-warn-conflicts              reference/pip_install/#install-no-warn-conflicts
	install_--no-warn-script-location        reference/pip_install/#install-no-warn-script-location
	install_--only-binary                    reference/pip_install/#install-only-binary
	install_--platform                       reference/pip_install/#install-platform
	install_--pre                            reference/pip_install/#install-pre
	install_--prefer-binary                  reference/pip_install/#install-prefer-binary
	install_--prefix                         reference/pip_install/#install-prefix
	install_--progress-bar                   reference/pip_install/#install-progress-bar
	install_--python-version                 reference/pip_install/#install-python-version
	install_--require-hashes                 reference/pip_install/#install-require-hashes
	install_--requirement                    reference/pip_install/#install-requirement
	install_--root                           reference/pip_install/#install-root
	install_--src                            reference/pip_install/#install-src
	install_--target                         reference/pip_install/#install-target
	install_--upgrade                        reference/pip_install/#install-upgrade
	install_--upgrade-strategy               reference/pip_install/#install-upgrade-strategy
	install_--use-pep517                     reference/pip_install/#install-use-pep517
	install_--user                           reference/pip_install/#install-user
	installation                             Installation                            : installing/#installation
	installation bundle                      Installation Bundles                    : user_guide/#installation-bundle
	installing from local packages           Installing from local packages          : user_guide/#installing-from-local-packages
	installing from wheels                   Installing from Wheels                  : user_guide/#installing-from-wheels
	link-collector-class                     The LinkCollector class                 : development/architecture/package-finding/#link-collector-class
	link-evaluator-class                     The LinkEvaluator class                 : development/architecture/package-finding/#link-evaluator-class
	list_--editable                          reference/pip_list/#list-editable
	list_--exclude-editable                  reference/pip_list/#list-exclude-editable
	list_--extra-index-url                   reference/pip_list/#list-extra-index-url
	list_--find-links                        reference/pip_list/#list-find-links
	list_--format                            reference/pip_list/#list-format
	list_--include-editable                  reference/pip_list/#list-include-editable
	list_--index-url                         reference/pip_list/#list-index-url
	list_--local                             reference/pip_list/#list-local
	list_--no-index                          reference/pip_list/#list-no-index
	list_--not-required                      reference/pip_list/#list-not-required
	list_--outdated                          reference/pip_list/#list-outdated
	list_--path                              reference/pip_list/#list-path
	list_--pre                               reference/pip_list/#list-pre
	list_--uptodate                          reference/pip_list/#list-uptodate
	list_--user                              reference/pip_list/#list-user
	logging                                  Logging                                 : reference/pip/#logging
	modindex                                 Module Index                            : py-modindex/
	package-finder-class                     The PackageFinder class                 : development/architecture/package-finding/#package-finder-class
	pep-518-limitations                      reference/pip/#pep-518-limitations
	per-requirement overrides                Per-requirement Overrides               : reference/pip_install/#per-requirement-overrides
	pip check                                reference/pip_check/#pip-check
	pip config                               reference/pip_config/#pip-config
	pip debug                                reference/pip_debug/#pip-debug
	pip download                             reference/pip_download/#pip-download
	pip freeze                               reference/pip_freeze/#pip-freeze
	pip hash                                 reference/pip_hash/#pip-hash
	pip install                              reference/pip_install/#pip-install
	pip install examples                     Examples                                : reference/pip_install/#pip-install-examples
	pip install options                      Options                                 : reference/pip_install/#pip-install-options
	pip list                                 reference/pip_list/#pip-list
	pip search                               reference/pip_search/#pip-search
	pip show                                 reference/pip_show/#pip-show
	pip uninstall                            reference/pip_uninstall/#pip-uninstall
	pip wheel                                reference/pip_wheel/#pip-wheel
	pre release versions                     Pre-release Versions                    : reference/pip_install/#pre-release-versions
	repeatability                            Ensuring Repeatability                  : user_guide/#repeatability
	requirement specifiers                   Requirement Specifiers                  : reference/pip_install/#requirement-specifiers
	requirements file format                 Requirements File Format                : reference/pip_install/#requirements-file-format
	requirements files                       Requirements Files                      : user_guide/#requirements-files
	search                                   Search Page                             : search/
	search_--index                           reference/pip_search/#search-index
	show_--files                             reference/pip_show/#show-files
	ssl certificate verification             SSL Certificate Verification            : reference/pip_install/#ssl-certificate-verification
	uninstall_--requirement                  reference/pip_uninstall/#uninstall-requirement
	uninstall_--yes                          reference/pip_uninstall/#uninstall-yes
	upgrading pip                            Upgrading pip                           : installing/#upgrading-pip
	using environment variables              Using Environment Variables             : reference/pip_install/#using-environment-variables
	using pip from your program              Using pip from your program             : user_guide/#using-pip-from-your-program
	vcs support                              VCS Support                             : reference/pip_install/#vcs-support
	wheel cache                              Wheel Cache                             : reference/pip_install/#wheel-cache
	wheel_--build                            reference/pip_wheel/#wheel-build
	wheel_--build-option                     reference/pip_wheel/#wheel-build-option
	wheel_--constraint                       reference/pip_wheel/#wheel-constraint
	wheel_--editable                         reference/pip_wheel/#wheel-editable
	wheel_--extra-index-url                  reference/pip_wheel/#wheel-extra-index-url
	wheel_--find-links                       reference/pip_wheel/#wheel-find-links
	wheel_--global-option                    reference/pip_wheel/#wheel-global-option
	wheel_--ignore-requires-python           reference/pip_wheel/#wheel-ignore-requires-python
	wheel_--index-url                        reference/pip_wheel/#wheel-index-url
	wheel_--no-binary                        reference/pip_wheel/#wheel-no-binary
	wheel_--no-build-isolation               reference/pip_wheel/#wheel-no-build-isolation
	wheel_--no-clean                         reference/pip_wheel/#wheel-no-clean
	wheel_--no-deps                          reference/pip_wheel/#wheel-no-deps
	wheel_--no-index                         reference/pip_wheel/#wheel-no-index
	wheel_--only-binary                      reference/pip_wheel/#wheel-only-binary
	wheel_--pre                              reference/pip_wheel/#wheel-pre
	wheel_--prefer-binary                    reference/pip_wheel/#wheel-prefer-binary
	wheel_--progress-bar                     reference/pip_wheel/#wheel-progress-bar
	wheel_--require-hashes                   reference/pip_wheel/#wheel-require-hashes
	wheel_--requirement                      reference/pip_wheel/#wheel-requirement
	wheel_--src                              reference/pip_wheel/#wheel-src
	wheel_--use-pep517                       reference/pip_wheel/#wheel-use-pep517
	wheel_--wheel-dir                        reference/pip_wheel/#wheel-wheel-dir
$ python -m sphinx.ext.intersphinx https://pip.pypa.io/en/stable/objects.inv
std:cmdoption
	--abi                                    reference/pip_install/#cmdoption-abi
	--algorithm                              reference/pip_hash/#cmdoption-a
	--all                                    reference/pip_freeze/#cmdoption-all
	--build                                  reference/pip_wheel/#cmdoption-b
	--build-option                           reference/pip_wheel/#cmdoption-build-option
	--cache-dir                              reference/pip/#cmdoption-cache-dir
	--cert                                   reference/pip/#cmdoption-cert
	--client-cert                            reference/pip/#cmdoption-client-cert
	--compile                                reference/pip_install/#cmdoption-compile
	--constraint                             reference/pip_wheel/#cmdoption-c
	--dest                                   reference/pip_download/#cmdoption-d
	--disable-pip-version-check              reference/pip/#cmdoption-disable-pip-version-check
	--editable                               reference/pip_wheel/#cmdoption-e
	--editor                                 reference/pip_config/#cmdoption-editor
	--exclude-editable                       reference/pip_list/#cmdoption-exclude-editable
	--exists-action                          reference/pip/#cmdoption-exists-action
	--extra-index-url                        reference/pip_wheel/#cmdoption-extra-index-url
	--files                                  reference/pip_show/#cmdoption-f
	--find-links                             reference/pip_wheel/#cmdoption-f
	--force-reinstall                        reference/pip_install/#cmdoption-force-reinstall
	--format                                 reference/pip_list/#cmdoption-format
	--global                                 reference/pip_config/#cmdoption-global
	--global-option                          reference/pip_wheel/#cmdoption-global-option
	--help                                   reference/pip/#cmdoption-h
	--ignore-installed                       reference/pip_install/#cmdoption-i
	--ignore-requires-python                 reference/pip_wheel/#cmdoption-ignore-requires-python
	--implementation                         reference/pip_install/#cmdoption-implementation
	--include-editable                       reference/pip_list/#cmdoption-include-editable
	--index                                  reference/pip_search/#cmdoption-i
	--index-url                              reference/pip_wheel/#cmdoption-i
	--install-option                         reference/pip_install/#cmdoption-install-option
	--isolated                               reference/pip/#cmdoption-isolated
	--local                                  reference/pip_list/#cmdoption-l
	--log                                    reference/pip/#cmdoption-log
	--no-binary                              reference/pip_wheel/#cmdoption-no-binary
	--no-build-isolation                     reference/pip_wheel/#cmdoption-no-build-isolation
	--no-cache-dir                           reference/pip/#cmdoption-no-cache-dir
	--no-clean                               reference/pip_wheel/#cmdoption-no-clean
	--no-color                               reference/pip/#cmdoption-no-color
	--no-compile                             reference/pip_install/#cmdoption-no-compile
	--no-deps                                reference/pip_wheel/#cmdoption-no-deps
	--no-index                               reference/pip_wheel/#cmdoption-no-index
	--no-python-version-warning              reference/pip/#cmdoption-no-python-version-warning
	--no-setuptools                          installing/#cmdoption-no-setuptools
	--no-warn-conflicts                      reference/pip_install/#cmdoption-no-warn-conflicts
	--no-warn-script-location                reference/pip_install/#cmdoption-no-warn-script-location
	--no-wheel                               installing/#cmdoption-no-wheel
	--not-required                           reference/pip_list/#cmdoption-not-required
	--only-binary                            reference/pip_wheel/#cmdoption-only-binary
	--outdated                               reference/pip_list/#cmdoption-o
	--path                                   reference/pip_list/#cmdoption-path
	--platform                               reference/pip_install/#cmdoption-platform
	--pre                                    reference/pip_wheel/#cmdoption-pre
	--prefer-binary                          reference/pip_wheel/#cmdoption-prefer-binary
	--prefix                                 reference/pip_install/#cmdoption-prefix
	--progress-bar                           reference/pip_wheel/#cmdoption-progress-bar
	--proxy                                  reference/pip/#cmdoption-proxy
	--python-version                         reference/pip_install/#cmdoption-python-version
	--quiet                                  reference/pip/#cmdoption-q
	--require-hashes                         reference/pip_wheel/#cmdoption-require-hashes
	--requirement                            reference/pip_wheel/#cmdoption-r
	--retries                                reference/pip/#cmdoption-retries
	--root                                   reference/pip_install/#cmdoption-root
	--site                                   reference/pip_config/#cmdoption-site
	--src                                    reference/pip_wheel/#cmdoption-src
	--target                                 reference/pip_install/#cmdoption-t
	--timeout                                reference/pip/#cmdoption-timeout
	--trusted-host                           reference/pip/#cmdoption-trusted-host
	--upgrade                                reference/pip_install/#cmdoption-u
	--upgrade-strategy                       reference/pip_install/#cmdoption-upgrade-strategy
	--uptodate                               reference/pip_list/#cmdoption-u
	--use-pep517                             reference/pip_wheel/#cmdoption-use-pep517
	--user                                   reference/pip_list/#cmdoption-user
	--verbose                                reference/pip/#cmdoption-v
	--version                                reference/pip/#cmdoption-version
	--wheel-dir                              reference/pip_wheel/#cmdoption-w
	--yes                                    reference/pip_uninstall/#cmdoption-y
	-I                                       reference/pip_install/#cmdoption-i
	-U                                       reference/pip_install/#cmdoption-u
	-V                                       reference/pip/#cmdoption-version
	-a                                       reference/pip_hash/#cmdoption-a
	-b                                       reference/pip_wheel/#cmdoption-b
	-c                                       reference/pip_wheel/#cmdoption-c
	-d                                       reference/pip_download/#cmdoption-d
	-e                                       reference/pip_wheel/#cmdoption-e
	-f                                       reference/pip_wheel/#cmdoption-f
	-h                                       reference/pip/#cmdoption-h
	-i                                       reference/pip_wheel/#cmdoption-i
	-l                                       reference/pip_list/#cmdoption-l
	-o                                       reference/pip_list/#cmdoption-o
	-q                                       reference/pip/#cmdoption-q
	-r                                       reference/pip_wheel/#cmdoption-r
	-t                                       reference/pip_install/#cmdoption-t
	-u                                       reference/pip_list/#cmdoption-u
	-v                                       reference/pip/#cmdoption-v
	-w                                       reference/pip_wheel/#cmdoption-w
	-y                                       reference/pip_uninstall/#cmdoption-y
std:doc
	cookbook                                 Cookbook                                : cookbook/
	development/architecture/anatomy         Repository anatomy & directory structure: development/architecture/anatomy/
	development/architecture/index           Architecture of pip’s internals         : development/architecture/
	development/architecture/overview        Broad functionality overview            : development/architecture/overview/
	development/architecture/package-finding Finding and choosing files (index and PackageFinder): development/architecture/package-finding/
	development/ci                           Continuous Integration                  : development/ci/
	development/configuration                Configuration                           : development/configuration/
	development/contributing                 Contributing                            : development/contributing/
	development/getting-started              Getting Started                         : development/getting-started/
	development/index                        Development                             : development/
	development/issue-triage                 Issue Triage                            : development/issue-triage/
	development/release-process              Release process                         : development/release-process/
	development/vendoring-policy             Vendoring Policy                        : development/vendoring-policy/
	index                                    - The Python Package Installer          : pip
	installing                               Installation                            : installing/
	logic                                    Internal Details                        : logic/
	news                                     Release Notes                           : news/
	quickstart                               Quickstart                              : quickstart/
	reference/index                          Reference Guide                         : reference/
	reference/pip                            pip                                     : reference/pip/
	reference/pip_check                      pip check                               : reference/pip_check/
	reference/pip_config                     pip config                              : reference/pip_config/
	reference/pip_debug                      pip debug                               : reference/pip_debug/
	reference/pip_download                   pip download                            : reference/pip_download/
	reference/pip_freeze                     pip freeze                              : reference/pip_freeze/
	reference/pip_hash                       pip hash                                : reference/pip_hash/
	reference/pip_install                    pip install                             : reference/pip_install/
	reference/pip_list                       pip list                                : reference/pip_list/
	reference/pip_search                     pip search                              : reference/pip_search/
	reference/pip_show                       pip show                                : reference/pip_show/
	reference/pip_uninstall                  pip uninstall                           : reference/pip_uninstall/
	reference/pip_wheel                      pip wheel                               : reference/pip_wheel/
	usage                                    Usage                                   : usage/
	user_guide                               User Guide                              : user_guide/
std:label
	--cache-dir                              reference/pip/#cache-dir
	--cert                                   reference/pip/#cert
	--client-cert                            reference/pip/#client-cert
	--disable-pip-version-check              reference/pip/#disable-pip-version-check
	--exists-action                          reference/pip/#id3
	--help                                   reference/pip/#help
	--isolated                               reference/pip/#isolated
	--log                                    reference/pip/#log
	--no-cache-dir                           reference/pip/#no-cache-dir
	--no-color                               reference/pip/#no-color
	--no-python-version-warning              reference/pip/#no-python-version-warning
	--proxy                                  reference/pip/#proxy
	--quiet                                  reference/pip/#quiet
	--require-hashes                         reference/pip_install/#require-hashes
	--retries                                reference/pip/#retries
	--timeout                                reference/pip/#timeout
	--trusted-host                           reference/pip/#trusted-host
	--verbose                                reference/pip/#verbose
	--version                                reference/pip/#version
	best-candidate-result-class              The BestCandidateResult class           : development/architecture/package-finding/#best-candidate-result-class
	build-interface                          Build System Interface                  : reference/pip/#build-interface
	caching                                  Caching                                 : reference/pip_install/#caching
	candidate-evaluator-class                The CandidateEvaluator class            : development/architecture/package-finding/#candidate-evaluator-class
	candidate-preferences-class              The CandidatePreferences class          : development/architecture/package-finding/#candidate-preferences-class
	choosing-news-entry-type                 Choosing the type of NEWS entry         : development/contributing/#choosing-news-entry-type
	compatibility-requirements               Python and OS Compatibility             : installing/#compatibility-requirements
	config-file                              Config file                             : user_guide/#config-file
	config_--editor                          reference/pip_config/#config-editor
	config_--global                          reference/pip_config/#config-global
	config_--site                            reference/pip_config/#config-site
	config_--user                            reference/pip_config/#config-user
	configuration                            Configuration                           : user_guide/#configuration
	constraints files                        Constraints Files                       : user_guide/#constraints-files
	controlling-setup-requires               Controlling setup_requires              : reference/pip_install/#controlling-setup-requires
	debug_--abi                              reference/pip_debug/#debug-abi
	debug_--implementation                   reference/pip_debug/#debug-implementation
	debug_--platform                         reference/pip_debug/#debug-platform
	debug_--python-version                   reference/pip_debug/#debug-python-version
	download_--abi                           reference/pip_download/#download-abi
	download_--build                         reference/pip_download/#download-build
	download_--constraint                    reference/pip_download/#download-constraint
	download_--dest                          reference/pip_download/#download-dest
	download_--extra-index-url               reference/pip_download/#download-extra-index-url
	download_--find-links                    reference/pip_download/#download-find-links
	download_--global-option                 reference/pip_download/#download-global-option
	download_--implementation                reference/pip_download/#download-implementation
	download_--index-url                     reference/pip_download/#download-index-url
	download_--no-binary                     reference/pip_download/#download-no-binary
	download_--no-build-isolation            reference/pip_download/#download-no-build-isolation
	download_--no-clean                      reference/pip_download/#download-no-clean
	download_--no-deps                       reference/pip_download/#download-no-deps
	download_--no-index                      reference/pip_download/#download-no-index
	download_--only-binary                   reference/pip_download/#download-only-binary
	download_--platform                      reference/pip_download/#download-platform
	download_--pre                           reference/pip_download/#download-pre
	download_--prefer-binary                 reference/pip_download/#download-prefer-binary
	download_--progress-bar                  reference/pip_download/#download-progress-bar
	download_--python-version                reference/pip_download/#download-python-version
	download_--require-hashes                reference/pip_download/#download-require-hashes
	download_--requirement                   reference/pip_download/#download-requirement
	download_--src                           reference/pip_download/#download-src
	download_--use-pep517                    reference/pip_download/#download-use-pep517
	editable-installs                        “Editable” Installs                     : reference/pip_install/#editable-installs
	example requirements file                Example Requirements File               : reference/pip_install/#example-requirements-file
	exists-action                            --exists-action option                  : reference/pip/#exists-action
	filelogging                              File logging                            : reference/pip/#filelogging
	freeze_--all                             reference/pip_freeze/#freeze-all
	freeze_--exclude-editable                reference/pip_freeze/#freeze-exclude-editable
	freeze_--find-links                      reference/pip_freeze/#freeze-find-links
	freeze_--local                           reference/pip_freeze/#freeze-local
	freeze_--path                            reference/pip_freeze/#freeze-path
	freeze_--requirement                     reference/pip_freeze/#freeze-requirement
	freeze_--user                            reference/pip_freeze/#freeze-user
	general options                          General Options                         : reference/pip/#general-options
	genindex                                 Index                                   : genindex/
	get-pip                                  Installing with get-pip.py              : installing/#get-pip
	hash-checking mode                       Hash-Checking Mode                      : reference/pip_install/#hash-checking-mode
	hash_--algorithm                         reference/pip_hash/#hash-algorithm
	index-overview                           Overview                                : development/architecture/package-finding/#index-overview
	install_--abi                            reference/pip_install/#install-abi
	install_--build                          reference/pip_install/#install-build
	install_--compile                        reference/pip_install/#install-compile
	install_--constraint                     reference/pip_install/#install-constraint
	install_--editable                       reference/pip_install/#install-editable
	install_--extra-index-url                reference/pip_install/#install-extra-index-url
	install_--find-links                     reference/pip_install/#install-find-links
	install_--force-reinstall                reference/pip_install/#install-force-reinstall
	install_--global-option                  reference/pip_install/#install-global-option
	install_--ignore-installed               reference/pip_install/#install-ignore-installed
	install_--ignore-requires-python         reference/pip_install/#install-ignore-requires-python
	install_--implementation                 reference/pip_install/#install-implementation
	install_--index-url                      reference/pip_install/#install-index-url
	install_--install-option                 reference/pip_install/#install-install-option
	install_--no-binary                      reference/pip_install/#install-no-binary
	install_--no-build-isolation             reference/pip_install/#install-no-build-isolation
	install_--no-clean                       reference/pip_install/#install-no-clean
	install_--no-compile                     reference/pip_install/#install-no-compile
	install_--no-deps                        reference/pip_install/#install-no-deps
	install_--no-index                       reference/pip_install/#install-no-index
	install_--no-warn-conflicts              reference/pip_install/#install-no-warn-conflicts
	install_--no-warn-script-location        reference/pip_install/#install-no-warn-script-location
	install_--only-binary                    reference/pip_install/#install-only-binary
	install_--platform                       reference/pip_install/#install-platform
	install_--pre                            reference/pip_install/#install-pre
	install_--prefer-binary                  reference/pip_install/#install-prefer-binary
	install_--prefix                         reference/pip_install/#install-prefix
	install_--progress-bar                   reference/pip_install/#install-progress-bar
	install_--python-version                 reference/pip_install/#install-python-version
	install_--require-hashes                 reference/pip_install/#install-require-hashes
	install_--requirement                    reference/pip_install/#install-requirement
	install_--root                           reference/pip_install/#install-root
	install_--src                            reference/pip_install/#install-src
	install_--target                         reference/pip_install/#install-target
	install_--upgrade                        reference/pip_install/#install-upgrade
	install_--upgrade-strategy               reference/pip_install/#install-upgrade-strategy
	install_--use-pep517                     reference/pip_install/#install-use-pep517
	install_--user                           reference/pip_install/#install-user
	installation                             Installation                            : installing/#installation
	installation bundle                      Installation Bundles                    : user_guide/#installation-bundle
	installing from local packages           Installing from local packages          : user_guide/#installing-from-local-packages
	installing from wheels                   Installing from Wheels                  : user_guide/#installing-from-wheels
	link-collector-class                     The LinkCollector class                 : development/architecture/package-finding/#link-collector-class
	link-evaluator-class                     The LinkEvaluator class                 : development/architecture/package-finding/#link-evaluator-class
	list_--editable                          reference/pip_list/#list-editable
	list_--exclude-editable                  reference/pip_list/#list-exclude-editable
	list_--extra-index-url                   reference/pip_list/#list-extra-index-url
	list_--find-links                        reference/pip_list/#list-find-links
	list_--format                            reference/pip_list/#list-format
	list_--include-editable                  reference/pip_list/#list-include-editable
	list_--index-url                         reference/pip_list/#list-index-url
	list_--local                             reference/pip_list/#list-local
	list_--no-index                          reference/pip_list/#list-no-index
	list_--not-required                      reference/pip_list/#list-not-required
	list_--outdated                          reference/pip_list/#list-outdated
	list_--path                              reference/pip_list/#list-path
	list_--pre                               reference/pip_list/#list-pre
	list_--uptodate                          reference/pip_list/#list-uptodate
	list_--user                              reference/pip_list/#list-user
	logging                                  Logging                                 : reference/pip/#logging
	modindex                                 Module Index                            : py-modindex/
	package-finder-class                     The PackageFinder class                 : development/architecture/package-finding/#package-finder-class
	pep-518-limitations                      reference/pip/#pep-518-limitations
	per-requirement overrides                Per-requirement Overrides               : reference/pip_install/#per-requirement-overrides
	pip check                                reference/pip_check/#pip-check
	pip config                               reference/pip_config/#pip-config
	pip debug                                reference/pip_debug/#pip-debug
	pip download                             reference/pip_download/#pip-download
	pip freeze                               reference/pip_freeze/#pip-freeze
	pip hash                                 reference/pip_hash/#pip-hash
	pip install                              reference/pip_install/#pip-install
	pip install examples                     Examples                                : reference/pip_install/#pip-install-examples
	pip install options                      Options                                 : reference/pip_install/#pip-install-options
	pip list                                 reference/pip_list/#pip-list
	pip search                               reference/pip_search/#pip-search
	pip show                                 reference/pip_show/#pip-show
	pip uninstall                            reference/pip_uninstall/#pip-uninstall
	pip wheel                                reference/pip_wheel/#pip-wheel
	pre release versions                     Pre-release Versions                    : reference/pip_install/#pre-release-versions
	repeatability                            Ensuring Repeatability                  : user_guide/#repeatability
	requirement specifiers                   Requirement Specifiers                  : reference/pip_install/#requirement-specifiers
	requirements file format                 Requirements File Format                : reference/pip_install/#requirements-file-format
	requirements files                       Requirements Files                      : user_guide/#requirements-files
	search                                   Search Page                             : search/
	search_--index                           reference/pip_search/#search-index
	show_--files                             reference/pip_show/#show-files
	ssl certificate verification             SSL Certificate Verification            : reference/pip_install/#ssl-certificate-verification
	uninstall_--requirement                  reference/pip_uninstall/#uninstall-requirement
	uninstall_--yes                          reference/pip_uninstall/#uninstall-yes
	upgrading pip                            Upgrading pip                           : installing/#upgrading-pip
	using environment variables              Using Environment Variables             : reference/pip_install/#using-environment-variables
	using pip from your program              Using pip from your program             : user_guide/#using-pip-from-your-program
	vcs support                              VCS Support                             : reference/pip_install/#vcs-support
	wheel cache                              Wheel Cache                             : reference/pip_install/#wheel-cache
	wheel_--build                            reference/pip_wheel/#wheel-build
	wheel_--build-option                     reference/pip_wheel/#wheel-build-option
	wheel_--constraint                       reference/pip_wheel/#wheel-constraint
	wheel_--editable                         reference/pip_wheel/#wheel-editable
	wheel_--extra-index-url                  reference/pip_wheel/#wheel-extra-index-url
	wheel_--find-links                       reference/pip_wheel/#wheel-find-links
	wheel_--global-option                    reference/pip_wheel/#wheel-global-option
	wheel_--ignore-requires-python           reference/pip_wheel/#wheel-ignore-requires-python
	wheel_--index-url                        reference/pip_wheel/#wheel-index-url
	wheel_--no-binary                        reference/pip_wheel/#wheel-no-binary
	wheel_--no-build-isolation               reference/pip_wheel/#wheel-no-build-isolation
	wheel_--no-clean                         reference/pip_wheel/#wheel-no-clean
	wheel_--no-deps                          reference/pip_wheel/#wheel-no-deps
	wheel_--no-index                         reference/pip_wheel/#wheel-no-index
	wheel_--only-binary                      reference/pip_wheel/#wheel-only-binary
	wheel_--pre                              reference/pip_wheel/#wheel-pre
	wheel_--prefer-binary                    reference/pip_wheel/#wheel-prefer-binary
	wheel_--progress-bar                     reference/pip_wheel/#wheel-progress-bar
	wheel_--require-hashes                   reference/pip_wheel/#wheel-require-hashes
	wheel_--requirement                      reference/pip_wheel/#wheel-requirement
	wheel_--src                              reference/pip_wheel/#wheel-src
	wheel_--use-pep517                       reference/pip_wheel/#wheel-use-pep517
	wheel_--wheel-dir                        reference/pip_wheel/#wheel-wheel-dir

There's simply no reference called "index" in this docs set. Also, I think I faced with bugs in intersphinx before, like the one mentioned @ https://my-favorite-documentation-test.readthedocs.io/en/latest/using_intersphinx.html#linking-to-another-c-project — sphinx doesn't properly match the ref name:

Using a single : does not appear to work, but using the namespace::ClassName seems to include a leading :. I think this is a bug, but solving it would likely be treacherous so instead just control the title yourself.

Also, the official doc http://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html uses :ref: role in the example:

[...] you can even force lookup in a foreign set by prefixing the link target appropriately. A link like :ref:comparison manual <python:comparisons> will then link to the label “comparisons” in the doc set “python”, if it exists.

Fun fact: Sphinx's own docs don't use intersphinx. So w/o such dogfooding not many people work on it (at least, it appears so).

P.S. @hoefling you shouldn't be linking against non-existing names. Try using something that exists. Maybe add a ref to pip docs with this name if needed. Also, I have a strong feeling that this has to be reported to Sphinx as an undefined behavior bug.

@webknjaz
Copy link
Member

webknjaz commented Feb 4, 2020

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
	[...]

@webknjaz
Copy link
Member

webknjaz commented Feb 4, 2020

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.

@webknjaz
Copy link
Member

webknjaz commented Feb 4, 2020

Action items:

  1. Check the reproducer against some std:doc ref in https://docs.python.org/3/
  2. Once the same issue is visible, file a bug here: https://github.com/sphinx-doc/sphinx/issues/new?assignees=&labels=bug&template=bug_report.md&title=%3Cwhat+happen+when+you+do+on+which+document+project%3E

@pradyunsg
Copy link
Member

I think we're hitting some very weird bug here.


On master:

$ tox -e docs
$ python -m sphinx.ext.intersphinx ./docs/build/html/objects.inv | grep index
113:	index                                    pip - The Python Package Installer      : index.html

Changing the heading on index.rst to pip:

$ tox -e docs
$ python -m sphinx.ext.intersphinx ./docs/build/html/objects.inv | grep index
113:	index                                    pip                                     : index.html

For https://pip.pypa.io/en/latest/objects.inv:

$ python -m sphinx.ext.intersphinx ... | grep index
113:	index                                    - The Python Package Installer          : pip

@pradyunsg
Copy link
Member

The relevant code in Sphinx does say something about handling-of-spaces in intersphinx loading.

https://github.com/sphinx-doc/sphinx/blob/46897c2acf1f2056dff479ec705e2899d86118c6/sphinx/util/inventory.py#L125

@webknjaz
Copy link
Member

webknjaz commented Feb 4, 2020

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.
Plus I was never able to reference a :doc: role from a specific intersphinx site explicitly while the same worked for normal refs so it's inconsistent.

@pradyunsg
Copy link
Member

pradyunsg commented Feb 4, 2020

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.
$ tox -e docs
$ python -m sphinx.ext.intersphinx ./docs/build/html/objects.inv | grep index
	index                                    - The Python Package Installer          : pip

@webknjaz
Copy link
Member

webknjaz commented Feb 4, 2020

@pradyunsg can you explain why?

Also, another quickfix would be putting there something like

.. _`pip-index-docs-page`:

@webknjaz
Copy link
Member

webknjaz commented Feb 4, 2020

I mean, they say that the difference is minimal: readthedocs/readthedocs.org#233 (comment)

@pradyunsg
Copy link
Member

can you explain why?

🤷‍♂

This is definitely a sphinx bug, likely, in writing intersphinx files.

Adding a print(repr(line), m.groups(), sep="\n") here gives me output containing:

'index std:doc -1  The Python Package Installer'
('index', 'std:doc', '-1', 'The', 'Python Package Installer')

@webknjaz
Copy link
Member

webknjaz commented Feb 4, 2020

Or in parsing...

There used to be a special case for std:doc which is not there anymore: https://github.com/sphinx-doc/sphinx/blob/v1.5.6/sphinx/ext/intersphinx.py#L313-L315

@webknjaz
Copy link
Member

webknjaz commented Feb 4, 2020

@pradyunsg
Copy link
Member

pradyunsg commented Feb 4, 2020

Well, I stand corrected -- the issue seems to be in their .inv file format. Looking at the writing code, I added the following here:

                    print(repr(entry))
                    print([name, domainname, typ, prio, uri, dispname])

Comparing the line for 'index' with others, we have:

'genindex std:label -1 genindex/ Index\n'
['genindex', 'std', 'label', -1, 'genindex/', i'Index']

and

'index std:doc -1  The Python Package Installer\n'
['index', 'std', 'doc', -1, '', 'The Python Package Installer']

Notice how the latter has a '' for uri. This originates from https://github.com/sphinx-doc/sphinx/blob/master/sphinx/builders/dirhtml.py#L33. That's not being parsed correctly as we can see from the output noted above, because the loading/parsing regex isn't crafted to handle that.


As I'd expected when I started looking into this, the issue is with the regex being used during loading.

@pradyunsg
Copy link
Member

Basically, dirhtml + intersphinx seems to be broken in Sphinx.

@webknjaz
Copy link
Member

webknjaz commented Feb 4, 2020

</sherlock_mode>

I guess you're the best person to write down the details for the sphinx tracker now.

@webknjaz
Copy link
Member

webknjaz commented Feb 4, 2020

I guess the workaround would be if not uri: uri = '#'

@pradyunsg
Copy link
Member

</sherlock_mode>

Hehe.

I guess the workaround would be

Something like that, or:

  • stop returning "" as the uri for index in dirhtml's builder.
  • update regex to use \s+? instead of \s+ and allow for the uri part to be empty.
(?x)(.+?)\s+?(\S*:\S*)\s+?(-?\d+)\s+?(\S*)\s+?(.*)

@pradyunsg pradyunsg added the state: blocked Can not be done until something else is done label Feb 4, 2020
@webknjaz
Copy link
Member

#7720: fix?

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Apr 2, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation state: blocked Can not be done until something else is done type: bug A confirmed bug or unintended behavior type: docs Documentation related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants