[PATCH] D38281: [llvmlab] Add timeout and retries for fetching builds.

Volodymyr Sapsai via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 15:31:45 PDT 2017


vsapsai added inline comments.


================
Comment at: llvmbisect/llvmlab/gcs.py:15
 
+class HttpClient(object):
+    def __init__(self):
----------------
JDevlieghere wrote:
> Maybe we should call this `HttpSession` to emphasize that we will need a new instance each time?
In this code it doesn't really matter if you create a new instance or reuse the old one. In most places I decided to create a new instance because it is simpler.

I've chosen name `HttpClient` because `client.get(...)` seems more natural compared to `session.get(...)`. I have to acknowledge my preferences are influenced by Java (e.g. org.apache.http.impl.client.CloseableHttpClient, okhttp3.OkHttpClient). Though looks like in Python "client" is also popular according to renaming `httplib` to `http.client`. 


https://reviews.llvm.org/D38281





More information about the llvm-commits mailing list