From 140c6480756b06cd6ecf7b60f72a4f02b393f8c5 Mon Sep 17 00:00:00 2001 From: Joshua Hoblitt Date: Sun, 20 May 2018 19:39:33 -0700 Subject: [PATCH] increase default timeout to be > github request timeout (#793) * increase default timeout to 15s * Update MainClass.py --- github/MainClass.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/github/MainClass.py b/github/MainClass.py index f97863ff..6bf41951 100644 --- a/github/MainClass.py +++ b/github/MainClass.py @@ -72,7 +72,10 @@ import Invitation atLeastPython3 = sys.hexversion >= 0x03000000 DEFAULT_BASE_URL = "https://api.github.com" -DEFAULT_TIMEOUT = 10 +# As of 2018-05-17, Github imposes a 10s limit for completion of API requests. +# Thus, the timeout should be slightly > 10s to account for network/front-end +# latency. +DEFAULT_TIMEOUT = 15 DEFAULT_PER_PAGE = 30