Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/urllib3/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/urllib3/__pycache__/connectionpool.cpython-311.pyc

�

�܋fѧ����ddlmZddlZddlZddlZddlZddlZddlZddlZddl	m
Zddlm
Z
ddlmZddlmZddlmZmZmZmZmZmZmZmZdd	lmZdd
lmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)ddl*m+Z+ddl,m-Z-dd
l.m/Z/ddl0m1Z1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8m9Z9m:Z:ddl;m<Z<m=Z=ddl;m>Z?ddl;m@Z@ddlAmBZBejCrddlDZDddlEmFZFddlmGZGmHZHejIeJ��ZKejLe:eMe9dfZNejOd��ZPGd�d��ZQejRejShZTGd�deQe��ZUGd�deU��ZVd2d$�ZWejXd3d)���Z>ejXd4d*���Z>d5d+�Z>	d6d7d/�ZYd8d1�ZZdS)9�)�annotationsN��timeout)�
TracebackType�)�
_TYPE_BODY)�RequestMethods)�BaseSSLError�BrokenPipeError�DummyConnection�HTTPConnection�
HTTPException�HTTPSConnection�ProxyConfig�_wrap_proxy_error)�port_by_scheme)
�ClosedPoolError�EmptyPoolError�
FullPoolError�HostChangedError�InsecureRequestWarning�LocationValueError�
MaxRetryError�NewConnectionError�
ProtocolError�
ProxyError�ReadTimeoutError�SSLError�TimeoutError)�BaseHTTPResponse)�is_connection_dropped)�connection_requires_http_tunnel)�_TYPE_BODY_POSITION�set_file_position)�Retry)�CertificateError)�_DEFAULT_TIMEOUT�
_TYPE_DEFAULT�Timeout)�Url�_encode_target)�_normalize_host)�	parse_url)�to_str)�Literal)�BaseHTTPConnection�BaseHTTPSConnection�_SelfTc�Z�eZdZUdZdZded<ejZddd�Z	dd�Z
dd�Zdd�Zdd�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.
    N�
str | None�scheme�host�str�port�
int | None�return�Nonec���|std���t||j���|_||_t||j������|_dS)NzNo host specified.�r6)rr,r6r7r9�normalize_host�lower�_tunnel_host)�selfr7r9s   �M/opt/cloudlinux/venv/lib64/python3.11/site-packages/urllib3/connectionpool.py�__init__zConnectionPool.__init__Rsa���	;�$�%9�:�:�:�#�D���=�=�=��	���	�+�4���D�D�D�J�J�L�L�����c�P�t|��j�d|j�d|j�d�S)Nz(host=z, port=�))�type�__name__r7r9�rBs rC�__str__zConnectionPool.__str___s.���t�*�*�%�O�O�T�Y�O�O���O�O�O�OrErBr2c��|S�N�rJs rC�	__enter__zConnectionPool.__enter__bs���rE�exc_type�type[BaseException] | None�exc_val�BaseException | None�exc_tb�TracebackType | None�Literal[False]c�.�|���dS)NF)�close)rBrPrRrTs    rC�__exit__zConnectionPool.__exit__es��	
�
�
�����urEc��dS�zD
        Close all pooled connections and disable the pool.
        NrNrJs rCrXzConnectionPool.closeo����rErM)r7r8r9r:r;r<)r;r8)rBr2r;r2)rPrQrRrSrTrUr;rV�r;r<)rI�
__module__�__qualname__�__doc__r6�__annotations__�queue�	LifoQueue�QueueClsrDrKrOrYrXrNrErCr4r4Ds�����������F�������H�M�M�M�M�M�P�P�P�P��������������rEr4c���eZdZUdZdZeZded<dedddddddf	dHd�Z	dId �Z
dJdKd"�ZdLd&�ZdMd'�Z
dMd(�ZdNd+�ZdOd0�Zdddeddd1d1d1f	dPd<�ZdQd=�ZdRd>�Zdddd1d1eddddd1d1fdSdG�ZdS)T�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 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.
    �httpz4type[BaseHTTPConnection] | type[BaseHTTPSConnection]�
ConnectionClsNrFr7r8r9r:r�_TYPE_TIMEOUT | None�maxsize�int�block�bool�headers�typing.Mapping[str, str] | None�retries�Retry | bool | int | None�_proxy�
Url | None�_proxy_headers�
_proxy_config�ProxyConfig | None�conn_kw�
typing.Anyc��t�|||��tj||��t|t��st	j|��}|�tj}||_||_	|�
|��|_||_||_
|	pi|_|
|_t!|��D]}|j�d���d|_d|_||_|j
r9|j�dg��|j
|jd<|j|jd<|j}
t-j|t0|
��dS)Nr�socket_options�proxy�proxy_config)r4rDr	�
isinstancer)�
from_floatr%�DEFAULTrrprd�poolrlr{�
proxy_headersr|�range�put�num_connections�num_requestsrw�
setdefault�weakref�finalize�_close_pool_connections)rBr7r9rrjrlrnrprrrtrurw�_r�s              rCrDzHTTPConnectionPool.__init__�sQ��	����d�D�1�1�1����g�.�.�.��'�7�+�+�	2��(��1�1�G��?��m�G�������8<�
�
�g�8N�8N��	���
���
�+�1�r���)����w���	 �	 �A��I�M�M�$����� !����������:�	=�
�L�#�#�$4�b�9�9�9�$(�J�D�L��!�+/�+<�D�L��(��y��	���6��=�=�=�=�=rEr;r0c���|xjdz
c_t�d|j|j|jpd��|jd|j|j|jjd�|j��}|S)z9
        Return a fresh :class:`HTTPConnection`.
        rz(Starting new HTTP connection (%d): %s:%s�80)r7r9rrN)	r��log�debugr7r9rhr�connect_timeoutrw�rB�conns  rC�	_new_connzHTTPConnectionPool._new_conn�s���	
����!����	�	�6�� ��I��I���		
�	
�	
�"�t�!�
������L�0�
�
��l�	
�
���rE�float | Nonec��d}|j�t|d���	|j�|j|���}nG#t$rt|d��d�t
j$r|jrt|d��d�YnwxYw|rCt|��r4t�
d|j��|���|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``.
        NzPool is closed.)rlrzHPool is empty and a new connection can't be opened due to blocking mode.z Resetting dropped connection: %s)r�r�getrl�AttributeErrorrb�Emptyrr!r�r�r7rXr�)rBrr�s   rC�	_get_connzHTTPConnectionPool._get_conns�����9��!�$�(9�:�:�:�	��9�=�=�t�z�7�=�C�C�D�D���	E�	E�	E�!�$�(9�:�:��D��{�	�	�	��z�
�$��^�����
�D�
	�����	�)�$�/�/�	��I�I�8�$�)�D�D�D��J�J�L�L�L��'�t�~�~�'�'�'s�!=�AB�Br��BaseHTTPConnection | Noner<c��|j��	|j�|d���dS#t$rYnztj$ri|r|���|jrt|d��d�t�	d|j
|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.
        NF�rlz>Pool reached maximum size and no more connections are allowed.zLConnection pool is full, discarding connection: %s. Connection pool size: %s)r�r�r�rb�FullrXrlrr��warningr7�qsizer�s  rC�	_put_connzHTTPConnectionPool._put_conn)s����9� �
��	�
�
�d�%�
�0�0�0����!�
�
�
����:�
�
�
��!��J�J�L�L�L��:� �'��X��� � �
���b��I��I�O�O�%�%������
����&�	��J�J�L�L�L�L�L�	�	s�'�
B*�A4B*�)B*c��dS)�U
        Called right before a request is made, after the socket is created.
        NrNr�s  rC�_validate_connz!HTTPConnectionPool._validate_connTr\rEc��dSrMrNr�s  rC�_prepare_proxyz!HTTPConnectionPool._prepare_proxyYs���rE�
_TYPE_TIMEOUTr)c��|tur|j���St|t��r|���St	j|��S)z:Helper that always returns a :class:`urllib3.util.Timeout`)r'r�cloner}r)r~)rBrs  rC�_get_timeoutzHTTPConnectionPool._get_timeout]sU���&�&�&��<�%�%�'�'�'��g�w�'�'�	/��=�=�?�?�"��%�g�.�.�.rE�err�&BaseSSLError | OSError | SocketTimeout�url�
timeout_valuec���t|t��rt||d|�d���|�t|d��r$|jt
vrt||d|�d���|�dSdS)zAIs the error actually a timeout? Will raise a ReadTimeout or pass�Read timed out. (read timeout=rG�errnoN)r}�
SocketTimeoutr�hasattrr��_blocking_errnos)rBr�r�r�s    rC�_raise_timeoutz!HTTPConnectionPool._raise_timeoutis����c�=�)�)�	�"��c�L�M�L�L�L����
�
�3�� � �	�S�Y�2B�%B�%B�"��c�L�M�L�L�L����
�	�	�%B�%BrET�method�body�_TYPE_BODY | None�Retry | None�chunked�
response_conn�preload_content�decode_content�enforce_content_lengthr c
��|xjdz
c_|�|��}
|
���tj|
j��|_		|�|��n7#ttf$r#}|�
|||j����d}~wwxYwn�#ttttttf$r�}|}t!|ttf��rt|��}t!|ttttf��r*|r(|jr!|jst'||jj��}|�d}~wwxYw	|�||||||
||���n8#t,$rYn,t$r }|jt.jkr�Yd}~nd}~wwxYw|
j}|js"|dkrt7||d|�d����||_	|���}n2#ttf$r}|�
|||����d}~wwxYw||_|	|_||_t@�!d|j|j"|j#|||j$|j%|j&�	�	|S)	a8

        Perform a request on a given urllib connection object taken from our
        pool.

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

        :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 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 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 response_conn:
            Set this to ``None`` if you will handle releasing the connection or
            set the connection to have the response release it.

        :param preload_content:
          If True, the response's body will be preloaded during construction.

        :param decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.

        :param enforce_content_length:
            Enforce content length checking. Body returned by server must match
            value of Content-Length header, if present. Otherwise, raise error.
        r�r�r�r�N)r�rnr�r�r�r�rr�rGz%s://%s:%s "%s %s %s" %s %s)'r�r��
start_connectr)�resolve_default_timeoutr�rr�r�r
r��OSErrorrrr&rr}r{�has_connected_to_proxyrr6�requestrr��
EPROTOTYPE�read_timeout�	is_closedr�getresponserp�_connection�_poolr�r�r7r9�
_http_vsn_str�status�length_remaining)rBr�r�r�r�rnrprr�r�r�r�r��timeout_obj�e�new_er��responses                  rC�
_make_requestz HTTPConnectionPool._make_request|s��\	
���Q�����'�'��0�0���!�!�#�#�#��6�{�7R�S�S���	�
��#�#�D�)�)�)�)��!�<�0�
�
�
��#�#��s�$�,�#�O�O�O������
����*��
������

�	�	�	� !�E��!�l�,<�=�>�>�
$� ��������!3�\�8�L���
D��
D� �J�
D�/3�/J�
D�*�%���1B�C�C���K�����#	����*	��L�L������ /�-�'=�
�	
�	
�	
�	
���	�	�	��D��	�	�	��w�%�*�*�*��+�*�*�*�*�����		����#�/���~�
	(��q� � �&��#�O��O�O�O����(�D�L�	��'�'�)�)�H�H���g�&�	�	�	����A�3�l��K�K�K������	����
#���,�������	�	�)��K��I��I������O��%�	
�	
�	
��sm�A0�/B(�0B$�B�B$�$B(�()E�BE�E�E9�9
F.�	F.�F)�)F.�"G7�7H&�H!�!H&c�T�|j�dS|jdc}|_t|��dSr[)r�r�)rB�old_pools  rCrXzHTTPConnectionPool.close1s7���9���F�"�i����$�)�	 ��)�)�)�)�)rEc�:�|�d��rdSt|��^}}}}}|pd}|�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.
        �/TrgNr>)�
startswithr-r,r9rr�r6r7)rBr�r6r�r7r9s      rC�is_same_hostzHTTPConnectionPool.is_same_host=s���
�>�>�#���	��4�%.�c�N�N�!���4����!�6����"�4��7�7�7�D��9�	�T�	�!�%�f�-�-�D�D���	�t�~�'9�&�'A�'A�A�A��D���d�#���T�Y��	�'J�J�JrE�redirect�assert_same_host�pool_timeout�release_conn�bool | None�body_pos�_TYPE_BODY_POSITION | None�response_kwc�@�t|��}|j}|�|j}t|t��st	j|||j���}|
�|
}
|r&|�|��st|||���|�	d��rtt|����}nt|j��}d}|
}t|j|j|��}|s.|���}|�|j��d}d}t'||��}	|�|��}|�|	���}|j|_|j�g|re|jr^	|�|��nG#t4t6t8f$r-}|�||jj|j����d}~wwxYw|
s|nd}|j|||f|||||||
|d�|��}d}�nL#t>$rd}d}�t@tBt6tDt4tFtHtJf$�r}d}|}t|t4tHf��rtG|��}t|t6tLt@tFtBf��r+|r)|jr"|j'stQ||jj��}n,t|t6tBf��rtEd	|��}|�)||||tUj+��d
���}|�,��|}Yd}~nd}~wwxYw|s|r|�-��d}d}|r|�.|��n9#|s|r|�-��d}d}|r|�.|��wwxYw|s9t^�0d|||��|j1|||||||f||	|
|||
|d
�|��S|o|�2��}|r�|j3dkrd}	|�)||||���}n.#th$r!|j5r|�6���|cYSwxYw|�6��|�7|��t^�8d||��|j1||||f|||||	|
|||
|d�
|��Sts|j�:d����}|�;||j3|��r�	|�)||||���}n.#th$r!|j<r|�6���|cYSwxYw|�6��|�,|��t^�8d|��|j1||||f|||||	|
|||
|d�
|��S|S)ay
        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
           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 bool preload_content:
            If True, the response's body will be preloaded into memory.

        :param bool decode_content:
            If True, will attempt to decode the body based on the
            'content-encoding' header.

        :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 ``preload_content``
            which defaults to ``True``.

        :param bool 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.
        N)r��defaultr�Frr�)rr�rnr�rpr�r�r�TzConnection aborted.�)�errorr��_stacktracez1Retrying (%r) after connection broken by '%r': %s)rr�r�r�r�r�r�i/�GET)r�r�zRedirecting %s -> %s)
rpr�r�rr�r�r�r�r�r�zRetry-Afterz	Retry: %s)=r-r6rnr}r%�from_intrpr�rr�r.r+r�r"r{r|�copy�updater�r$r�r�r�rr�r�r
r�r�r�r�rrrrrr&rrr�r�	increment�sys�exc_info�sleeprXr�r�r��urlopen�get_redirect_locationr�r�raise_on_redirect�
drain_conn�sleep_for_retryr�rmr��is_retry�raise_on_status)rBr�r�r�rnrpr�r�rr�r�r�r�r�r�r��
parsed_url�destination_schemer��release_this_conn�http_tunnel_requiredr��
clean_exitr�r�r�r�r��redirect_location�has_retry_afters                              rCr�zHTTPConnectionPool.urlopenSsY��b�s�^�^�
�'�.���?��l�G��'�5�)�)�	W��n�W�x���V�V�V�G���*�L��	7�D�$5�$5�c�$:�$:�	7�"�4��g�6�6�6��>�>�#���	)����,�,�-�-�C�C����(�(�C���)��>��J��)�+=� 
� 
��$�	/��l�l�n�n�G��N�N�4�-�.�.�.����
�%�T�8�4�4��e	%��+�+�G�4�4�K��>�>�,�>�7�7�D�&�6�D�L��z�%�*>�%�4�>�%���'�'��-�-�-�-��$�g�}�=�����'�'��4�:�>���(���������	����)5�>�D�D�$�M�*�t�)����
�$�����+� /�-�
�
��
�
�H� �J�J���	�	�	��J� %���
��������	
�$	�$	�$	��J� �E��!�l�,<�=�>�>�
$� ��������&� ��!��	�	�
D��
D�!�J�
D�04�/J�
D�*�%���1B�C�C����E�G�]�#;�<�<�
D�%�&;�U�C�C���'�'���5��#�,�.�.�QR�BS�(���G�
�M�M�O�O�O��C�C�C�C�C�C�����I$	����N�
)�
� ��J�J�L�L�L��D�$(�!� �
%����t�$�$�$����
)�
� ��J�J�L�L�L��D�$(�!� �
%����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�/�3�3�M�B�B�C�C�����F�H�O�_�E�E�	�
 �!�+�+�F�C�(�RV�+�W�W���� �
 �
 �
 ��*���'�'�)�)�)������	
 ����
