From 5bb38f9839d5b53d47273a903bf8a9ac8096bdfd Mon Sep 17 00:00:00 2001 From: Daniel Farley Date: Sun, 5 Jan 2020 10:47:17 -0800 Subject: [PATCH] Document None support for HTTPConnection.timeout `timeout` is passed down to `socket.settimeout()` which supports `None` and puts the socket in blocking mode. --- Doc/library/http.client.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/library/http.client.rst b/Doc/library/http.client.rst index 807dd8bd379..bdfb57c7648 100644 --- a/Doc/library/http.client.rst +++ b/Doc/library/http.client.rst @@ -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::