Remove more Python version specific code (#1193)

Remove a bunch of other call sites that behaved differently between
Python 2 and 3, massively cleaning up a few messy methods.
This commit is contained in:
Steve Kowalik
2019-08-28 15:24:54 +10:00
committed by GitHub
parent 7bac694ae5
commit a0f01cf9cf
9 changed files with 44 additions and 94 deletions
-5
View File
@@ -60,7 +60,6 @@ import mimetypes
import os
import re
import requests
import sys
import time
import six.moves.urllib.parse
from io import IOBase
@@ -69,8 +68,6 @@ from . import Consts
from . import GithubException
import six
atLeastPython3 = sys.hexversion >= 0x03000000
class RequestsResponse:
# mimic the httplib response object
@@ -458,8 +455,6 @@ class Requester:
def __createConnection(self):
kwds = {}
if not atLeastPython3: # pragma no branch (Branch useful only with Python 3)
kwds["strict"] = True # Useless in Python3, would generate a deprecation warning
kwds["timeout"] = self.__timeout
kwds["verify"] = self.__verify