Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
pip._vendor.urllib3.connectionpool.HTTPConnectionPool Class Reference
Inheritance diagram for pip._vendor.urllib3.connectionpool.HTTPConnectionPool:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.urllib3.connectionpool.HTTPConnectionPool:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self, host, port=None, strict=False, timeout=Timeout.DEFAULT_TIMEOUT, maxsize=1, block=False, headers=None, retries=None, _proxy=None, _proxy_headers=None, _proxy_config=None, **conn_kw)
 
 close (self)
 
 is_same_host (self, url)
 
 urlopen (self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=_Default, pool_timeout=None, release_conn=None, chunked=False, body_pos=None, **response_kw)
 
- Public Member Functions inherited from pip._vendor.urllib3.connectionpool.ConnectionPool
 __str__ (self)
 
 __enter__ (self)
 
 __exit__ (self, exc_type, exc_val, exc_tb)
 
- Public Member Functions inherited from pip._vendor.urllib3.request.RequestMethods
 request (self, method, url, fields=None, headers=None, **urlopen_kw)
 
 request_encode_url (self, method, url, fields=None, headers=None, **urlopen_kw)
 
 request_encode_body (self, method, url, fields=None, headers=None, encode_multipart=True, multipart_boundary=None, **urlopen_kw)
 

Public Attributes

 strict
 
 timeout
 
 retries
 
 pool
 
 block
 
 proxy
 
 proxy_headers
 
 proxy_config
 
 num_connections
 
 num_requests
 
 conn_kw
 
 host
 
 scheme
 
 port
 
- Public Attributes inherited from pip._vendor.urllib3.connectionpool.ConnectionPool
 host
 
 port
 
- Public Attributes inherited from pip._vendor.urllib3.request.RequestMethods
 headers
 

Static Public Attributes

str scheme = "http"
 
 ConnectionCls = HTTPConnection
 
 ResponseCls = HTTPResponse
 
- Static Public Attributes inherited from pip._vendor.urllib3.connectionpool.ConnectionPool
 scheme = None
 
 QueueCls = LifoQueue
 

Protected Member Functions

 _new_conn (self)
 
 _get_conn (self, timeout=None)
 
 _put_conn (self, conn)
 
 _validate_conn (self, conn)
 
 _prepare_proxy (self, conn)
 
 _get_timeout (self, timeout)
 
 _raise_timeout (self, err, url, timeout_value)
 
 _make_request (self, conn, method, url, timeout=_Default, chunked=False, **httplib_request_kw)
 
 _absolute_url (self, path)
 

Additional Inherited Members

- Protected Attributes inherited from pip._vendor.urllib3.connectionpool.ConnectionPool
 _proxy_host
 
- Static Protected Attributes inherited from pip._vendor.urllib3.request.RequestMethods
dict _encode_url_methods = {"DELETE", "GET", "HEAD", "OPTIONS"}
 

Detailed Description

Thread-safe connection pool for one host.

:param host:
    Host used for this HTTP Connection (e.g. "localhost"), passed into
    :class:`http.client.HTTPConnection`.

:param port:
    Port used for this HTTP Connection (None is equivalent to 80), passed
    into :class:`http.client.HTTPConnection`.

:param strict:
    Causes BadStatusLine to be raised if the status line can't be parsed
    as a valid HTTP/1.0 or 1.1 status line, passed into
    :class:`http.client.HTTPConnection`.

    .. note::
       Only works in Python 2. This parameter is ignored in Python 3.

:param timeout:
    Socket timeout in seconds for each individual connection. This can
    be a float or integer, which sets the timeout for the HTTP request,
    or an instance of :class:`urllib3.util.Timeout` which gives you more
    fine-grained control over request timeouts. After the constructor has
    been parsed, this is always a `urllib3.util.Timeout` object.

:param maxsize:
    Number of connections to save that can be reused. More than 1 is useful
    in multithreaded situations. If ``block`` is set to False, more
    connections will be created but they will not be saved once they've
    been used.

:param block:
    If set to True, no more than ``maxsize`` connections will be used at
    a time. When no free connections are available, the call will block
    until a connection has been released. This is a useful side effect for
    particular multithreaded situations where one does not want to use more
    than maxsize connections per host to prevent flooding.

:param headers:
    Headers to include with all requests, unless other headers are given
    explicitly.

:param retries:
    Retry configuration to use by default with requests in this pool.

:param _proxy:
    Parsed proxy URL, should not be used directly, instead, see
    :class:`urllib3.ProxyManager`

:param _proxy_headers:
    A dictionary with proxy headers, should not be used directly,
    instead, see :class:`urllib3.ProxyManager`

:param \\**conn_kw:
    Additional parameters are used to create fresh :class:`urllib3.connection.HTTPConnection`,
    :class:`urllib3.connection.HTTPSConnection` instances.

Constructor & Destructor Documentation

◆ __init__()

pip._vendor.urllib3.connectionpool.HTTPConnectionPool.__init__ (   self,
  host,
  port = None,
  strict = False,
  timeout = Timeout.DEFAULT_TIMEOUT,
  maxsize = 1,
  block = False,
  headers = None,
  retries = None,
  _proxy = None,
  _proxy_headers = None,
  _proxy_config = None,
**  conn_kw 
)

Member Function Documentation

◆ _get_conn()

pip._vendor.urllib3.connectionpool.HTTPConnectionPool._get_conn (   self,
  timeout = None 
)
protected
Get a connection. Will return a pooled connection if one is available.

If no connections are available and :prop:`.block` is ``False``, then a
fresh connection is returned.

:param timeout:
    Seconds to wait before giving up and raising
    :class:`urllib3.exceptions.EmptyPoolError` if the pool is empty and
    :prop:`.block` is ``True``.

◆ _get_timeout()

pip._vendor.urllib3.connectionpool.HTTPConnectionPool._get_timeout (   self,
  timeout 
)
protected
Helper that always returns a :class:`urllib3.util.Timeout`

◆ _make_request()

pip._vendor.urllib3.connectionpool.HTTPConnectionPool._make_request (   self,
  conn,
  method,
  url,
  timeout = _Default,
  chunked = False,
**  httplib_request_kw 
)
protected
Perform a request on a given urllib connection object taken from our
pool.

:param conn:
    a connection from one of our connection pools

:param timeout:
    Socket timeout in seconds for the request. This can be a
    float or integer, which will set the same timeout value for
    the socket connect and the socket read, or an instance of
    :class:`urllib3.util.Timeout`, which gives you more fine-grained
    control over your timeouts.

◆ _new_conn()

pip._vendor.urllib3.connectionpool.HTTPConnectionPool._new_conn (   self)
protected
Return a fresh :class:`HTTPConnection`.

Reimplemented in pip._vendor.urllib3.connectionpool.HTTPSConnectionPool.

◆ _prepare_proxy()

pip._vendor.urllib3.connectionpool.HTTPConnectionPool._prepare_proxy (   self,
  conn 
)
protected

◆ _put_conn()

pip._vendor.urllib3.connectionpool.HTTPConnectionPool._put_conn (   self,
  conn 
)
protected
Put a connection back into the pool.

:param conn:
    Connection object for the current host and port as returned by
    :meth:`._new_conn` or :meth:`._get_conn`.

If the pool is already full, the connection is closed and discarded
because we exceeded maxsize. If connections are discarded frequently,
then maxsize should be increased.

If the pool is closed, then the connection will be closed and discarded.

◆ _raise_timeout()

pip._vendor.urllib3.connectionpool.HTTPConnectionPool._raise_timeout (   self,
  err,
  url,
  timeout_value 
)
protected
Is the error actually a timeout? Will raise a ReadTimeout or pass

◆ _validate_conn()

pip._vendor.urllib3.connectionpool.HTTPConnectionPool._validate_conn (   self,
  conn 
)
protected
Called right before a request is made, after the socket is created.

Reimplemented in pip._vendor.urllib3.connectionpool.HTTPSConnectionPool.

◆ close()

pip._vendor.urllib3.connectionpool.HTTPConnectionPool.close (   self)
Close all pooled connections and disable the pool.

Reimplemented from pip._vendor.urllib3.connectionpool.ConnectionPool.

◆ is_same_host()

pip._vendor.urllib3.connectionpool.HTTPConnectionPool.is_same_host (   self,
  url 
)
Check if the given ``url`` is a member of the same host as this
connection pool.

◆ urlopen()

pip._vendor.urllib3.connectionpool.HTTPConnectionPool.urlopen (   self,
  method,
  url,
  body = None,
  headers = None,
  retries = None,
  redirect = True,
  assert_same_host = True,
  timeout = _Default,
  pool_timeout = None,
  release_conn = None,
  chunked = False,
  body_pos = None,
**  response_kw 
)
Get a connection from the pool and perform an HTTP request. This is the
lowest level call for making a request, so you'll need to specify all
the raw details.

.. note::

   More commonly, it's appropriate to use a convenience method provided
   by :class:`.RequestMethods`, such as :meth:`request`.

.. note::

   `release_conn` will only behave as expected if
   `preload_content=False` because we want to make
   `preload_content=False` the default behaviour someday soon without
   breaking backwards compatibility.

:param method:
    HTTP request method (such as GET, POST, PUT, etc.)

:param url:
    The URL to perform the request on.

:param body:
    Data to send in the request body, either :class:`str`, :class:`bytes`,
    an iterable of :class:`str`/:class:`bytes`, or a file-like object.

:param headers:
    Dictionary of custom headers to send, such as User-Agent,
    If-None-Match, etc. If None, pool headers are used. If provided,
    these headers completely replace any pool-specific headers.

:param retries:
    Configure the number of retries to allow before raising a
    :class:`~urllib3.exceptions.MaxRetryError` exception.

    Pass ``None`` to retry until you receive a response. Pass a
    :class:`~urllib3.util.retry.Retry` object for fine-grained control
    over different types of retries.
    Pass an integer number to retry connection errors that many times,
    but no other types of errors. Pass zero to never retry.

    If ``False``, then retries are disabled and any exception is raised
    immediately. Also, instead of raising a MaxRetryError on redirects,
    the redirect response will be returned.

:type retries: :class:`~urllib3.util.retry.Retry`, False, or an int.

:param redirect:
    If True, automatically handle redirects (status codes 301, 302,
    303, 307, 308). Each redirect counts as a retry. Disabling retries
    will disable redirect, too.

:param assert_same_host:
    If ``True``, will make sure that the host of the pool requests is
    consistent else will raise HostChangedError. When ``False``, you can
    use the pool on an HTTP proxy and request foreign hosts.

:param timeout:
    If specified, overrides the default timeout for this one
    request. It may be a float (in seconds) or an instance of
    :class:`urllib3.util.Timeout`.

:param pool_timeout:
    If set and the pool is set to block=True, then this method will
    block for ``pool_timeout`` seconds and raise EmptyPoolError if no
    connection is available within the time period.

:param release_conn:
    If False, then the urlopen call will not release the connection
    back into the pool once a response is received (but will release if
    you read the entire contents of the response such as when
    `preload_content=True`). This is useful if you're not preloading
    the response's content immediately. You will need to call
    ``r.release_conn()`` on the response ``r`` to return the connection
    back into the pool. If None, it takes the value of
    ``response_kw.get('preload_content', True)``.

:param chunked:
    If True, urllib3 will send the body using chunked transfer
    encoding. Otherwise, urllib3 will send the body using the standard
    content-length form. Defaults to False.

:param int body_pos:
    Position to seek to in file-like body in the event of a retry or
    redirect. Typically this won't need to be set because urllib3 will
    auto-populate the value when needed.

:param \\**response_kw:
    Additional parameters are passed to
    :meth:`urllib3.response.HTTPResponse.from_httplib`

Reimplemented from pip._vendor.urllib3.request.RequestMethods.


The documentation for this class was generated from the following file: