# Stubs for requests.packages.urllib3.connectionpool (Python 3.4)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Undefined, Any
from . import exceptions
from .packages import ssl_match_hostname
from . import packages
from . import connection
from . import request
from . import response
from .util import connection as _connection
from .util import retry
from .util import timeout
from .util import url

ClosedPoolError = exceptions.ClosedPoolError
ProtocolError = exceptions.ProtocolError
EmptyPoolError = exceptions.EmptyPoolError
HostChangedError = exceptions.HostChangedError
LocationValueError = exceptions.LocationValueError
MaxRetryError = exceptions.MaxRetryError
ProxyError = exceptions.ProxyError
ReadTimeoutError = exceptions.ReadTimeoutError
SSLError = exceptions.SSLError
TimeoutError = exceptions.TimeoutError
InsecureRequestWarning = exceptions.InsecureRequestWarning
CertificateError = ssl_match_hostname.CertificateError
port_by_scheme = connection.port_by_scheme
DummyConnection = connection.DummyConnection
HTTPConnection = connection.HTTPConnection
HTTPSConnection = connection.HTTPSConnection
VerifiedHTTPSConnection = connection.VerifiedHTTPSConnection
HTTPException = connection.HTTPException
BaseSSLError = connection.BaseSSLError
ConnectionError = connection.ConnectionError
RequestMethods = request.RequestMethods
HTTPResponse = response.HTTPResponse
is_connection_dropped = _connection.is_connection_dropped
Retry = retry.Retry
Timeout = timeout.Timeout
get_host = url.get_host

xrange = Undefined(Any)
log = Undefined(Any)

class ConnectionPool:
    scheme = Undefined(Any)
    QueueCls = Undefined(Any)
    host = Undefined(Any)
    port = Undefined(Any)
    def __init__(self, host, port=None): pass
    def __enter__(self): pass
    def __exit__(self, exc_type, exc_val, exc_tb): pass
    def close(self): pass

class HTTPConnectionPool(ConnectionPool, RequestMethods):
    scheme = Undefined(Any)
    ConnectionCls = Undefined(Any)
    strict = Undefined(Any)
    timeout = Undefined(Any)
    retries = Undefined(Any)
    pool = Undefined(Any)
    block = Undefined(Any)
    proxy = Undefined(Any)
    proxy_headers = Undefined(Any)
    num_connections = Undefined(Any)
    num_requests = Undefined(Any)
    conn_kw = Undefined(Any)
    def __init__(self, host, port=None, strict=False, timeout=Undefined, maxsize=1, block=False, headers=None, retries=None, _proxy=None, _proxy_headers=None, **conn_kw): pass
    def close(self): pass
    def is_same_host(self, url): pass
    def urlopen(self, method, url, body=None, headers=None, retries=None, redirect=True, assert_same_host=True, timeout=Undefined, pool_timeout=None, release_conn=None, **response_kw): pass

class HTTPSConnectionPool(HTTPConnectionPool):
    scheme = Undefined(Any)
    ConnectionCls = Undefined(Any)
    key_file = Undefined(Any)
    cert_file = Undefined(Any)
    cert_reqs = Undefined(Any)
    ca_certs = Undefined(Any)
    ssl_version = Undefined(Any)
    assert_hostname = Undefined(Any)
    assert_fingerprint = Undefined(Any)
    def __init__(self, host, port=None, strict=False, timeout=Undefined, maxsize=1, block=False, headers=None, retries=None, _proxy=None, _proxy_headers=None, key_file=None, cert_file=None, cert_reqs=None, ca_certs=None, ssl_version=None, assert_hostname=None, assert_fingerprint=None, **conn_kw): pass

def connection_from_url(url, **kw): pass
