Document None support for HTTPConnection.timeout

`timeout` is passed down to `socket.settimeout()` which supports `None` and puts the socket in blocking mode.
This commit is contained in:
Daniel Farley 2020-01-05 10:47:17 -08:00 committed by GitHub
parent 4b66fa6ce9
commit 5bb38f9839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -40,11 +40,11 @@ The module provides the following classes:
string if it has the form ``host:port``, else the default HTTP port (80) is
used. If the optional *timeout* parameter is given, blocking
operations (like connection attempts) will timeout after that many seconds
(if it is not given, the global default timeout setting is used).
The optional *source_address* parameter may be a tuple of a (host, port)
to use as the source address the HTTP connection is made from.
The optional *blocksize* parameter sets the buffer size in bytes for
sending a file-like message body.
If it is ``None`` then blocking operations will not timeout. If it is not given,
the global default timeout setting is used. The optional *source_address*
parameter may be a tuple of a (host, port) to use as the source address the
HTTP connection is made from. The optional *blocksize* parameter sets the buffer
size in bytes for sending a file-like message body.
For example, the following calls all create instances that connect to the server
at the same host and port::