From a7bb2d77e15998448ab47697d9f4a721ae10dc25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Libor=20Pol=C4=8D=C3=A1k?= Date: Wed, 16 Oct 2019 15:08:53 +0200 Subject: [PATCH] Fix issue #4190 --- docs/client_quickstart.rst | 16 ++++++++-------- docs/client_reference.rst | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/client_quickstart.rst b/docs/client_quickstart.rst index 8bdb14e9778..3cf3ec5cfc2 100644 --- a/docs/client_quickstart.rst +++ b/docs/client_quickstart.rst @@ -393,10 +393,10 @@ Timeouts Timeout settings are stored in :class:`ClientTimeout` data structure. -By default *aiohttp* uses a *total* 5min timeout, it means that the +By default *aiohttp* uses a *total* 300 seconds (5min) timeout, it means that the whole operation should finish in 5 minutes. -The value could be overridden by *timeout* parameter for the session:: +The value could be overridden by *timeout* parameter for the session (specified in seconds):: timeout = aiohttp.ClientTimeout(total=60) async with aiohttp.ClientSession(timeout=timeout) as session: @@ -411,24 +411,24 @@ Supported :class:`ClientTimeout` fields are: ``total`` - The whole operation time including connection + The maximal number of seconds for the whole operation including connection establishment, request sending and response reading. ``connect`` - The time - consists connection establishment for a new connection or - waiting for a free connection from a pool if pool connection + The maximal number of seconds for + connection establishment of a new connection or + for waiting for a free connection from a pool if pool connection limits are exceeded. ``sock_connect`` - A timeout for connecting to a peer for a new connection, not + The maximal number of seconds for connecting to a peer for a new connection, not given from a pool. ``sock_read`` - The maximum allowed timeout for period between reading a new + The maximal number of seconds allowed for period between reading a new data portion from a peer. All fields are floats, ``None`` or ``0`` disables a particular timeout check, see the diff --git a/docs/client_reference.rst b/docs/client_reference.rst index 4e33e3a39f4..9e10444f883 100644 --- a/docs/client_reference.rst +++ b/docs/client_reference.rst @@ -135,7 +135,7 @@ The client session supports the context manager protocol for self closing. Async callback support is added. - :param timeout: a :class:`ClientTimeout` settings structure, 5min + :param timeout: a :class:`ClientTimeout` settings structure, 300 seconds (5min) total timeout by default. .. versionadded:: 3.3 @@ -347,7 +347,7 @@ The client session supports the context manager protocol for self closing. :class:`float` is still supported for sake of backward compatibility. - If :class:`float` is passed it is a *total* timeout. + If :class:`float` is passed it is a *total* timeout (in seconds). :param ssl: SSL validation mode. ``None`` for default SSL check (:func:`ssl.create_default_context` is used), @@ -683,7 +683,7 @@ certification chaining. does not have Content-Length header. ``True`` by default (optional). - :param timeout: a :class:`ClientTimeout` settings structure, 5min + :param timeout: a :class:`ClientTimeout` settings structure, 300 seconds (5min) total timeout by default. @@ -1422,13 +1422,13 @@ ClientTimeout .. attribute:: total - Total timeout for the whole request. + Maximal number of seconds for the whole request. :class:`float`, ``None`` by default. .. attribute:: connect - Total timeout for acquiring a connection from pool. The time + Maximal number of seconds for acquiring a connection from pool. The time consists connection establishment for a new connection or waiting for a free connection from a pool if pool connection limits are exceeded. @@ -1440,14 +1440,14 @@ ClientTimeout .. attribute:: sock_connect - A timeout for connecting to a peer for a new connection, not + Maximal number of seconds for connecting to a peer for a new connection, not given from a pool. See also :attr:`connect`. :class:`float`, ``None`` by default. .. attribute:: sock_read - A timeout for reading a portion of data from a peer. + Maximal number of seconds for reading a portion of data from a peer. :class:`float`, ``None`` by default.