(self, url, proxies=None)
return conn
Returns a urllib3 connection for the given URL. This should not be
        called from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param url: The URL to connect to.
        :param proxies: (optional) A Requests-style dictionary of proxies used on this request.
        :rtype: urllib3.ConnectionPool
Returns a urllib3 connection for the given URL. This should not be
        called from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.
Returns a urllib3 connection for the given URL . This should not be called from user code and is only exposed for use when subclassing the : class : HTTPAdapter <requests . adapters . HTTPAdapter > .
def get_connection(self, url, proxies=None):
        """Returns a urllib3 connection for the given URL. This should not be
        called from user code, and is only exposed for use when subclassing the
        :class:`HTTPAdapter <requests.adapters.HTTPAdapter>`.

        :param url: The URL to connect to.
        :param proxies: (optional) A Requests-style dictionary of proxies used on this request.
        :rtype: urllib3.ConnectionPool
        """
        proxy = select_proxy(url, proxies)

        if proxy:
            proxy = prepend_scheme_if_needed(proxy, 'http')
            proxy_url = parse_url(proxy)
            if not proxy_url.host:
                raise InvalidProxyURL("Please check proxy URL. It is malformed"
                                      " and could be missing the host.")
            proxy_manager = self.proxy_manager_for(proxy)
            conn = proxy_manager.connection_from_url(url)
        else:
            # Only scheme should be lower case
            parsed = urlparse(url)
            url = parsed.geturl()
            conn = self.poolmanager.connection_from_url(url)

        return conn
def get_connection ( self , url , proxies = None ) : proxy = select_proxy ( url , proxies ) if proxy : proxy = prepend_scheme_if_needed ( proxy , 'http' ) proxy_url = parse_url ( proxy ) if not proxy_url . host : raise InvalidProxyURL ( "Please check proxy URL. It is malformed" " and could be missing the host." ) proxy_manager = self . proxy_manager_for ( proxy ) conn = proxy_manager . connection_from_url ( url ) else : # Only scheme should be lower case parsed = urlparse ( url ) url = parsed . geturl ( ) conn = self . poolmanager . connection_from_url ( url ) return conn