parameters: (self, method, url, redirect=True, **kw)
return_statement: return self.urlopen(method, redirect_location, **kw)
docstring: Same as :meth:`urllib3.connectionpool.HTTPConnectionPool.urlopen`
          with custom cross-host redirect logic and only sends the request-uri
          portion of the ``url``.
  
          The given ``url`` parameter must be absolute, such that an appropriate
          :class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.
docstring_summary: Same as :meth:`urllib3.connectionpool.HTTPConnectionPool.urlopen`
          with custom cross-host redirect logic and only sends the request-uri
          portion of the ``url``.
docstring_tokens: Same as : meth : urllib3 . connectionpool . HTTPConnectionPool . urlopen with custom cross - host redirect logic and only sends the request - uri portion of the url .
function: def urlopen(self, method, url, redirect=True, **kw):
          """
          Same as :meth:`urllib3.connectionpool.HTTPConnectionPool.urlopen`
          with custom cross-host redirect logic and only sends the request-uri
          portion of the ``url``.
  
          The given ``url`` parameter must be absolute, such that an appropriate
          :class:`urllib3.connectionpool.ConnectionPool` can be chosen for it.
          """
          u = parse_url(url)
          conn = self.connection_from_host(u.host, port=u.port, scheme=u.scheme)
  
          kw['assert_same_host'] = False
          kw['redirect'] = False
          if 'headers' not in kw:
              kw['headers'] = self.headers
  
          if self.proxy is not None and u.scheme == "http":
              response = conn.urlopen(method, url, **kw)
          else:
              response = conn.urlopen(method, u.request_uri, **kw)
  
          redirect_location = redirect and response.get_redirect_location()
          if not redirect_location:
              return response
  
          # Support relative URLs for redirecting.
          redirect_location = urljoin(url, redirect_location)
  
          # RFC 7231, Section 6.4.4
          if response.status == 303:
              method = 'GET'
  
          retries = kw.get('retries')
          if not isinstance(retries, Retry):
              retries = Retry.from_int(retries, redirect=redirect)
  
          try:
              retries = retries.increment(method, url, response=response, _pool=conn)
          except MaxRetryError:
              if retries.raise_on_redirect:
                  raise
              return response
  
          kw['retries'] = retries
          kw['redirect'] = redirect
  
          log.info("Redirecting %s -> %s", url, redirect_location)
          return self.urlopen(method, redirect_location, **kw)
function_tokens: def urlopen ( self , method , url , redirect = True , * * kw ) : u = parse_url ( url ) conn = self . connection_from_host ( u . host , port = u . port , scheme = u . scheme ) kw [ 'assert_same_host' ] = False kw [ 'redirect' ] = False if 'headers' not in kw : kw [ 'headers' ] = self . headers if self . proxy is not None and u . scheme == "http" : response = conn . urlopen ( method , url , * * kw ) else : response = conn . urlopen ( method , u . request_uri , * * kw ) redirect_location = redirect and response . get_redirect_location ( ) if not redirect_location : return response # Support relative URLs for redirecting. redirect_location = urljoin ( url , redirect_location ) # RFC 7231, Section 6.4.4 if response . status == 303 : method = 'GET' retries = kw . get ( 'retries' ) if not isinstance ( retries , Retry ) : retries = Retry . from_int ( retries , redirect = redirect ) try : retries = retries . increment ( method , url , response = response , _pool = conn ) except MaxRetryError : if retries . raise_on_redirect : raise return response kw [ 'retries' ] = retries kw [ 'redirect' ] = redirect log . info ( "Redirecting %s -> %s" , url , redirect_location ) return self . urlopen ( method , redirect_location , * * kw )