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

autosummary emits broken links if primary_domain is not py #9630

Closed
astrojuanlu opened this issue Sep 13, 2021 · 0 comments
Closed

autosummary emits broken links if primary_domain is not py #9630

astrojuanlu opened this issue Sep 13, 2021 · 0 comments

Comments

@astrojuanlu
Copy link
Contributor

Describe the bug

autosummary expects the primary_domain to be py. Otherwise, it gives warnings like these:

WARNING: Unknown interpreted text role "obj".

for each .. autosummary:: directive.

In the HTML documentation there are broken links with the text

:obj:`get_random_ingredients <lumache.get_random_ingredients>`
:obj:`InvalidKindError <lumache.InvalidKindError>`
:obj:`lumache <lumache>`

for every .. autosummary:: directive.

How to Reproduce

(TBC)

Expected behavior

I would expect autosummary to work regardless of the primary_domain configuration.

Your project

(TBC)

Screenshots

Screenshot 2021-09-13 at 13-03-32 lumache - Lumache 0 1 documentation

OS

Linux

Python version

3.9.7

Sphinx version

4.2.0 and earlier

Sphinx extensions

No response

Extra tools

No response

Additional context

This was originally reported in #2001, but it was not sufficiently well described and was perhaps prematurely closed.

@tk0miya tk0miya added this to the 4.3.0 milestone Sep 14, 2021
tk0miya added a commit to tk0miya/sphinx that referenced this issue Sep 14, 2021
… is not 'py'

Autodoc generates reST code that uses raw `:obj:` and `:class:` xrefs to
refer the classes and types.  But they're fragile because they assume
the primary_domain=='py'.  This adds `:py:` prefix to these xrefs to
make thme robust.
tk0miya added a commit to tk0miya/sphinx that referenced this issue Sep 14, 2021
…imary_domain is not 'py'

Autosummary generates reST code that uses raw `:obj:` xrefs to refer
the python objects in the summary table.  But they're fragile because
they assume the primary_domain=='py'.  This adds `:py:` prefix to
these xrefs to make thme robust.
tk0miya added a commit to tk0miya/sphinx that referenced this issue Sep 14, 2021
…imary_domain is not 'py'

Autosummary generates reST code that uses raw `:obj:` xrefs to refer
the python objects in the summary table.  But they're fragile because
they assume the primary_domain=='py'.

This adds `:py:` prefix to these xrefs to make them robust.
tk0miya added a commit that referenced this issue Sep 17, 2021
Fix #9630: autosummary: Failed to build summary table if primary_domain is not 'py'
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants