_Zc@sddlZddlZddlZddlmZmZddlZdZ yddl Z e j Z Wne k r{nXddl mZddlmZmZmZmZddlmZdZd efd YZdS( iN(tReadTimeoutErrortSSLErrori(t Connectioni(tConnectionErrortImproperlyConfiguredtConnectionTimeoutR(t urlencodecKstj|}|S(s A helper function around creating an SSL context https://docs.python.org/3/library/ssl.html#context-creation Accepts kwargs in the same manner as `create_default_context`. (tssltcreate_default_context(tkwargstctx((s/private/var/folders/cc/xm4nqn811x9b50x1q_zpkmvdjlphkp/T/pip-build-W9yz6j/elasticsearch/elasticsearch/connection/http_urllib3.pytcreate_ssl_contextstUrllib3HttpConnectioncBsbeZdZdddeeddddddddddZddddddZdZRS( sT Default connection class using the `urllib3` library and the http protocol. :arg host: hostname of the node (default: localhost) :arg port: port to use (integer, default: 9200) :arg url_prefix: optional url prefix for elasticsearch :arg timeout: default timeout in seconds (float, default: 10) :arg http_auth: optional http auth information as either ':' separated string or a tuple :arg use_ssl: use ssl for the connection if `True` :arg verify_certs: whether to verify SSL certificates :arg ca_certs: optional path to CA bundle. See https://urllib3.readthedocs.io/en/latest/security.html#using-certifi-with-urllib3 for instructions how to get default set :arg client_cert: path to the file containing the private key and the certificate, or cert only if using client_key :arg client_key: path to the file containing the private key if using separate cert and key files (client_cert will contain only the cert) :arg ssl_version: version of the SSL protocol to use. Choices are: SSLv23 (default) SSLv2 SSLv3 TLSv1 (see ``PROTOCOL_*`` constants in the ``ssl`` module for exact options for your environment). :arg ssl_assert_hostname: use hostname verification if not `False` :arg ssl_assert_fingerprint: verify the supplied certificate fingerprint if not `None` :arg maxsize: the number of connections which will be kept open to this host. See https://urllib3.readthedocs.io/en/1.4/pools.html#api for more information. :arg headers: any custom http headers to be add to requests t localhosti#i c KsVtt|jd|d|d||tjdt|_|dk rt|t t frpdj |}n|jj tjd|n| rx(| D]}| ||j|j s      "