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

docs: conflict between sphinx-2.1, sphinxcontrib-asyncio #2673

Merged
merged 4 commits into from
Jun 9, 2019

Conversation

ploxiln
Copy link
Contributor

@ploxiln ploxiln commented Jun 8, 2019

Two ways to do this: downgrade sphinx, or get rid of sphinxcontrib-asyncio. I'll push up commits for both.


example docs build error:

.../tornado/tornado/auth.py:docstring of tornado.auth.OpenIdMixin.get_authenticated_user:1:Error in "py:comethod" directive:
unknown option: "async".

.. py:comethod:: OpenIdMixin.get_authenticated_user(http_client: tornado.httpclient.AsyncHTTPClient = None) -> Dict[str, Any]
   :module: tornado.auth
   :async:

   Fetches the authenticated user data upon redirect.
   ...

where does that stuff come from? let's see:

$ ag comethod
venv/lib/python3.6/site-packages/sphinxcontrib/asyncio.py
100:class CoMethodDocumenter(MethodDocumenter):
104:    objtype = "comethod"
125:        self.directivetype = "comethod"
149:    app.add_directive_to_domain('py', 'comethod', PyCoroutineMethod)
152:    app.add_autodocumenter(CoMethodDocumenter)
(venv) [pierce@plo-mbp15 tornado]$ ag :async:
venv/lib/python3.6/site-packages/sphinx/ext/autodoc/__init__.py
1060:            self.add_line('   :async:', sourcename)
1362:            self.add_line('   :async:', sourcename)

sphinx 2.1 adds an ":async:" option for py:method:: and py:function::
and it does not seem to interact well with sphinxcontrib-asyncio
@ploxiln ploxiln changed the title docs: fix conflict between sphinx-2.1 and sphinxcontrib-asyncio docs: conflict between sphinx-2.1, sphinxcontrib-asyncio Jun 8, 2019
ploxiln added 2 commits June 8, 2019 15:02
no longer needed since Sphinx-2.1 (and effectively conflicts with it)
@ploxiln
Copy link
Contributor Author

ploxiln commented Jun 8, 2019

actually, latest sphinx has another issue:

Warning, treated as error:
<unknown>:1:py:class reference target not found: builtins.bytes

(letting it continue to show all such warnings:)

<unknown>:1: WARNING: py:class reference target not found: builtins.bytes
<unknown>:1: WARNING: py:class reference target not found: builtins.str
<unknown>:1: WARNING: py:class reference target not found: builtins.str

seems to be due to a bunch of asyncio.exceptions.CancelledError
Copy link
Member

@bdarnell bdarnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

The issues with both sphinx 2.1 and python 3.8 need to be investigated, but shouldn't block our CI in the meantime.

@bdarnell bdarnell merged commit b8fbac3 into tornadoweb:master Jun 9, 2019
@bdarnell
Copy link
Member

bdarnell commented Jun 9, 2019

Filed #2677 and #2676 to track the leftover work.

@ploxiln ploxiln deleted the docs_build_quickfix branch September 12, 2019 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants