-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the bug
The HTML-table version of the Sphinx's own objects.inv can be found at: https://webknjaz.github.io/intersphinx-untangled/www.sphinx-doc.org/
As you can see, there is this section for "std:event" suggesting that the exposed identifiers are usable with this role but they are not.
Sphinx says that it's an unknown interpreted role:
......py:docstring of sphinxcontrib.towncrier.TowncrierDraftEntriesEnvironmentCollector:12: WARNING: Unknown interpreted text role "std:event".But how does this work in Sphinx's own docs, then?
I tried to do some digging and it is hard to figure out why this works but my archaeological attempts lead me to https://github.com/sphinx-doc/sphinx/blob/f7768d8/doc/conf.py#L163-L166 which is probably how this is implemented (and it would explain why pip installed sphinx knows nothing about :event:).
To Reproduce
Add
extensions = ['sphinx.ext.intersphinx']
intersphinx_mapping = {
'python': ('https://www.sphinx-doc.org/en/master', None),
}
nitpicky = Trueto conf.py.
And add something like
:event:`env-get-outdated`to index.rst.
Building this with
$ rm -rf _build; python -m sphinx -W --keep-going -a . _buildwill cause warnings saying WARNING: Unknown interpreted text role "std:event".
Expected behavior
It should be possible to add https://www.sphinx-doc.org/en/master to intersphinx_mapping to conf.py and then use the :event: role to point to Sphinx's docs.
Your project
N/A
Screenshots
N/A
Environment info
- OS: Gentoo Linux (seems irrelevant, though)
- Python version: 3.9.0
- Sphinx version: 3.x
- Sphinx extensions:
sphinx.ext.intersphinx - Extra tools: N/A
Additional context
- This seems to have been added in 2b0e015#diff-e170e9a7d787c21095c6c11bb25f0f1ff0294a42a46d45ba6fb5ed794e457624R186