From 2e25d385cb610023243f25ae1dfa5082e2746a88 Mon Sep 17 00:00:00 2001 From: "patchback[bot]" <45432694+patchback[bot]@users.noreply.github.com> Date: Tue, 25 May 2021 08:31:19 +0200 Subject: [PATCH] Fix broken references in `docs/client_reference.rst` (#5620) (#5734) Co-authored-by: Sviatoslav Sydorenko (cherry picked from commit ff9c117083d3d82d257dfad6242d7a5ac821f241) Co-authored-by: Olexiy Pohorely <52452803+l1storez@users.noreply.github.com> --- docs/client_reference.rst | 60 +++++++++++++++++++-------------------- docs/conf.py | 9 ++++++ 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/docs/client_reference.rst b/docs/client_reference.rst index 90dddf494e2..13697a3a718 100644 --- a/docs/client_reference.rst +++ b/docs/client_reference.rst @@ -88,14 +88,14 @@ The client session supports the context manager protocol for self closing. that generation. Note that ``Content-Length`` autogeneration can't be skipped. - Iterable of :class:`str` or :class:`~aiohttp.istr` (optional) + Iterable of :class:`str` or :class:`~multidict.istr` (optional) :param aiohttp.BasicAuth auth: an object that represents HTTP Basic Authorization (optional) :param version: supported HTTP version, ``HTTP 1.1`` by default. - :param cookie_jar: Cookie Jar, :class:`AbstractCookieJar` instance. + :param cookie_jar: Cookie Jar, :class:`~aiohttp.abc.AbstractCookieJar` instance. By default every session instance has own private cookie jar for automatic cookies processing but user may redefine this behavior @@ -108,7 +108,7 @@ The client session supports the context manager protocol for self closing. :class:`aiohttp.DummyCookieJar` instance can be provided. - :param callable json_serialize: Json *serializer* callable. + :param collections.abc.Callable json_serialize: Json *serializer* callable. By default :func:`json.dumps` function. @@ -210,7 +210,7 @@ The client session supports the context manager protocol for self closing. .. attribute:: cookie_jar - The session cookies, :class:`~aiohttp.AbstractCookieJar` instance. + The session cookies, :class:`~aiohttp.abc.AbstractCookieJar` instance. Gives access to cookie jar's content and modifiers. @@ -261,7 +261,7 @@ The client session supports the context manager protocol for self closing. Set of headers for which autogeneration skipped. - :class:`frozenset` of :class:`str` or :class:`~aiohttp.istr` (optional) + :class:`frozenset` of :class:`str` or :class:`~multidict.istr` (optional) .. versionadded:: 3.7 @@ -293,7 +293,7 @@ The client session supports the context manager protocol for self closing. Should :meth:`ClientResponse.raise_for_status()` be called for each response - Either :class:`bool` or :class:`callable` + Either :class:`bool` or :class:`collections.abc.Callable` .. versionadded:: 3.7 @@ -351,8 +351,8 @@ The client session supports the context manager protocol for self closing. Allowed values are: - :class:`collections.abc.Mapping` e.g. :class:`dict`, - :class:`aiohttp.MultiDict` or - :class:`aiohttp.MultiDictProxy` + :class:`multidict.MultiDict` or + :class:`multidict.MultiDictProxy` - :class:`collections.abc.Iterable` e.g. :class:`tuple` or :class:`list` - :class:`str` with preferably url-encoded content @@ -386,7 +386,7 @@ The client session supports the context manager protocol for self closing. passed. Using ``skip_auto_headers`` parameter allows to skip that generation. - Iterable of :class:`str` or :class:`~aiohttp.istr` + Iterable of :class:`str` or :class:`~multidict.istr` (optional) :param aiohttp.BasicAuth auth: an object that represents HTTP @@ -492,7 +492,7 @@ The client session supports the context manager protocol for self closing. Use ``ssl=ssl_context`` - :param abc.Mapping proxy_headers: HTTP headers to send to the proxy if the + :param collections.abc.Mapping proxy_headers: HTTP headers to send to the proxy if the parameter proxy has been provided. .. versionadded:: 2.3 @@ -1082,14 +1082,14 @@ TCPConnector very rare cases. :param int family: TCP socket family, both IPv4 and IPv6 by default. - For *IPv4* only use :const:`socket.AF_INET`, - for *IPv6* only -- :const:`socket.AF_INET6`. + For *IPv4* only use :data:`socket.AF_INET`, + for *IPv6* only -- :data:`socket.AF_INET6`. *family* is ``0`` by default, that means both IPv4 and IPv6 are accepted. To specify only concrete version please pass - :const:`socket.AF_INET` or - :const:`socket.AF_INET6` explicitly. + :data:`socket.AF_INET` or + :data:`socket.AF_INET6` explicitly. :param ssl.SSLContext ssl_context: SSL context used for processing *HTTPS* requests (optional). @@ -1110,8 +1110,8 @@ TCPConnector .. attribute:: family - *TCP* socket family e.g. :const:`socket.AF_INET` or - :const:`socket.AF_INET6` + *TCP* socket family e.g. :data:`socket.AF_INET` or + :data:`socket.AF_INET6` Read-only property. @@ -1213,7 +1213,7 @@ Response object .. class:: ClientResponse - Client response returned by :meth:`ClientSession.request` and family. + Client response returned by :meth:`aiohttp.ClientSession.request` and family. User never creates the instance of ClientResponse class but gets it from API calls. @@ -1229,7 +1229,7 @@ Response object .. attribute:: version - Response's version, :class:`HttpVersion` instance. + Response's version, :class:`~aiohttp.protocol.HttpVersion` instance. .. attribute:: status @@ -1428,7 +1428,7 @@ Response object responses. Autodetection works pretty fine anyway. - :param callable loads: :func:`callable` used for loading *JSON* + :param collections.abc.Callable loads: :term:`callable` used for loading *JSON* data, :func:`json.loads` by default. :param str content_type: specify response's content-type, if content type @@ -1441,7 +1441,7 @@ Response object .. attribute:: request_info - A namedtuple with request URL and headers from :class:`ClientRequest` + A namedtuple with request URL and headers from :class:`~aiohttp.ClientRequest` object, :class:`aiohttp.RequestInfo` instance. .. method:: get_encoding() @@ -1562,7 +1562,7 @@ manually. single message, ``None`` for not overriding per-socket setting. - :param callable dumps: any :term:`callable` that accepts an object and + :param collections.abc.Callable dumps: any :term:`callable` that accepts an object and returns a JSON string (:func:`json.dumps` by default). @@ -1630,7 +1630,7 @@ manually. A :ref:`coroutine` that calls :meth:`receive_str` and loads the JSON string to a Python dict. - :param callable loads: any :term:`callable` that accepts + :param collections.abc.Callable loads: any :term:`callable` that accepts :class:`str` and returns :class:`dict` with parsed JSON (:func:`json.loads` by default). @@ -1710,7 +1710,7 @@ RequestInfo .. class:: RequestInfo() - A data class with request URL and headers from :class:`ClientRequest` + A data class with request URL and headers from :class:`~aiohttp.ClientRequest` object, available as :attr:`ClientResponse.request_info` attribute. .. attribute:: url @@ -1745,7 +1745,7 @@ BasicAuth Should be used for specifying authorization data in client API, - e.g. *auth* parameter for :meth:`ClientSession.request`. + e.g. *auth* parameter for :meth:`ClientSession.request() `. .. classmethod:: decode(auth_header, encoding='latin1') @@ -1797,7 +1797,7 @@ CookieJar The class implements :class:`collections.abc.Iterable`, :class:`collections.abc.Sized` and - :class:`aiohttp.AbstractCookieJar` interfaces. + :class:`aiohttp.abc.AbstractCookieJar` interfaces. Implements cookie storage adhering to RFC 6265. @@ -1917,7 +1917,7 @@ added with at least one optional argument to :meth:`add_field