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

Remove sphinxcontrib-asyncio (#7439) #7440

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
125 changes: 68 additions & 57 deletions docs/client_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,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 @@ -364,11 +364,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 @@ -544,11 +544,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 @@ -562,11 +561,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 @@ -582,11 +580,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 @@ -602,11 +599,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 @@ -617,11 +613,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 @@ -635,11 +630,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 @@ -654,11 +648,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 @@ -673,7 +666,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 @@ -687,11 +680,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 @@ -818,7 +810,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 @@ -843,7 +836,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 @@ -853,10 +846,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 @@ -1028,11 +1022,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 @@ -1046,7 +1042,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 @@ -1397,7 +1394,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 All @@ -1411,7 +1409,8 @@ Response object

.. seealso:: :meth:`close`, :meth:`release`.

.. comethod:: release()
.. method:: release()
:async:

It is not required to call `release` on the response
object. When the client fully receives the payload, the
Expand All @@ -1425,7 +1424,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 @@ -1460,8 +1460,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 @@ -1550,7 +1551,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 @@ -1562,7 +1564,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 @@ -1574,7 +1577,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 @@ -1591,7 +1595,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 @@ -1609,7 +1614,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 @@ -1635,7 +1641,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 @@ -1647,7 +1654,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 @@ -1662,7 +1670,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 @@ -1672,7 +1681,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 @@ -1682,7 +1692,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 @@ -52,7 +52,6 @@
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
# Third-party extensions:
"sphinxcontrib.asyncio",
"sphinxcontrib.blockdiag",
"sphinxcontrib.towncrier", # provides `towncrier-draft-entries` directive
]
Expand Down
Loading
Loading