Skip to content

:std:event: role is mentioned in the intersphinx database but not exposed in Sphinx runtime #8987

@webknjaz

Description

@webknjaz

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 = True

to 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 . _build

will 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions