-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Can't make intersphinx work #3714
Comments
Changing the docstring to
does not fix the problem. |
That's strange because other libraries use aiohttp inventory file without any problem. |
@crusaderky $ python -m sphinx.ext.intersphinx https://docs.aiohttp.org/en/latest/objects.inv | grep aiohttp.web.HTTPNotFound
aiohttp.web.HTTPNotFound web_exceptions.html#aiohttp.web.HTTPNotFound
$ python -m sphinx.ext.intersphinx https://docs.aiohttp.org/en/stable/objects.inv | grep aiohttp.web.HTTPNotFound |
@webknjaz Thanks, the workaround fixes the exceptions; however it does not help for the errors about inheritance documentation generated by |
I don't see any of those in the log you've submitted. |
@webknjaz I'm referring to these two messages:
|
You can use this command to identify which references exist: $ python -m sphinx.ext.intersphinx https://docs.aiohttp.org/en/latest/objects.inv | grep aiohttp.web.Response
aiohttp.web.Response.body web_reference.html#aiohttp.web.Response.body
aiohttp.web.Response.text web_reference.html#aiohttp.web.Response.text
aiohttp.web.Response web_reference.html#aiohttp.web.Response
$ python -m sphinx.ext.intersphinx https://docs.aiohttp.org/en/latest/objects.inv | grep aiohttp.web_response.Response |
@webknjaz Yes I know - but please see my code.py above. I never refer to aiohttp.web_response.Response explicitly. Sphinx does that by itself when trying to document the parent class because I gave it the |
IMHO sphinx has no inheritance information directive for python domain. |
Yep, sphinx only documents what you let it document. Apparently, we don't generate the complete module index: https://docs.aiohttp.org/en/latest/py-modindex.html / https://docs.aiohttp.org/en/stable/py-modindex.html. It is possible to make sphinx generate that though and it'd look like https://docs.octomachinery.dev/en/latest/py-modindex.html. |
The problem is not inheritance (Sphinx has determined that from |
I'm failing to reproduce the problem in my test project: public.py:
impl.py:
I can't figure out why instead in the aiohttp objects.inv I only get the public version. |
It's because you autogenerate docs for all modules. |
I found an alternative that doesn't require polluting the index with private objects: public.py:
|
Adding the below to conf.py successfully works around the issue. IMHO it should be placed in the public modules of aiohttp instead.
|
Yeah, I think it's a good idea to enable autodocs on more things just so it'd be possible to reference them. |
In my
conf.py
I have:code.rst
:code.py
:When I build sphinx, I get:
Intersphinx works fine for all other modules in the project.
I'm running Python 3.7, Sphinx 2.0.1, and aiohttp 3.5.4.
The text was updated successfully, but these errors were encountered: