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.poolmanager.PoolManager Class Reference
Inheritance diagram for pip._vendor.urllib3.poolmanager.PoolManager:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.urllib3.poolmanager.PoolManager:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self, num_pools=10, headers=None, **connection_pool_kw)
 
 __enter__ (self)
 
 __exit__ (self, exc_type, exc_val, exc_tb)
 
 clear (self)
 
 connection_from_host (self, host, port=None, scheme="http", pool_kwargs=None)
 
 connection_from_context (self, request_context)
 
 connection_from_pool_key (self, pool_key, request_context=None)
 
 connection_from_url (self, url, pool_kwargs=None)
 
 urlopen (self, method, url, redirect=True, **kw)
 
- 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

 connection_pool_kw
 
 pools
 
 pool_classes_by_scheme
 
 key_fn_by_scheme
 
- Public Attributes inherited from pip._vendor.urllib3.request.RequestMethods
 headers
 

Static Public Attributes

 proxy = None
 
 proxy_config = None
 

Protected Member Functions

 _new_pool (self, scheme, host, port, request_context=None)
 
 _merge_pool_kwargs (self, override)
 
 _proxy_requires_url_absolute_form (self, parsed_url)
 
 _validate_proxy_scheme_url_selection (self, url_scheme)
 

Additional Inherited Members

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

Detailed Description

Allows for arbitrary requests while transparently keeping track of
necessary connection pools for you.

:param num_pools:
    Number of connection pools to cache before discarding the least
    recently used pool.

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

:param \\**connection_pool_kw:
    Additional parameters are used to create fresh
    :class:`urllib3.connectionpool.ConnectionPool` instances.

Example::

    >>> manager = PoolManager(num_pools=2)
    >>> r = manager.request('GET', 'http://google.com/')
    >>> r = manager.request('GET', 'http://google.com/mail')
    >>> r = manager.request('GET', 'http://yahoo.com/')
    >>> len(manager.pools)
    2

Constructor & Destructor Documentation

◆ __init__()

pip._vendor.urllib3.poolmanager.PoolManager.__init__ (   self,
  num_pools = 10,
  headers = None,
**  connection_pool_kw 
)

Member Function Documentation

◆ _merge_pool_kwargs()

pip._vendor.urllib3.poolmanager.PoolManager._merge_pool_kwargs (   self,
  override 
)
protected
Merge a dictionary of override values for self.connection_pool_kw.

This does not modify self.connection_pool_kw and returns a new dict.
Any keys in the override dictionary with a value of ``None`` are
removed from the merged dictionary.

◆ _new_pool()

pip._vendor.urllib3.poolmanager.PoolManager._new_pool (   self,
  scheme,
  host,
  port,
  request_context = None 
)
protected
Create a new :class:`urllib3.connectionpool.ConnectionPool` based on host, port, scheme, and
any additional pool keyword arguments.

If ``request_context`` is provided, it is provided as keyword arguments
to the pool class used. This method is used to actually create the
connection pools handed out by :meth:`connection_from_url` and
companion methods. It is intended to be overridden for customization.

◆ _proxy_requires_url_absolute_form()

pip._vendor.urllib3.poolmanager.PoolManager._proxy_requires_url_absolute_form (   self,
  parsed_url 
)
protected
Indicates if the proxy requires the complete destination URL in the
request.  Normally this is only needed when not using an HTTP CONNECT
tunnel.

◆ _validate_proxy_scheme_url_selection()

pip._vendor.urllib3.poolmanager.PoolManager._validate_proxy_scheme_url_selection (   self,
  url_scheme 
)
protected
Validates that were not attempting to do TLS in TLS connections on
Python2 or with unsupported SSL implementations.

◆ clear()

pip._vendor.urllib3.poolmanager.PoolManager.clear (   self)
Empty our store of pools and direct them all to close.

This will not affect in-flight connections, but they will not be
re-used after completion.

◆ connection_from_context()

pip._vendor.urllib3.poolmanager.PoolManager.connection_from_context (   self,
  request_context 
)
Get a :class:`urllib3.connectionpool.ConnectionPool` based on the request context.

``request_context`` must at least contain the ``scheme`` key and its
value must be a key in ``key_fn_by_scheme`` instance variable.

◆ connection_from_host()

pip._vendor.urllib3.poolmanager.PoolManager.connection_from_host (   self,
  host,
  port = None,
  scheme = "http",
  pool_kwargs = None 
)
Get a :class:`urllib3.connectionpool.ConnectionPool` based on the host, port, and scheme.

If ``port`` isn't given, it will be derived from the ``scheme`` using
``urllib3.connectionpool.port_by_scheme``. If ``pool_kwargs`` is
provided, it is merged with the instance's ``connection_pool_kw``
variable and used to create the new connection pool, if one is
needed.

Reimplemented in pip._vendor.urllib3.poolmanager.ProxyManager.

◆ connection_from_pool_key()

pip._vendor.urllib3.poolmanager.PoolManager.connection_from_pool_key (   self,
  pool_key,
  request_context = None 
)
Get a :class:`urllib3.connectionpool.ConnectionPool` based on the provided pool key.

``pool_key`` should be a namedtuple that only contains immutable
objects. At a minimum it must have the ``scheme``, ``host``, and
``port`` fields.

◆ connection_from_url()

pip._vendor.urllib3.poolmanager.PoolManager.connection_from_url (   self,
  url,
  pool_kwargs = None 
)
Similar to :func:`urllib3.connectionpool.connection_from_url`.

If ``pool_kwargs`` is not provided and a new pool needs to be
constructed, ``self.connection_pool_kw`` is used to initialize
the :class:`urllib3.connectionpool.ConnectionPool`. If ``pool_kwargs``
is provided, it is used instead. Note that if a new pool does not
need to be created for the request, the provided ``pool_kwargs`` are
not used.

◆ urlopen()

pip._vendor.urllib3.poolmanager.PoolManager.urlopen (   self,
  method,
  url,
  redirect = True,
**  kw 
)
Same as :meth:`urllib3.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.

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

Reimplemented in pip._vendor.urllib3.poolmanager.ProxyManager.


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