���!�!�!��M�M�(�#�#�#��I�I�k�3�'�'�'��4�<�����	�
 �!�!1��)�)��!� /�-������
�$�s{�'AG/�/F�G/�G	�(G�G	�	$G/�-M/�/AL8�3C;L3�.M/�3L8�8M/�/6N%�	P#�#(Q�
Q�6T�(T;�:T;)r7r8r9r:rrirjrkrlrmrnrorprqrrrsrtrorurvrwrx)r;r0rM)rr�r;r0)r�r�r;r<�r�r0r;r<)rr�r;r))r�r�r�r8r�rir;r<)r�r0r�r8r�r8r�r�rnrorpr�rr�r�rmr�r�r�rmr�rmr�rmr;r r])r�r8r;rm) r�r8r�r8r�r�rnrorprqr�rmr�rmrr�r�r:r�r�r�rmr�r�r�rmr�rmr�rxr;r )rIr^r_r`r6r
rhrar'rDr�r�r�r�r�r�r�r�rXr�r�rNrErCrfrfys��������1�1�f�F�	������ �(8���37�-1�!�:>�,0�;>�;>�;>�;>�;>�z����($(�$(�$(�$(�$(�L)�)�)�)�V����

�
�
�
�
/�
/�
/�
/�����0#'�37� $�!1��37� $�#�'+�s�s�s�s�s�j
*�
*�
*�
*�K�K�K�K�4#'�37�-1��!%�!1�#'�$(��/3� $�#�l�l�l�l�l�l�lrErfc�|��eZdZUdZdZeZded<dedddddddddddddddddfd4�fd,�
Z	d5d/�Z
d6d1�Zd7�fd3�Z�xZ
S)8�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.
    �httpsztype[BaseHTTPSConnection]rhNrFr7r8r9r:rrirjrkrlrmrnrorprqrrrsrt�key_filer5�	cert_file�	cert_reqs�int | str | None�key_password�ca_certs�ssl_version�ssl_minimum_version�ssl.TLSVersion | None�ssl_maximum_version�assert_hostname�str | Literal[False] | None�assert_fingerprint�ca_cert_dirrwrxr;r<c����t��j|||||||||	f	i|��|
|_||_||_|
|_||_||_||_||_	||_
||_||_dSrM)
�superrDr�rrrrrrrrr	r)rBr7r9rrjrlrnrprrrtr�rrrrrrrr	rrrw�	__class__s                      �rCrDzHTTPSConnectionPool.__init__�s����0	��������������	
�	
��	
�	
�	
�!��
�"���"���(��� ��
�&���&���#6�� �#6�� �.���"4����rEr�rc��|jr|jjdkrd}nd}|�||j|j|j���|���dS)z5Establishes a tunnel connection through HTTP CONNECT.r�rg)r6r7r9rnN)r{r6�
set_tunnelrAr9r��connect)rBr��
tunnel_schemes   rCr�z"HTTPSConnectionPool._prepare_proxysi���:�	#�$�*�+�w�6�6�#�M�M�"�M���� ��"����&�		�	
�	
�	
�	
�������rEr1c��|xjdz
c_t�d|j|j|jpd��|jr|jturtd���|j}|j}|j�$|jj�|jj}|jj}|jd|||j	j
|j|j|j
|j|j|j|j|j|j|j|jd�|j��S)zL
        Return a fresh :class:`urllib3.connection.HTTPConnection`.
        rz)Starting new HTTPS connection (%d): %s:%s�443zCCan't connect to HTTPS URL because the SSL module is not available.N)r7r9rrr�rrrrr	rrrrrN)r�r�r�r7r9rhr�ImportErrorr{rr�rr�rrrrr	rrrrrw)rB�actual_host�actual_ports   rCr�zHTTPSConnectionPool._new_conns!��	
����!����	�	�7�� ��I��I���		
�	
�	
��!�	�T�%7�?�%J�%J��U���
� �9���i���:�!�d�j�o�&A��*�/�K��*�/�K�!�t�!�
����L�0��n��]��*��n��]��(� �0�#�6��(� $� 8� $� 8�
�
��l�
�
�	
rEr0c����t���|��|jr|���|js%tjd|j�d�t��dSdS)r�z0Unverified HTTPS request is being made to host 'z�'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#tls-warningsN)	rr�r�r�is_verified�warnings�warnr7r)rBr�rs  �rCr�z"HTTPSConnectionPool._validate_conn<s����	�����t�$�$�$��>�	��L�L�N�N�N���		��M�$�t�y�$�$�$�
'�
�
�
�
�
�		�		rE),r7r8r9r:rrirjrkrlrmrnrorprqrrrsrtror�r5rr5rrrr5rr5rrrrrrr	r
rr5rr5rwrxr;r<)r�rr;r<)r;r1r�)rIr^r_r`r6rrhrar'rDr�r�r��
__classcell__)rs@rCr�r��s������������F�/>�M�>�>�>�>�
 �(8���37�-1�!�:>�#� $�&*�#'�#�(,�59�59�7;�)-�"&�+/5�/5�/5�/5�/5�/5�/5�b
�
�
�
�'
�'
�'
�'
�R���������rEr�r�r8�kwrxr;c��t|��^}}}}}|pd}|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', '/')
    rg�Pr�r9)r-rr�r�rf)r�rr6r�r7r9s      rC�connection_from_urlr!Rs|��(!*�#����F�A�t�T�A�
�
�v�F��1�>�%�f�b�1�1�D�
����"�4�9�9�d�9�b�9�9�9�!�$�8�8�T�8�R�8�8�8rEr7r<r6r5c��dSrMrN�r7r6s  rCr,r,o����CrEc��dSrMrNr#s  rCr,r,tr$rEc��t||��}|r4|�d��r|�d��r
|dd�}|S)z?
    Normalize hosts for comparisons and use with sockets.
    �[�]r���)r?r��endswithr#s  rCr,r,ysU��
