self.sock = socket.socket(socket.AF_INET6)
self.sock.connect((self.host, self.port, 0, 0))
if self._tunnel_host:
    self._tunnel()
requests.packages.urllib3.connectionpool.HTTPConnection = MyHTTPConnection
Force requests to use IPv4 / IPv6