� ��^iӒ��<�ddlmZddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z m Z mZmZmZmZmZmZddlmZmZmZmZmZmZmZmZmZmZmZm Z m!Z!ddl"m#Z#dd l$m%Z%dd l&m'Z'dd l(m)Z)dd l*m+Z+dd l,m-Z-ddl.m/Z/ddl0m1Z1ddl2m3Z3ddl4m5Z5ddl6m7Z7ddl8m9Z9ddl:m;Z;mddl:m?Z?m@Z@e#jAjBZBejCeD��ZEeF��ZGGd�deF��ZHejIejJhZKGd�deHe)��ZLGd�deL��ZMd�ZNd�Z=dS)�)�absolute_importN)�error��timeout�)� BaseSSLError�BrokenPipeError�DummyConnection�HTTPConnection� HTTPException�HTTPSConnection�VerifiedHTTPSConnection�port_by_scheme) �ClosedPoolError�EmptyPoolError�HeaderParsingError�HostChangedError�InsecureRequestWarning�LocationValueError� MaxRetryError�NewConnectionError� ProtocolError� ProxyError�ReadTimeoutError�SSLError� TimeoutError)�six)�queue)�CertificateError)�RequestMethods)� HTTPResponse)�is_connection_dropped)�connection_requires_http_tunnel)� LifoQueue)�set_file_position)�assert_header_parsing)�Retry)�Timeout)�Url�_encode_target)�_normalize_host)�get_host� parse_urlc�:�eZdZdZdZeZdd�Zd�Zd�Z d�Z d�Z dS) �ConnectionPoola; Base class for all connection pools, such as :class:`.HTTPConnectionPool` and :class:`.HTTPSConnectionPool`. .. note:: ConnectionPool.urlopen() does not normalize or percent-encode target URIs which is useful if your target server doesn't support percent-encoded target URIs. Nc��|std���t||j���|_|���|_||_dS)NzNo host specified.��scheme)rr+r2�host�lower� _proxy_host�port)�selfr3r6s ��/builddir/build/BUILDROOT/alt-python311-pip-21.3.1-4.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_vendor/urllib3/connectionpool.py�__init__zConnectionPool.__init__JsJ��� ;�$�%9�:�:� :�#�D���=�=�=�� ��:�:�<�<����� � � �c�P�t|��j�d|j�d|j�d�S)Nz(host=z, port=�))�type�__name__r3r6�r7s r8�__str__zConnectionPool.__str__Rs*��)-�d���)<�)<�)<�d�i�i�i�����S�Sr:c��|S�N�r?s r8� __enter__zConnectionPool.__enter__Us��� r:c�.�|���dS)NF)�close)r7�exc_type�exc_val�exc_tbs r8�__exit__zConnectionPool.__exit__Xs�� � � � � � ��ur:c��dS)�D Close all pooled connections and disable the pool. NrCr?s r8rFzConnectionPool.close]� �� �r:rB) r>� __module__� __qualname__�__doc__r2r$�QueueClsr9r@rDrJrFrCr:r8r/r/<s}���������F��H�����T�T�T�������  � � � � r:r/c ��eZdZdZdZeZeZdde j dddddddf d�Z d�Z dd�Z d �Zd �Zd �Zd �Zd �Zedfd�Zd�Zd�Zd�Zdddddeddddf d�ZdS)�HTTPConnectionPoola: 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. �httpNFrc  �v�t�|||��tj||��||_t |t ��st j|��}|� tj}||_ ||_ |� |��|_ ||_ | |_| pi|_| |_t#|��D]} |j �d���d|_d|_| |_|jr;|j�dg��|j|jd<|j|jd<dSdS)Nr�socket_options�proxy� proxy_config)r/r9r �strict� isinstancer(� from_floatr'�DEFAULTr�retriesrQ�pool�blockrW� proxy_headersrX�xrange�put�num_connections� num_requests�conn_kw� setdefault)r7r3r6rYr�maxsizer_�headersr]�_proxy�_proxy_headers� _proxy_configre�_s r8r9zHTTPConnectionPool.__init__�sA�� ����d�D�1�1�1����g�.�.�.��� ��'�7�+�+� 2��(��1�1�G� �?��m�G��� ��� ��M�M�'�*�*�� ��� ��� �+�1�r���)������� � �A� �I�M�M�$� � � � � !�������� � �:� =� �L� #� #�$4�b� 9� 9� 9�$(�J�D�L�� !�+/�+<�D�L�� (� (� (� =� =r:c���|xjdz c_t�d|j|j|jpd��|jd|j|j|jj|jd�|j ��}|S)z9 Return a fresh :class:`HTTPConnection`. rz(Starting new HTTP connection (%d): %s:%s�80)r3r6rrYrC) rc�log�debugr3r6� ConnectionClsr�connect_timeoutrYre�r7�conns r8� _new_connzHTTPConnectionPool._new_conn�s��� ����!��� � � � 6� � � �I� �I� ��  � � �"�t�!� ������L�0��;�  � � �l�  � ��� r:c��d} |j�|j|���}nE#t$rt |d���t j$r|jrt|d���YnwxYw|rZt|��rKt� d|j ��|� ��t|dd��dkrd}|p|���S) a� 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``. N)r_rzPool is closed.z>Pool reached maximum size and no more connections are allowed.z Resetting dropped connection: %s� auto_openrr)r^�getr_�AttributeErrorrr�Emptyrr"rorpr3rF�getattrru)r7rrts r8� _get_connzHTTPConnectionPool._get_conn�s���� ��9�=�=�t�z�7�=�C�C�D�D��� ;� ;� ;�!�$�(9�:�:� :��{� � � ��z� �$��T���� �D�  ���� � �)�$�/�/� � �I�I�8�$�)� D� D� D� �J�J�L�L�L��t�[�!�,�,��1�1����'�t�~�~�'�'�'s�!&�?A(�'A(c��� |j�|d���dS#t$rYn4tj$r#t �d|j��YnwxYw|r|���dSdS)a� 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. F�r_Nz2Connection pool is full, discarding connection: %s) r^rbryr�Fullro�warningr3rFrss r8� _put_connzHTTPConnectionPool._put_conns��� Y� �I�M�M�$�e�M� ,� ,� ,� �F��� � � � �D��z� Y� Y� Y� �K�K�L�d�i� X� X� X� X� X� Y���� � � �J�J�L�L�L�L�L� � s� � A�.A�Ac��dS)�U Called right before a request is made, after the socket is created. NrCrss r8�_validate_connz!HTTPConnectionPool._validate_conn6rMr:c��dSrBrCrss r8�_prepare_proxyz!HTTPConnectionPool._prepare_proxy<s�� �r:c���|tur|j���St|t��r|���St j|��S)z:Helper that always returns a :class:`urllib3.util.Timeout`)�_Defaultr�clonerZr(r[)r7rs r8� _get_timeoutzHTTPConnectionPool._get_timeout@sT�� �h� � ��<�%�%�'�'� '� �g�w� '� '� /��=�=�?�?� "��%�g�.�.� .r:c�(�t|t��rt||d|z���t|d��r"|jt vrt||d|z���dt |��vsdt |��vrt||d|z���dS)zAIs the error actually a timeout? Will raise a ReadTimeout or pass�!Read timed out. (read timeout=%s)�errnoz timed outzdid not complete (read)N)rZ� SocketTimeoutr�hasattrr��_blocking_errnos�str)r7�err�url� timeout_values r8�_raise_timeoutz!HTTPConnectionPool._raise_timeoutLs��� �c�=� )� )� �"��c�>��N��� � �3�� � � �S�Y�2B�%B�%B�"��c�>��N��� � �#�c�(�(� "� "�&?�3� �D �D �' �' �#��c�>��N��� �' �' r:c ���|xjdz c_|�|��}|���|j|_ |�|��n7#t tf$r#}|�|||j����d}~wwxYw |r|j ||fi|��n|j ||fi|��nM#t$rYnAt$r5}|j tjtjtjhvr�Yd}~nd}~wwxYw|j} t%|dd��rn| dkrt'||d| z���| t(jur,|j�t1j����n|j�| �� |�d���} nR#t6$rE |���} n,#t8$r}t;j|d��Yd}~nd}~wwxYwYnwxYwn8#t tt>f$r}|�||| ����d}~wwxYwt%|d d ��} t@�!d |j"|j#|j$||| | j%| j&� �  tO| j(��nO#tRt6f$r;} t@�*d |�+|��| d� ��Yd} ~ nd} ~ wwxYw| S)a 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. r)r�r�r�N�sockrr�T)� buffering� _http_vsn_strzHTTP/?z%s://%s:%s "%s %s %s" %s %sz$Failed to parse headers (url=%s): %s)�exc_info),rdr�� start_connectrrrr�r�rr��request_chunked�requestr �IOErrorr��EPIPE� ESHUTDOWN� EPROTOTYPE� read_timeoutr{rr(�DEFAULT_TIMEOUTr�� settimeout�socket�getdefaulttimeout� getresponse� TypeError� BaseExceptionr� raise_from� SocketErrorrorpr2r3r6�status�lengthr&�msgrr�� _absolute_url) r7rt�methodr�r�chunked�httplib_request_kw� timeout_obj�er��httplib_response� http_version�hpes r8� _make_requestz HTTPConnectionPool._make_requestes���" ���Q�����'�'��0�0� ��!�!�#�#�#�"�2�� � � � � �� %� %� %� %���|�,� � � � � � �A�3�d�l� � K� K� K� ����� ���� �� @�$��$�V�S�G�G�4F�G�G�G�G��� �V�S�?�?�,>�?�?�?��� � � � � �D�� � � ��w�� ���� ���� � ��������� ����#�/� � �4��� &� &� 3� �q� � �&��#�B�\�Q�����w�6�6�6�� �$�$�V�%=�%?�%?�@�@�@�@�� �$�$�\�2�2�2� � ,�#'�#3�#3�d�#3�#C�#C� � ��� ,� ,� ,�,�'+�'7�'7�'9�'9�$�$��$�,�,�,��N�1�d�+�+�+�+�+�+�+�+����� ,������  ,�������|�[�9� � � � � � �A�3�l� � K� K� K� ����� ���� �t�_�h�?�?� � � � � )� �K� �I� �I� � � � � #� � #� � � � � !�"2�"6� 7� 7� 7� 7��"�I�.� � � � �K�K�6��"�"�3�'�'��� � � � � � � � � ����� ���� �s��A�B�.B � B�!B7�7 D� D� +C<�<D� F#�"G6�# G2�.G�G2� G,� G'�"G2�'G,�,G2�/G6�1G2�2G6�6H+� H&�&H+�;J�K�!1K�Kc�P�t|j|j|j|���jS)N)r2r3r6�path)r)r2r3r6r�)r7r�s r8r�z HTTPConnectionPool._absolute_url�s"���$�+�D�I�D�I�D�Q�Q�Q�U�Ur:c��|j�dS|jdc}|_ |�d���}|r|����-#tj$rYdSwxYw)rLNTFr~)r^rxrFrrz)r7�old_poolrts r8rFzHTTPConnectionPool.close�s~�� �9� � �F�"�i����$�)� � !��|�|�%�|�0�0���!��J�J�L�L�L� !�� �{� � � � �D�D� ���s�.A�A�Ac�0�|�d��rdSt|��\}}}|�t||���}|jr|st j|��}n!|js|t j|��krd}|||f|j|j|jfkS)zj Check if the given ``url`` is a member of the same host as this connection pool. �/TNr1)� startswithr,r+r6rrxr2r3)r7r�r2r3r6s r8� is_same_hostzHTTPConnectionPool.is_same_host�s��� �>�>�#� � � ��4�&�c�]�]����d� � �"�4��7�7�7�D� �9� �T� �!�%�f�-�-�D�D��� �t�~�'9�&�'A�'A�A�A��D���d�#�� �T�Y�� �'J�J�Jr:Tc �� �t|��}|j}|�|j}t|t��st j|||j���}| �| �dd��} |r&|�|��st|||���|� d��r"tj t|����}ntj |j��}d}| }t|j|j|��}|s.|���}|�|j��d}d}t+|| ��} |�|��}|�| ���}|j|_|jduot5|dd�� }|r|r|�|��|�||||||| � ��}| s|nd}|| d <|jj|f|||d �| ��}d}�n#t>$rd}d}�t@tBtDtFtHtJtLf$r�}d}t|tHtLf��rtK|��}n`t|tDtNf��r|jrtQd |��}n,t|tDtBf��rtGd |��}|�)||||tUj+��d���}|�,��|}Yd}~nd}~wwxYw|s|o|�-��}d}|r|�.|��n7#|s|o|�-��}d}|r|�.|��wwxYw|s7t^�0d|||��|j1|||||||f|| | | | d�| ��S|o|�2��}|r�|j3dkrd} |�)||||���}n.#th$r!|j5r|�6���|cYSwxYw|�6��|�7|��t^�8d||��|j1||||f||||| | | | d�| ��Sts|�:d����}|�;||j3|��r� |�)||||���}n.#th$r!|j<r|�6���|cYSwxYw|�6��|�,|��t^�8d|��|j1||||f||||| | | | d�| ��S|S)a+ 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` N)�redirect�default�preload_contentTr�Frr�)r�bodyrhr��request_method)r^� connectionr]zCannot connect to proxy.zConnection aborted.�)r�_pool� _stacktracez1Retrying (%r) after connection broken by '%r': %s)r� pool_timeout� release_connr��body_posi/�GET)�responser�zRedirecting %s -> %s)r]r��assert_same_hostrr�r�r�r�z Retry-Afterz Retry: %s)=r-r2rhrZr'�from_intr]rxr�rr�r� ensure_strr*r�r#rWrX�copy�updater`r%r�r|rrrr{r�r�� ResponseCls� from_httplibrrr r�rrrrrr� increment�sysr��sleeprFr�ror��urlopen�get_redirect_locationr�r�raise_on_redirect� drain_conn�sleep_for_retryrp�bool� getheader�is_retry�raise_on_status)r7r�r�r�rhr]r�r�rr�r�r�r�� response_kw� parsed_url�destination_schemert�release_this_conn�http_tunnel_requiredr�� clean_exitr��is_new_proxy_connr�� response_connr�r��redirect_location�has_retry_afters r8r�zHTTPConnectionPool.urlopens���Z�s�^�^� �'�.�� �?��l�G��'�5�)�)� W��n�W�x���V�V�V�G� � �&�?�?�+<�d�C�C�L� � 7�D�$5�$5�c�$:�$:� 7�"�4��g�6�6� 6� �>�>�#� � � 1��.���!4�!4�5�5�C�C��.���0�0�C���)��>� �J��)�+=� � ��$� /��l�l�n�n�G� �N�N�4�-� .� .� .���� �%�T�8�4�4��[ %��+�+�G�4�4�K��>�>�,�>�7�7�D�&�6�D�L� $� �$� 6�!�w��f�d�@�@�<� �!� *�%9� *��#�#�D�)�)�)� $�1�1����#���� 2� � � �)5�>�D�D�$�M�-3�K�(� )�5�t�'�4� ���(�� �� � ��H��J�J��� � � ��J� %� � � � � � � � � � � � � ��J��!�l�,<�=�>�>� <��Q�K�K����A� �-?�@�A�A� <�d�j� <��9�1�=�=����A� �]�;�<�<� <�!�"7��;�;���'�'���1�D�c�l�n�n�Q�>O�(���G� �M�M�O�O�O��C�C�C�C�C�C�����3 ����8� )� �,�� � � � ��$(�!� � %����t�$�$�$���� )� �,�� � � � ��$(�!� � %����t�$�$�$�$�  %���� � � �K�K�C�W�c�SV� � � � �4�<������� �� �)�)��!������ �"%�I��)G�)G�)I�)I�� � ���#�%�%��� �!�+�+�F�C�(�RV�+�W�W���� � � � ��,���'�'�)�)�)������  ���� � � � !� !� !� � #� #�H� -� -� -� �I�I�,�c�3D� E� E� E��4�<��!��� �  �!�!1��)�)��!������ �"�x�1�1�-�@�@�A�A�� � � �F�H�O�_� E� E� � �!�+�+�F�C�(�RV�+�W�W���� � � � ��*���'�'�)�)�)������  ���� � � � !� !� !� �M�M�(� #� #� #� �I�I�k�3� '� '� '��4�<����� �  �!�!1��)�)��!������ � �sV�B+G2�0M�2=L�/CL �M� L�M�4M7�O3�3(P�P�?S�(T�TrB)r>rNrOrPr2r rqr!r�r(r�r9rur|r�r�r�r�r�r�r�r�rFr�r�rCr:r8rSrShsd������9�9�v�F�"�M��K� ���'��������4=�4=�4=�4=�l���*%(�%(�%(�%(�N���8 � � �  � � � /� /� /����4*2�5�u �u �u �u �nV�V�V����$K�K�K�2����������X�X�X�X�X�Xr:rSc�r��eZdZdZdZeZddejdddddddddddddddfd�Z d�Z d�Z d �Z �fd �Z �xZS) �HTTPSConnectionPoola Same as :class:`.HTTPConnectionPool`, but HTTPS. :class:`.HTTPSConnection` uses one of ``assert_fingerprint``, ``assert_hostname`` and ``host`` in this order to verify connections. If ``assert_hostname`` is False, no verification is done. The ``key_file``, ``cert_file``, ``cert_reqs``, ``ca_certs``, ``ca_cert_dir``, ``ssl_version``, ``key_password`` are only used if :mod:`ssl` is available and are fed into :meth:`urllib3.util.ssl_wrap_socket` to upgrade the connection socket into an SSL socket. �httpsNFrc ��tj|||||||||| | f i|��| |_| |_| |_||_||_||_||_||_ ||_ dSrB) rSr9�key_file� cert_file� cert_reqs� key_password�ca_certs� ca_cert_dir� ssl_version�assert_hostname�assert_fingerprint)r7r3r6rYrrgr_rhr]rirjr�r�r�r�r�r�r�r�r�res r8r9zHTTPSConnectionPool.__init__rs���0 �#� � � � � � � � � � � � � �� � � �!�� �"���"���(��� �� �&���&���.���"4����r:c ���t|t��rQ|�|j|j|j|j|j|j|j |j ���|j |_ |S)z� Prepare the ``connection`` for :meth:`urllib3.util.ssl_wrap_socket` and establish the tunnel if proxy is used. )r�r�r�r�r�r�r�r�) rZr�set_certr�r�r�r�r�r�r�r�r�rss r8� _prepare_connz!HTTPSConnectionPool._prepare_conn�sp�� �d�3� 4� 4� 0� �M�M���!�.��.��.��� �,� $� 4�#'�#:� � � � � $�/�D� �� r:c��|�|j|j|j��|jjdkrd|_|���dS)z� Establishes a tunnel connection through HTTP CONNECT. Tunnel connection is established early because otherwise httplib would improperly set Host: header to proxy's IP:port. r�TN)� set_tunnelr5r6r`rWr2�tls_in_tls_required�connectrss r8r�z"HTTPSConnectionPool._prepare_proxy�sK�� ����(�$�)�T�5G�H�H�H� �:� �� '� '�'+�D� $� � � �����r:c ��|xjdz c_t�d|j|j|jpd��|jr|jt urtd���|j}|j}|j�|jj}|jj}|jd|||j j |j |j |j |jd�|j��}|�|��S)zF Return a fresh :class:`http.client.HTTPSConnection`. rz)Starting new HTTPS connection (%d): %s:%s�443zCCan't connect to HTTPS URL because the SSL module is not available.N)r3r6rrYr�r�r�rC)rcrorpr3r6rqr rrWrrrrYr�r�r�rer�)r7� actual_host� actual_portrts r8ruzHTTPSConnectionPool._new_conn�s�� ����!��� � � � 7� � � �I� �I� ��  � � ��!� �T�%7�?�%J�%J��U��� ��i� ��i� � �:� !��*�/�K��*�/�K�!�t�!�  ����L�0��;��n��]��*�  �  ��l�  �  ���!�!�$�'�'�'r:c�R��tt|���|��t|dd��s|���|js"t jd|jzt��t|dd��durt jdt��dSdS)r�r�Nz�Unverified HTTPS request is being made to host '%s'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings�proxy_is_verifiedFz�Unverified HTTPS connection done to an HTTPS proxy. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings) �superr�r�r{r� is_verified�warnings�warnr3r)r7rt� __class__s �r8r�z"HTTPSConnectionPool._validate_conn�s���� �!�4�(�(�7�7��=�=�=��t�V�T�*�*� � �L�L�N�N�N��� � �M�$�'+�i�0� '� � � � �4�,�d� 3� 3�u� <� <� �M�$� '� � � � � � =� rNrOrPr2r rqr(r�r9r�r�rur�� __classcell__)r s@r8r�r�as�������� � ��F�#�M� ���'����������������)/5�/5�/5�/5�b���( � � �"(�"(�"(�H��������r:r�c ��t|��\}}}|ptj|d��}|dkrt|fd|i|��St |fd|i|��S)a� Given a url, return an :class:`.ConnectionPool` instance of its host. This is a shortcut for not having to parse out the scheme, host, and port of the url before creating an :class:`.ConnectionPool` instance. :param url: Absolute URL string that must include the scheme. Port is optional. :param \**kw: Passes additional parameters to the constructor of the appropriate :class:`.ConnectionPool`. Useful for specifying things like timeout, maxsize, headers, etc. Example:: >>> conn = connection_from_url('http://google.com/') >>> r = conn.request('GET', '/') �Pr�r6)r,rrxr�rS)r��kwr2r3r6s r8�connection_from_urlr sn��("�#����F�D�$� � 1�>�%�f�b�1�1�D� ����"�4�9�9�d�9�b�9�9�9�!�$�8�8�T�8�R�8�8�8r:c��t||��}|�d��r|�d��r |dd�}|S)z? Normalize hosts for comparisons and use with sockets. �[�]r�����)�normalize_hostr��endswith)r3r2s r8r+r+'sN�� �$�� '� '�D� ���s����� � �c� 2� 2���A�b�D�z�� �Kr:)O� __future__rr��loggingr�r�r rr�rr�r�rr r r r r rr� exceptionsrrrrrrrrrrrrr�packagesr�packages.six.movesr�packages.ssl_match_hostnamerr�r r�r!�util.connectionr"� util.proxyr#� util.queuer$� util.requestr%� util.responser&� util.retryr'� util.timeoutr(�util.urlr)r*r+rr,r-�movesra� getLoggerr>ro�objectr�r/�EAGAIN� EWOULDBLOCKr�rSr�rrCr:r8�r*ss��&�&�&�&�&�&� � � � ����� � � � � � � � �����'�'�'�'�'�'�+�+�+�+�+�+� � � � � � � � � � � � � � � � � � � � �������������������������������������%�%�%�%�%�%�9�9�9�9�9�9�#�#�#�#�#�#�"�"�"�"�"�"�2�2�2�2�2�2�7�7�7�7�7�7�!�!�!�!�!�!�+�+�+�+�+�+�0�0�0�0�0�0�������!�!�!�!�!�!�)�)�)�)�)�)�)�)�7�7�7�7�7�7�)�)�)�)�)�)�)�)� �� ���g���!�!�� �6�8�8��% �% �% �% �% �V�% �% �% �R�L�%�"3�4��v �v �v �v �v ���v �v �v �rg�g�g�g�g�,�g�g�g�T9�9�9�8����r: