Skip to content

Commit

Permalink
Remove sphinxcontrib-asyncio (#7439)
Browse files Browse the repository at this point in the history
I don't this is needed anymore, and may be causing issues with newer
sphinx releases.
  • Loading branch information
Dreamsorcerer committed Jul 27, 2023
1 parent d62361c commit c6217be
Show file tree
Hide file tree
Showing 9 changed files with 222 additions and 142 deletions.
9 changes: 6 additions & 3 deletions docs/abc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ Not Allowed*. :meth:`aiohttp.abc.AbstractMatchInfo.handler` raises
*router* parameter and returns as
:attr:`aiohttp.web.Application.router`.

.. coroutinemethod:: resolve(request)
.. method:: resolve(request)
:async:

Performs URL resolving. It's an abstract method, should be
overridden in *router* implementation.
Expand All @@ -61,7 +62,8 @@ Not Allowed*. :meth:`aiohttp.abc.AbstractMatchInfo.handler` raises
:exc:`aiohttp.web.HTTPException` if no match was found, ``None``
otherwise.

.. coroutinemethod:: handler(request)
.. method:: handler(request)
:async:

Abstract method performing :term:`web-handler` processing.

Expand All @@ -73,7 +75,8 @@ Not Allowed*. :meth:`aiohttp.abc.AbstractMatchInfo.handler` raises

:raise: :class:`aiohttp.web.HTTPException` on error

.. coroutinemethod:: expect_handler(request)
.. method:: expect_handler(request)
:async:

Abstract method for handling *100-continue* processing.

Expand Down
122 changes: 66 additions & 56 deletions docs/client_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ The client session supports the context manager protocol for self closing.

.. versionadded:: 3.7

.. comethod:: request(method, url, *, params=None, data=None, json=None,\
.. method:: request(method, url, *, params=None, data=None, json=None,\
cookies=None, headers=None, skip_auto_headers=None, \
auth=None, allow_redirects=True,\
max_redirects=10,\
Expand All @@ -348,11 +348,11 @@ The client session supports the context manager protocol for self closing.
verify_ssl=None, fingerprint=None, \
ssl_context=None, proxy_headers=None, \
auto_decompress=None)
:async-with:
:coroutine:
:async:
:noindexentry:

Performs an asynchronous HTTP request. Returns a response object.
Performs an asynchronous HTTP request. Returns a response object that
should be used as an async context manager.

:param str method: HTTP method

Expand Down Expand Up @@ -528,11 +528,10 @@ The client session supports the context manager protocol for self closing.
:return ClientResponse: a :class:`client response <ClientResponse>`
object.

.. comethod:: get(url, *, allow_redirects=True, **kwargs)
:async-with:
:coroutine:
.. method:: get(url, *, allow_redirects=True, **kwargs)
:async:

Perform a ``GET`` request.
Perform a ``GET`` request. Returns an async context manager.

In order to modify inner
:meth:`request<aiohttp.ClientSession.request>`
Expand All @@ -546,11 +545,10 @@ The client session supports the context manager protocol for self closing.
:return ClientResponse: a :class:`client response
<ClientResponse>` object.

.. comethod:: post(url, *, data=None, **kwargs)
:async-with:
:coroutine:
.. method:: post(url, *, data=None, **kwargs)
:async:

Perform a ``POST`` request.
Perform a ``POST`` request. Returns an async context manager.

In order to modify inner
:meth:`request<aiohttp.ClientSession.request>`
Expand All @@ -566,11 +564,10 @@ The client session supports the context manager protocol for self closing.
:return ClientResponse: a :class:`client response
<ClientResponse>` object.

.. comethod:: put(url, *, data=None, **kwargs)
:async-with:
:coroutine:
.. method:: put(url, *, data=None, **kwargs)
:async:

Perform a ``PUT`` request.
Perform a ``PUT`` request. Returns an async context manager.

In order to modify inner
:meth:`request<aiohttp.ClientSession.request>`
Expand All @@ -586,11 +583,10 @@ The client session supports the context manager protocol for self closing.
:return ClientResponse: a :class:`client response
<ClientResponse>` object.

.. comethod:: delete(url, **kwargs)
:async-with:
:coroutine:
.. method:: delete(url, **kwargs)
:async:

Perform a ``DELETE`` request.
Perform a ``DELETE`` request. Returns an async context manager.

In order to modify inner
:meth:`request<aiohttp.ClientSession.request>`
Expand All @@ -601,11 +597,10 @@ The client session supports the context manager protocol for self closing.
:return ClientResponse: a :class:`client response
<ClientResponse>` object.

.. comethod:: head(url, *, allow_redirects=False, **kwargs)
:async-with:
:coroutine:
.. method:: head(url, *, allow_redirects=False, **kwargs)
:async:

Perform a ``HEAD`` request.
Perform a ``HEAD`` request. Returns an async context manager.

In order to modify inner
:meth:`request<aiohttp.ClientSession.request>`
Expand All @@ -619,11 +614,10 @@ The client session supports the context manager protocol for self closing.
:return ClientResponse: a :class:`client response
<ClientResponse>` object.

.. comethod:: options(url, *, allow_redirects=True, **kwargs)
:async-with:
:coroutine:
.. method:: options(url, *, allow_redirects=True, **kwargs)
:async:

Perform an ``OPTIONS`` request.
Perform an ``OPTIONS`` request. Returns an async context manager.

In order to modify inner
:meth:`request<aiohttp.ClientSession.request>`
Expand All @@ -638,11 +632,10 @@ The client session supports the context manager protocol for self closing.
:return ClientResponse: a :class:`client response
<ClientResponse>` object.

.. comethod:: patch(url, *, data=None, **kwargs)
:async-with:
:coroutine:
.. method:: patch(url, *, data=None, **kwargs)
:async:

Perform a ``PATCH`` request.
Perform a ``PATCH`` request. Returns an async context manager.

In order to modify inner
:meth:`request<aiohttp.ClientSession.request>`
Expand All @@ -657,7 +650,7 @@ The client session supports the context manager protocol for self closing.
:return ClientResponse: a :class:`client response
<ClientResponse>` object.

.. comethod:: ws_connect(url, *, method='GET', \
.. method:: ws_connect(url, *, method='GET', \
protocols=(), timeout=10.0,\
receive_timeout=None,\
auth=None,\
Expand All @@ -671,11 +664,10 @@ The client session supports the context manager protocol for self closing.
verify_ssl=None, fingerprint=None, \
ssl_context=None, proxy_headers=None, \
compress=0, max_msg_size=4194304)
:async-with:
:coroutine:
:async:

Create a websocket connection. Returns a
:class:`ClientWebSocketResponse` object.
:class:`ClientWebSocketResponse` async context manager object.

:param url: Websocket server url, :class:`~yarl.URL` or :class:`str` that
will be encoded with :class:`~yarl.URL` (see :class:`~yarl.URL`
Expand Down Expand Up @@ -802,7 +794,8 @@ The client session supports the context manager protocol for self closing.
.. versionadded:: 3.5


.. comethod:: close()
.. method:: close()
:async:

Close underlying connector.

Expand All @@ -827,7 +820,7 @@ keepaliving, cookies and complex connection stuff like properly configured SSL
certification chaining.


.. cofunction:: request(method, url, *, params=None, data=None, \
.. function:: request(method, url, *, params=None, data=None, \
json=None,\
headers=None, cookies=None, auth=None, \
allow_redirects=True, max_redirects=10, \
Expand All @@ -837,10 +830,11 @@ certification chaining.
read_bufsize=None, \
connector=None, loop=None,\
read_until_eof=True, timeout=sentinel)
:async-with:
:async:

Asynchronous context manager for performing an asynchronous HTTP
request. Returns a :class:`ClientResponse` response object.
request. Returns a :class:`ClientResponse` response object. Use as
an async context manager.

:param str method: HTTP method

Expand Down Expand Up @@ -1012,11 +1006,13 @@ BaseConnector

Read-only property.

.. comethod:: close()
.. method:: close()
:async:

Close all opened connections.

.. comethod:: connect(request)
.. method:: connect(request)
:async:

Get a free connection from pool or create new one if connection
is absent in the pool.
Expand All @@ -1030,7 +1026,8 @@ BaseConnector

:return: :class:`Connection` object.

.. comethod:: _create_connection(req)
.. method:: _create_connection(req)
:async:

Abstract method for actual connection establishing, should be
overridden in subclasses.
Expand Down Expand Up @@ -1381,7 +1378,8 @@ Response object

For :term:`keep-alive` support see :meth:`release`.

.. comethod:: read()
.. method:: read()
:async:

Read the whole response's body as :class:`bytes`.

Expand Down Expand Up @@ -1409,7 +1407,8 @@ Response object

Do nothing for success responses (less than 400).

.. comethod:: text(encoding=None)
.. method:: text(encoding=None)
:async:

Read response's body and return decoded :class:`str` using
specified *encoding* parameter.
Expand Down Expand Up @@ -1444,8 +1443,9 @@ Response object

await resp.text('ISO-8859-1')

.. comethod:: json(*, encoding=None, loads=json.loads, \
.. method:: json(*, encoding=None, loads=json.loads, \
content_type='application/json')
:async:

Read response's body as *JSON*, return :class:`dict` using
specified *encoding* and *loader*. If data is not still available
Expand Down Expand Up @@ -1534,7 +1534,8 @@ manually.

Returns exception if any occurs or returns None.

.. comethod:: ping(message=b'')
.. method:: ping(message=b'')
:async:

Send :const:`~aiohttp.WSMsgType.PING` to peer.

Expand All @@ -1546,7 +1547,8 @@ manually.

The method is converted into :term:`coroutine`

.. comethod:: pong(message=b'')
.. method:: pong(message=b'')
:async:

Send :const:`~aiohttp.WSMsgType.PONG` to peer.

Expand All @@ -1558,7 +1560,8 @@ manually.

The method is converted into :term:`coroutine`

.. comethod:: send_str(data, compress=None)
.. method:: send_str(data, compress=None)
:async:

Send *data* to peer as :const:`~aiohttp.WSMsgType.TEXT` message.

Expand All @@ -1575,7 +1578,8 @@ manually.
The method is converted into :term:`coroutine`,
*compress* parameter added.

.. comethod:: send_bytes(data, compress=None)
.. method:: send_bytes(data, compress=None)
:async:

Send *data* to peer as :const:`~aiohttp.WSMsgType.BINARY` message.

Expand All @@ -1593,7 +1597,8 @@ manually.
The method is converted into :term:`coroutine`,
*compress* parameter added.

.. comethod:: send_json(data, compress=None, *, dumps=json.dumps)
.. method:: send_json(data, compress=None, *, dumps=json.dumps)
:async:

Send *data* to peer as JSON string.

Expand All @@ -1619,7 +1624,8 @@ manually.
The method is converted into :term:`coroutine`,
*compress* parameter added.

.. comethod:: close(*, code=WSCloseCode.OK, message=b'')
.. method:: close(*, code=WSCloseCode.OK, message=b'')
:async:

A :ref:`coroutine<coroutine>` that initiates closing handshake by sending
:const:`~aiohttp.WSMsgType.CLOSE` message. It waits for
Expand All @@ -1631,7 +1637,8 @@ manually.
:param message: optional payload of *close* message,
:class:`str` (converted to *UTF-8* encoded bytes) or :class:`bytes`.

.. comethod:: receive()
.. method:: receive()
:async:

A :ref:`coroutine<coroutine>` that waits upcoming *data*
message from peer and returns it.
Expand All @@ -1646,7 +1653,8 @@ manually.

:return: :class:`~aiohttp.WSMessage`

.. coroutinemethod:: receive_str()
.. method:: receive_str()
:async:

A :ref:`coroutine<coroutine>` that calls :meth:`receive` but
also asserts the message type is
Expand All @@ -1656,7 +1664,8 @@ manually.

:raise TypeError: if message is :const:`~aiohttp.WSMsgType.BINARY`.

.. coroutinemethod:: receive_bytes()
.. method:: receive_bytes()
:async:

A :ref:`coroutine<coroutine>` that calls :meth:`receive` but
also asserts the message type is
Expand All @@ -1666,7 +1675,8 @@ manually.

:raise TypeError: if message is :const:`~aiohttp.WSMsgType.TEXT`.

.. coroutinemethod:: receive_json(*, loads=json.loads)
.. method:: receive_json(*, loads=json.loads)
:async:

A :ref:`coroutine<coroutine>` that calls :meth:`receive_str` and loads
the JSON string to a Python dict.
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
# Third-party extensions:
"sphinxcontrib.asyncio",
"sphinxcontrib.blockdiag",
"sphinxcontrib.towncrier", # provides `towncrier-draft-entries` directive
]
Expand Down
Loading

0 comments on commit c6217be

Please sign in to comment.