�$��'�'�D�������$�$�����s�);�);���A�b�D�z���KrEr��(HTTPConnectionPool | HTTPSConnectionPool�pathc�P�t|j|j|j|���jS)zZReturns the URL from a given connection pool. This is mainly used for testing and logging.)r6r7r9r,)r*r6r7r9r�)r�r,s  rC�_url_from_poolr.�s$���d�k��	��	��M�M�M�Q�QrE�queue.LifoQueue[typing.Any]c��		|�d���}|r|����-#tj$rYdSwxYw)z2Drains a queue of connections and closes each one.TFr�N)r�rXrbr�)r�r�s  rCr�r��s_��
�	��8�8�%�8�(�(�D��
��
�
����	���;�
�
�
����
���s�.0�A�A)r�r8rrxr;rf)r7r<r6r5r;r<)r7r8r6r5r;r8)r7r5r6r5r;r5rM)r�r+r,r5r;r8)r�r/r;r<)[�
__future__rr��loggingrbr��typingrr��socketrr��typesr�_base_connectionr�_request_methodsr	�
connectionr
rrr
rrrrr�
exceptionsrrrrrrrrrrrrrr�r �util.connectionr!�
util.proxyr"�util.requestr#r$�
util.retryr%�util.ssl_match_hostnamer&�util.timeoutr'r(r)�util.urlr*r+r,r?r-�	util.utilr.�
TYPE_CHECKING�ssl�typing_extensionsr/r0r1�	getLoggerrIr��Union�floatr��TypeVarr2r4�EAGAIN�EWOULDBLOCKr�rfr�r!�overloadr.r�rNrErC�<module>rLsV��"�"�"�"�"�"�������������
�
�
�
�
�
�
�
���������+�+�+�+�+�+�������(�(�(�(�(�(�,�,�,�,�,�,�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�9�8�8�8�8�8�������������������������������'�&�&�&�&�&�2�2�2�2�2�2�7�7�7�7�7�7�@�@�@�@�@�@�@�@�������5�5�5�5�5�5�B�B�B�B�B�B�B�B�B�B�)�)�)�)�)�)�)�)�7�7�7�7�7�7�������������	��J��J�J�J�)�)�)�)�)�)�I�I�I�I�I�I�I�I��g���!�!����W�e�]�D�@�A�
�	����	!�	!��.�.�.�.�.�.�.�.�d�L�%�"3�4��F
�F
�F
�F
�F
���F
�F
�F
�RM�M�M�M�M�,�M�M�M�`9�9�9�9�:��������������������&HL�R�R�R�R�R�
�
�
�
�
�
rE

Hacked By AnonymousFox1.0, Coded By AnonymousFox