Skip to main content
Glama

ClickUp Operator

by noah-vh
connectionpool.cpython-312.pyc39.7 kB
� lMg������ddlmZddlZddlZddlZddlZddlZddlZddlZddl m Z ddl m Z ddlmZddlmZddlmZdd lmZmZmZmZmZmZmZmZdd lmZdd lmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+dd l,m-Z-dd l.m/Z/ddl0m1Z1ddl2m3Z3m4Z4ddl5m6Z6ddl7m8Z8ddl9m:Z:m;Z;m<Z<ddl=m>Z>m?Z?ddl=m@ZAddl=mBZBddlCmDZDej�rddlFZFddlGmHZHddlmIZImJZJej�eL�ZMej�e<eOe;dfZPGd�d�ZQej�ej�hZTGd�deQe�ZUGd�deU�ZVd%d�ZWej�d&d ��Z@ej�d'd!��Z@d(d"�Z@ d) d*d#�ZYd+d$�ZZy),�)� annotationsN��timeout)� TracebackType�)� _TYPE_BODY)�HTTPHeaderDict)�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)�Self)�BaseHTTPConnection�BaseHTTPSConnectionc�r�eZdZUdZdZded<ejZd d d�Z d d�Z d d�Z dd�Z dd �Z y)�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�schemec��|s td��t||j��|_||_t ||j��j �|_y)NzNo host specified.�r6)rr-r6�host�port�normalize_host�lower� _tunnel_host)�selfr9r:s �bC:\Users\noahv\Documents\GitHub\clickup-operator\.venv\Lib\site-packages\urllib3/connectionpool.py�__init__zConnectionPool.__init__QsH���$�%9�:� :�#�D����=�� ��� � +�4�� � �D�J�J�L���c�f�t|�j�d|j�d|j�d�S)Nz(host=z, port=�))�type�__name__r9r:�r>s r?�__str__zConnectionPool.__str__^s.���t�*�%�%�&�f�T�Y�Y�M����� �Q�O�OrAc��|S�N�rFs r?� __enter__zConnectionPool.__enter__as��� rAc�$�|j�y)NF)�close)r>�exc_type�exc_val�exc_tbs r?�__exit__zConnectionPool.__exit__ds�� � � � �rAc��y�zD Close all pooled connections and disable the pool. NrJrFs r?rMzConnectionPool.closen��rArI)r9�strr:� int | None�return�None)rWrU)rWr0)rNztype[BaseException] | NonerOzBaseException | NonerPzTracebackType | NonerWztyping.Literal[False]�rWrX)rE� __module__� __qualname__�__doc__r6�__annotations__�queue� LifoQueue�QueueClsr@rGrKrQrMrJrAr?r4r4Cs]����F�J�����H� M�P���,��&��%� � � � rAr4c �r�eZdZUdZdZeZded<dedddddddf dd�Z dd �Z ddd �Z dd �Z dd �Z dd �Zdd�Z dd�Zdddedddddf dd�Zdd�Zdd�Zdddddeddddddf d d�Zy)!�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]� ConnectionClsNrFc  ���tj|||�tj||�t|t�st j |�}|�t j}||_||_ |j|�|_ ||_ ||_ | xsi|_| |_t!|�D]} |jj#d��d|_d|_| |_|jrN|j(j+dg�|j|j(d<|j|j(d<|j} t-j.|t0| �y)Nr�socket_options�proxy� proxy_config)r4r@r � isinstancer*� from_floatr&�DEFAULTr�retriesr`�pool�blockrg� proxy_headersrh�range�put�num_connections� num_requests�conn_kw� setdefault�weakref�finalize�_close_pool_connections)r>r9r:r�maxsizern�headersrl�_proxy�_proxy_headers� _proxy_configrt�_rms r?r@zHTTPConnectionPool.__init__�s,�� ����d�D�1�����g�.��'�7�+��(�(��1�G� �?��m�m�G��� ��� �8<� � �g�8N�� ��� ��� �+�1�r���)����w��A� �I�I�M�M�$� � � !�������� � �:�:� �L�L� #� #�$4�b� 9�$(�J�J�D�L�L�� !�+/�+<�+<�D�L�L�� (� �y�y�� ����6��=rAc�4�|xjdz c_tjd|j|j|jxsd�|j d|j|j|j jd�|j��}|S)z9 Return a fresh :class:`HTTPConnection`. rz(Starting new HTTP connection (%d): %s:%s�80)r9r:rrJ) rr�log�debugr9r:rdr�connect_timeoutrt�r>�conns r?� _new_connzHTTPConnectionPool._new_conn�s��� ����!�� � � � 6� � � � �I�I� �I�I� ��  �"�t�!�!� ��������L�L�0�0� ��l�l�  �� � rAc��d}|j� t|d�� |jj|j|��}|r;t|�r0tjd|j�|j�|xs|j�S#t$rt|d�d�t j $r|jr t|d�d�Y��wxYw)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.)rnrzHPool is empty and a new connection can't be opened due to blocking mode.z Resetting dropped connection: %s)rmr�getrn�AttributeErrorr^�Emptyrr"r�r�r9rMr�)r>rr�s r?� _get_connzHTTPConnectionPool._get_conns����� �9�9� �!�$�(9�:� :� ��9�9�=�=�t�z�z�7�=�C�D� �)�$�/� �I�I�8�$�)�)� D� �J�J�L��'�t�~�~�'�'��!� E�!�$�(9�:�� D��{�{� ��z�z�$��^���� �  �s�'B�AC�Cc��|j� |jj|d��y|r|j �yy#t$rY�tj$rg|r|j �|j r t|d�d�tjd|j|jj��Y��wxYw)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�rnz>Pool reached maximum size and no more connections are allowed.zLConnection pool is full, discarding connection: %s. Connection pool size: %s) rmrqr�r^�FullrMrnrr��warningr9�qsizer�s r?� _put_connzHTTPConnectionPool._put_conn(s��� �9�9� � �� � � � �d�%� �0��. � �J�J�L� ��-"� ���:�:� ���J�J�L��:�:�'��X�� � � � � �b��I�I��I�I�O�O�%�� �s�A� C� A6C�Cc��y)�U Called right before a request is made, after the socket is created. NrJr�s r?�_validate_connz!HTTPConnectionPool._validate_connSrTrAc��yrIrJr�s r?�_prepare_proxyz!HTTPConnectionPool._prepare_proxyXs�� rAc��|tur|jj�St|t�r|j�St j |�S)z:Helper that always returns a :class:`urllib3.util.Timeout`)r(r�clonerir*rj)r>rs r?� _get_timeoutzHTTPConnectionPool._get_timeout\sG�� �&� &��<�<�%�%�'� '� �g�w� '��=�=�?� "��%�%�g�.� .rAc��t|t�rt||d|�d��|�t|d�r%|jt vrt||d|�d��|�yy)zAIs the error actually a timeout? Will raise a ReadTimeout or pass�Read timed out. (read timeout=rC�errnoN)ri� SocketTimeoutr�hasattrr��_blocking_errnos)r>�err�url� timeout_values r?�_raise_timeoutz!HTTPConnectionPool._raise_timeouthsq�� �c�=� )�"��c�;�M�?�!�L��� � �3�� �S�Y�Y�2B�%B�"��c�;�M�?�!�L��� �&C� rATc �P�|xjdz c_|j|�} | j�tj| j �|_ |j|� |j+|||||| | | ��| j4}|j6s|dk(rt9||d|�d���||_ |j;�}||_| |_||_ tBjEd|j(|jF|jH|||jJ|jL|jN� |S#ttf$r$}|j|||j ���d}~wwxYw#ttttttf$r�}|}t!|ttf�r t|�}t!|ttttf�r:|r8|j"r,|j$s t'||j"j(�}|�d}~wwxYw#t,$rY���t$rF}|j.t.j0k7r|j.t.j2k7r�Yd}~���d}~wwxYw#ttf$r}|j|||���d}~wwxYw) 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)�bodyrz�chunked�preload_content�decode_content�enforce_content_lengthrr�rCz %s://%s:%s "%s %s HTTP/%s" %s %s)(rsr�� start_connectr*�resolve_default_timeoutr�rr�r�r r��OSErrorrr r'rrirg�has_connected_to_proxyrr6�requestr r�� EPROTOTYPE� ECONNRESET� read_timeout� is_closedr� getresponserl� _connection�_poolr�r�r9r:�version�status�length_remaining)r>r��methodr�r�rzrlrr�� response_connr�r�r�� timeout_obj�e�new_er��responses r?� _make_requestz HTTPConnectionPool._make_request{s}��\ ���Q����'�'��0� ��!�!�#��6�6�{�7R�7R�S�� � � ��#�#�D�)�8 � �L�L������ /�-�'=� � �2#�/�/� ��~�~� �q� �&��#�!?� �~�Q�O���(�D�L� ��'�'�)�H� #���,������ � � � .� �K�K� �I�I� �I�I� � � � � � �O�O� � %� %� ����w"�<�0� ��#�#��s�$�,�,�#�O��� �� � � � � � �  � � !�E��!�l�,<�=�>� �� �����!3�\�8�L���D�J�J�t�/J�/J�)�%����1B�1B�C���K��# ��H� � �� � �w�w�%�*�*�*�q�w�w�%�:J�:J�/J����  ��4�g�&� � � � �A�3�l� � K� �� �sg�D?�0H�?I<�?E2�E-�-E2�2E5�5#H�A?H�H� I9�+I9�3;I4�4I9�<J%� J � J%c�\�|j�y|jdc}|_t|�yrS)rmrx)r>�old_pools r?rMzHTTPConnectionPool.close0s-�� �9�9� � �"�i�i����$�)� ��)rAc�V�|jd�ryt|�^}}}}}|xsd}|� t||��}|jr|st j |�}n&|js|t j |�k(rd}|||f|j |j|jfk(S)zj Check if the given ``url`` is a member of the same host as this connection pool. �/TrcNr8)� startswithr.r-r:rr�r6r9)r>r�r6r~r9r:s r?� is_same_hostzHTTPConnectionPool.is_same_host<s��� �>�>�#� ��%.�c�N�!���4����!�6�� � �"�4��7�D� �9�9�T�!�%�%�f�-�D����t�~�'9�'9�&�'A�A��D���d�#�� � �T�Y�Y�� � �'J�J�JrAc �� �t|�}|j}|� |j}t|t�s"t j |||j ��}| �| } |r|j|�s t|||��|jd�rtt|��}nt|j�}d}| }t|j|j|�}|s+|j!�}|j#|j$�d}d}t'|| �} |j)|�}|j+| ��}|j,|_|j� |r|j0r |j3|�| s|nd}|j<|||f|||| ||| |d�|��}d}|s|r|j[�d}d}|r|j]|� |s9t^jad |||�|jb|||||||f|| | | | | |d �|��S|xrje�}|r�jfdk(rd}d}ti|�jk�} |jS||||��}|jq�|js|�t^jud||�|jb||||f||||| | | | | |d� |��Stwjjyd��}|j{||jf|�rn |jS||||��}|jq�|jY|�t^jud|�|jb||||f||||| | | | | |d� |��S|S#t4t6t8f$r8}|j;||jj|j.���d}~wwxYw#t>$rd}d}�t@tBt6tDt4tFtHtJf$r�}d}|}t|t4tHf�r tG|�}t|t6tLt@tFtBf�r;|r9|jr-|jNs!tQ||jj�}n"t|t6tBf�r tEd |�}|jS||||tUjV�d � �}|jY�|}Yd}~��<d}~wwxYw#|s|r|j[�d}d}|r|j]|�wwxYw#tl$r"|jnr|jq��|cYSwxYw#tl$r"|j|r|jq��|cYSwxYw)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 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. If ``None`` (default) will retry 3 times, see ``Retry.DEFAULT``. 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)�redirect�defaultr�Frr�)rr�rzr�rlr�r�r�TzConnection aborted.�)�errorr�� _stacktracez1Retrying (%r) after connection broken by '%r': %s)r� pool_timeout� release_connr��body_posr�r�i/�GET)r�r�zRedirecting %s -> %s) rlr��assert_same_hostrr�r�r�r�r�r�z Retry-Afterz Retry: %s)?r.r6rzrir&�from_intrlr�rr�r/r,r�r#rgrh�copy�updateror%r�r�r�rr�r�r r�r�r�r�rr rrrr'rrr�r� increment�sys�exc_info�sleeprMr�r�r��urlopen�get_redirect_locationr�r �_prepare_for_method_changer�raise_on_redirect� drain_conn�sleep_for_retryr��boolr��is_retry�raise_on_status)r>r�r�r�rzrlr�r�rr�r�r�r�r�r�� response_kw� parsed_url�destination_schemer��release_this_conn�http_tunnel_requiredr�� clean_exitr�r�r�r�r��redirect_location�has_retry_afters r?r�zHTTPConnectionPool.urlopenRs���b�s�^� �'�.�.�� �?��l�l�G��'�5�)��n�n�W�x����V�G� � �*�L� �D�$5�$5�c�$:�"�4��g�6� 6� �>�>�#� ����,�-�C�����(�C���)��>� �J�J��)�)�+=� ��$��l�l�n�G� �N�N�4�-�-� .���� �%�T�8�4��e %��+�+�G�4�K��>�>�,�>�7�D�&�6�6�D�L��z�z�%�*>�4�>�>���'�'��-�)5�D�$�M�*�t�)�)���� �$�����+� /�-� �� �H� �J�^� ��J�J�L��D�$(�!� ����t�$�� �K�K�C�W�c�SV� � �4�<�<������� �� �)�)��!� /�-���� �&%�I��)G�)G�)I�� ����#�%�����(��1�L�L�N�� �!�+�+�F�C�(�RV�+�W�� � � � !� � #� #�H� -� �I�I�,�c�3D� E��4�<�<��!��� �  �!�!1��)�)��!� /�-���� �&�x�/�/�3�3�M�B�C�� � � �F�H�O�O�_� E� �!�+�+�F�C�(�RV�+�W�� � � � !� �M�M�(� #� �I�I�k�3� '��4�<�<����� �  �!�!1��)�)��!� /�-���� �$���u%�g�}�=���'�'��4�:�:�>�>����(���� ��>� ��J� %� � � � � � � � � � �  �$ ��J� �E��!�l�,<�=�>� �� �����&� ��!� � ��D�J�J�t�/J�/J�)�%����1B�1B�C���E�G�]�#;�<�%�&;�U�C���'�'���5��#�,�,�.�QR�BS�(��G� �M�M�O��C��I$ ��N� ��J�J�L��D�$(�!� ����t�$� !��R!� ��,�,��'�'�)����  ��@!� ��*�*��'�'�)����  �st�AN8�)M)�:&N8� T�:U�)N5�=3N0�0N5�5N8�8:S!�2C$S�S$�S!�!S$�$.T�(U�?U�(U.�-U.)r9rUr:rVr�_TYPE_TIMEOUT | Nonery�intrnr�rz�typing.Mapping[str, str] | Nonerl�Retry | bool | int | Noner{� Url | Noner|r�r}zProxyConfig | Nonert� typing.Any)rWr1rI)rz float | NonerWr1)r��BaseHTTPConnection | NonerWrX�r�r1rWrX)r� _TYPE_TIMEOUTrWr*)r�z&BaseSSLError | OSError | SocketTimeoutr�rUr�r�rWrX)r�r1r�rUr�rUr��_TYPE_BODY | Nonerzr�rlz Retry | Nonerr�r�r�r�r�r�r�r�r�r�r�rWr!rY)r�rUrWr�) r�rUr�rUr�r�rzr�rlr�r�r�r�r�rr�r�rVr�z bool | Noner�r�r�z_TYPE_BODY_POSITION | Noner�r�r�r�r�r�rWr!)rErZr[r\r6rrdr]r(r@r�r�r�r�r�r�r�r�rMr�r�rJrAr?rbrbxs���1�f�F� ��<�� �(8���37�-1�!�:>�,0�;>��;>��;>�&� ;>� � ;>� � ;>�1�;>�+�;>��;>�8�;>�*�;>��;>�z�($(�L)�V �  � /�� 3����,� � � �0#'�37� $�!1��37� $�#�'+�s� �s��s�� s�  � s� 1� s��s��s��s�1�s��s��s�!%�s� �s�j *�K�4#'�37�-1��!%�!1�#'�$(��/3� $�#�p��p��p� � p� 1� p� +� p��p��p��p�!�p�"�p��p�-�p��p��p� "�!p�" �#prArbc����eZdZUdZdZeZded<dedddddddddddddddddf d �fd� Z d d �Z dd �Z d�fd � Z �xZ S)�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]rdNrFc ����t�|�||||||||| f i|��| |_| |_| |_| |_||_||_||_||_ ||_ ||_ ||_ yrI) �superr@�key_file� cert_file� cert_reqs� key_password�ca_certs� ca_cert_dir� ssl_version�ssl_minimum_version�ssl_maximum_version�assert_hostname�assert_fingerprint)r>r9r:rryrnrzrlr{r|r�r�r�r�r�r�rrrrr�rt� __class__s �r?r@zHTTPSConnectionPool.__init__�s����0 ��� � � � � � � � � � �� �!�� �"���"���(��� �� �&���&���#6�� �#6�� �.���"4��rAc���|jr|jjdk(rd}nd}|j||j|j|j ��|j �y)z5Establishes a tunnel connection through HTTP CONNECT.r�rc)r6r9r:rzN)rgr6� set_tunnelr=r:ro�connect)r>r�� tunnel_schemes r?r�z"HTTPSConnectionPool._prepare_proxys\�� �:�:�$�*�*�+�+�w�6�#�M�"�M� ��� ��"�"�����&�&� � � � � �rAc��|xjdz c_tjd|j|j|jxsd�|j r|j t ur td��|j}|j}|j�B|jj�,|jj}|jj}|j d|||jj|j|j|j|j|j|j |j"|j$|j&|j(|j*d�|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.)r9r:rr�r�r�r�r�r�rrr�rrrJ)rrr�r�r9r:rdr � ImportErrorrgrr�r�r�r�r�r�r�rrr�rrrt)r>� actual_host� actual_ports r?r�zHTTPSConnectionPool._new_connsC�� ����!�� � � � 7� � � � �I�I� �I�I� ��  ��!�!�T�%7�%7�?�%J��U�� � �9�9� ��i�i� � �:�:� !�d�j�j�o�o�&A��*�*�/�/�K��*�*�/�/�K�!�t�!�!� ����L�L�0�0��n�n��]�]��*�*��n�n��]�]��(�(� �0�0�#�6�6��(�(� $� 8� 8� $� 8� 8� ��l�l� � rAc����t�|�|�|jr|j�|js6|j s)t jd|j�d�t�yyy)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) r�r�r�r� is_verified�proxy_is_verified�warnings�warnr9r)r>r�rs �r?r�z"HTTPSConnectionPool._validate_conn?sf��� ���t�$� �>�>� �L�L�N�����(>�(>� �M�M�F�t�y�y�k�R$�$� '� �)?�rA),r9rUr:rVrr�ryr�rnr�rzr�rlr�r{r�r|r�r�r5r�r5r��int | str | Noner�r5r�r5r�rr�ssl.TLSVersion | Nonerrrz"str | typing.Literal[False] | Nonerr5r�r5rtr�rWrX)r�rrWrX)rWr2r�)rErZr[r\r6rrdr]r(r@r�r�r�� __classcell__)rs@r?r�r��sJ��� ��F�/>�M�,�>�  �(8���37�-1�!�:>�#� $�&*�#'�#�(,�59�59�>B�)-�"&�+/5��/5��/5�&� /5� � /5� � /5�1�/5�+�/5��/5�8�/5��/5��/5�$�/5�!�/5��/5� &�!/5�"3�#/5�$3�%/5�&<�'/5�('�)/5�* �+/5�,�-/5�. �//5�b �' �R�rAr�c ��t|�^}}}}}|xsd}|xstj|d�}|dk(rt|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', '/') rc�Pr�r:)r.rr�r�rb)r��kwr6r~r9r:s r?�connection_from_urlrVsk��(!*�#���F�A�t�T�A� � �v�F� � 1�>�%�%�f�b�1�D� ���"�4�9�d�9�b�9�9�!�$�8�T�8�R�8�8rAc��yrIrJ�r9r6s r?r-r-s���rAc��yrIrJrs r?r-r-xrrAc�p�t||�}|r'|jd�r|jd�r|dd}|S)z? Normalize hosts for comparisons and use with sockets. �[�]r�����)r;r��endswithrs r?r-r-}s;�� �$�� '�D� �����$����s�);��A�b�z�� �KrAc�p�t|j|j|j|��jS)zZReturns the URL from a given connection pool. This is mainly used for testing and logging.)r6r9r:�path)r+r6r9r:r�)rmr$s r?�_url_from_poolr%�s'�� �d�k�k�� � �� � �� M� Q� Q�QrAc�� |jd��}|r|j��%#tj$rYywxYw)z2Drains a queue of connections and closes each one.Fr�N)r�rMr^r�)rmr�s r?rxrx�sC�� ���8�8�%�8�(�D��� � � ��� �;�;� � � �s �&(�>�>)r�rUrr�rWrb)r9rXr6r5rWrX)r9rUr6r5rWrU)r9r5r6r5rWr5rI)rmz(HTTPConnectionPool | HTTPSConnectionPoolr$r5rWrU)rmzqueue.LifoQueue[typing.Any]rWrX)[� __future__rr��loggingr^r��typingrrv�socketrr��typesr�_base_connectionr� _collectionsr �_request_methodsr � connectionr r r rrrrrr� exceptionsrrrrrrrrrrrrr r�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_extensionsr0r1r2� getLoggerrEr��Union�floatr�r4�EAGAIN� EWOULDBLOCKr�rbr�r�overloadr%rxrJrAr?�<module>rBs_��"� �� � � ���+��(�(�,� � � �9�����'�2�7�@��5�B�B�)�7��� ����&�I��g����!��� � �W�e�]�D�@�A� �. �. �d�L�L�%�"3�"3�4��J ���J �ZN�,�N�b9�:�������������&HL�R� 2�R�:D�R��R� rA

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/noah-vh/mcp-server-clickup'

If you have feedback or need assistance with the MCP directory API, please join our Discord server