Skip to main content
Glama

ClickUp Operator

by noah-vh
response.cpython-312.pyc50.5 kB
� lMg�� �l�ddlmZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl m Z ddlmZddlmZddlmZe j,rddlmZ ddlZ ddlZeee ejBd ejD�jG���Z$e$d krd Z%nd Z% dd l(m)Z)ddlm*Z*ddl+m,Z,ddl-m.Z.m/Z/m0Z0ddl1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;ddl<m=Z=m>Z>ddl?m@Z@e j,rddlAmBZBej�eD�ZEGd�d�ZFGd�deF�ZGGd�d�ZHGd�deF�ZIe� Gd�deF�ZJe%r Gd�d eF�ZKGd!�d"eF�ZLd*d#�ZMGd$�d%�ZNGd&�d'ej��ZPGd(�d)eP�Zy#e$rddlZY��8wxYw#e$rdZY��FwxYw#e&ee'f$rd Z%Y��wxYw)+�)� annotationsN)�contextmanager)� HTTPMessage)� HTTPResponse)�timeout�)�BaseHTTPConnectionz^([0-9]+)\.([0-9]+))r�FT)�util)� _TYPE_BODY)�HTTPHeaderDict)� BaseSSLError�HTTPConnection� HTTPException) �BodyNotHttplibCompatible� DecodeError� HTTPError�IncompleteRead�InvalidChunkLength� InvalidHeader� ProtocolError�ReadTimeoutError�ResponseNotChunked�SSLError)� is_fp_closed�is_response_to_head)�Retry)�HTTPConnectionPoolc��eZdZdd�Zdd�Zy)�ContentDecoderc��t���N��NotImplementedError��self�datas �\C:\Users\noahv\Documents\GitHub\clickup-operator\.venv\Lib\site-packages\urllib3/response.py� decompresszContentDecoder.decompressG� ��!�#�#�c��t��r"r#�r&s r(�flushzContentDecoder.flushJr*r+N�r'�bytes�returnr0�r1r0)�__name__� __module__� __qualname__r)r.�r+r(r r Fs ��$�$r+r c�$�eZdZdd�Zdd�Zdd�Zy)�DeflateDecoderc�R�d|_d|_tj�|_y)NTr+)� _first_try�_data�zlib� decompressobj�_objr-s r(�__init__zDeflateDecoder.__init__Os ������� ��&�&�(�� r+c���|s|S|js|jj|�S|xj|z c_ |jj|�}|rd|_d|_|S#tj $rbd|_t j tj �|_ |j|j�d|_cYS#d|_wxYwwxYw)NF)r:r>r)r;r<�errorr=� MAX_WBITS)r&r'� decompresseds r(r)zDeflateDecoder.decompressTs�����K�����9�9�'�'��-� -� � � �d�� � "��9�9�/�/��5�L��"'���!�� �� ���z�z� "�#�D�O��*�*�D�N�N�?�;�D�I� "����t�z�z�2�!�� ��T�� ��  "�s%�,A/�/AC$�3C� C$� C � C$c�6�|jj�Sr"�r>r.r-s r(r.zDeflateDecoder.flushj����y�y��� � r+N�r1�Noner/r2�r3r4r5r?r)r.r6r+r(r8r8Ns��)� "�,!r+r8c��eZdZdZdZdZy)�GzipDecoderStaterr�N)r3r4r5� FIRST_MEMBER� OTHER_MEMBERS� SWALLOW_DATAr6r+r(rKrKns���L��M��Lr+rKc�$�eZdZdd�Zdd�Zdd�Zy)� GzipDecoderc��tjdtjz�|_tj |_y�N�)r<r=rBr>rKrM�_stater-s r(r?zGzipDecoder.__init__us*���&�&�r�D�N�N�':�;�� �&�3�3�� r+c�$�t�}|jtjk(s|s t |�S ||j j |�z }|j j}|s t |�Stj|_tjdtjz�|_��#tj$rC|j}tj|_|tjk(r t |�cYS�wxYwrS) � bytearrayrUrKrOr0r>r)r<rArN� unused_datar=rB)r&r'�ret�previous_states r(r)zGzipDecoder.decompressys����k�� �;�;�*�7�7� 7�t���:� �� ��t�y�y�+�+�D�1�1���9�9�(�(�D���S�z�!�*�8�8�D�K��*�*�2����+>�?�D�I����:�:� �!%����.�;�;�� �!�%5�%C�%C�C� ��:�%�� �s�B9�9AD� Dc�6�|jj�Sr"rEr-s r(r.zGzipDecoder.flush�rFr+NrGr/r2rIr6r+r(rQrQts��4�@�*!r+rQc��eZdZdd�Zdd�Zy)� BrotliDecoderc���tj�|_t|jd�r"t |d|jj �yt |d|jj �y)Nr))�brotli� Decompressorr>�hasattr�setattrr)�processr-s r(r?zBrotliDecoder.__init__�sL���+�+�-�D�I��t�y�y�,�/���l�D�I�I�,@�,@�A���l�D�I�I�,=�,=�>r+c�d�t|jd�r|jj�Sy)Nr.r+)rar>r.r-s r(r.zBrotliDecoder.flush�s$���t�y�y�'�*��y�y���(�(�r+NrGr2)r3r4r5r?r.r6r+r(r]r]�s �� ?� r+r]c�$�eZdZdd�Zdd�Zdd�Zy)� ZstdDecoderc�R�tj�j�|_yr")�zstd�ZstdDecompressorr=r>r-s r(r?zZstdDecoder.__init__�s���-�-�/�=�=�?�D�Ir+c���|sy|jj|�g}|jjr�|jjr�|jj}t j �j �|_|j|jj|��|jjr|jjr��dj|�S)Nr+) r>r)�eofrXrhrir=�append�join)r&r'� data_partsrXs r(r)zZstdDecoder.decompress�s������)�)�.�.�t�4�5�J��)�)�-�-�D�I�I�$9�$9�"�i�i�3�3� � �1�1�3�A�A�C�� ��!�!�$�)�)�"6�"6�{�"C�D��)�)�-�-�D�I�I�$9�$9��8�8�J�'� 'r+c�|�|jj�}|jjs td��|S)NzZstandard data is incomplete)r>r.rkr)r&rYs r(r.zZstdDecoder.flush�s.���)�)�/�/�#�C��9�9�=�=�!�"@�A�A��Jr+NrGr/r2rIr6r+r(rfrf�s�� @� (� r+rfc�(�eZdZdZdd�Zdd�Zdd�Zy) � MultiDecodera From RFC7231: If one or more encodings have been applied to a representation, the sender that applied the encodings MUST generate a Content-Encoding header field that lists the content codings in the order in which they were applied. c��|jd�D�cgc]}t|j����c}|_ycc}w)N�,)�split� _get_decoder�strip� _decoders)r&�modes�ms r(r?zMultiDecoder.__init__�s1��;@�;�;�s�;K�L�;K�a�,�q�w�w�y�1�;K�L����Ls� =c�<�|jdj�S�Nr)rwr.r-s r(r.zMultiDecoder.flush�s���~�~�a� �&�&�(�(r+c�\�t|j�D]}|j|�}�|Sr")�reversedrwr))r&r'�ds r(r)zMultiDecoder.decompress�s(���$�.�.�)�A��<�<��%�D�*�� r+N)rx�strr1rHr2r/)r3r4r5�__doc__r?r.r)r6r+r(rqrq�s���M�)�r+rqc��d|vr t|�S|dvr t�St�|dk(r t�Str|dk(r t �St �S)Nrs)�gzip�x-gzip�brrh)rqrQr_r]�HAS_ZSTDrfr8)�modes r(ruru�sU�� �d�{��D�!�!� �!�!��}�� ��d�d�l�����D�F�N��}�� � �r+c�8�eZdZdZdd�Zd d�Zd d�Zd d�Zd d�Zy) �BytesQueueBuffera Memory-efficient bytes buffer To return decoded data in read() and still follow the BufferedIOBase API, we need a buffer to always return the correct amount of bytes. This buffer should be filled using calls to put() Our maximum memory usage is determined by the sum of the size of: * self.buffer, which contains the full data * the largest chunk that we will copy in get() The worst case scenario is a single chunk, in which case we'll make a full copy of the data inside get(). c�D�tj�|_d|_yr{)� collections�deque�buffer�_sizer-s r(r?zBytesQueueBuffer.__init__�s��+6�+<�+<�+>�� ��� r+c��|jSr")r�r-s r(�__len__zBytesQueueBuffer.__len__�s ���z�z�r+c�v�|jj|�|xjt|�z c_yr")r�rlr��lenr%s r(�putzBytesQueueBuffer.put�s&�� � � ���4� � � � �c�$�i�� r+c�d�|dk(ry|js td��|dkr td��d}tj�}||kr�||z }|jj �}t |�}||kr\|d|||d}}|j|�|jj|�|xj|zc_ |j�S|j|�|xj|zc_ ||z }|js |j�S||kr��|j�S)Nrr+zbuffer is emptyzn should be > 0) r�� RuntimeError� ValueError�io�BytesIO�popleftr��write� appendleftr��getvalue) r&�n�fetchedrY� remaining�chunk� chunk_length� left_chunk� right_chunks r(�getzBytesQueueBuffer.get�s�� ��6������0�1� 1� ��U��.�/� /����j�j�l����k��G� �I��K�K�'�'�)�E��u�:�L��<�'�*/� ��*;�U�9�:�=N�K� �� � �*�%�� � �&�&�{�3�� � �i�'� ���|�|�~��� � �%� �� � �l�*� � �|� #�G��;�;���|�|�~��%��k�$�|�|�~�r+c�4��|j��s|jdk(sJ�yt��dk(r�j�}nPt j �}|j �fd�tt���D��|j�}d|_|S)Nrr+rc3�>�K�|]}�j����y�wr")r�)�.0�_r�s �r(� <genexpr>z+BytesQueueBuffer.get_all.<locals>.<genexpr>&s�����H�5G��6�>�>�+�5G�s�) r�r�r��popr�r�� writelines�ranger�)r&�resultrYr�s @r(�get_allzBytesQueueBuffer.get_allsv���������:�:��?� "�?�� �v�;�!� ��Z�Z�\�F��*�*�,�C� �N�N�H�U�3�v�;�5G�H� H��\�\�^�F��� �� r+NrG�r1�int)r'r0r1rH)r�r�r1r0r2) r3r4r5r�r?r�r�r�r�r6r+r(r�r��s ��� �� ��< r+r�c�P�eZdZUgd�Ze�edgz Zeredgz Zgd�ZeejfZ de d<e�e ejfz Z ere e jfz Z ddd� d!d �Zd"d �Zed#d ��Zd$d �Zed%d ��Zej(d&d��Zed'd��Zed(d��Zej(d)d��Z d* d+d�Z d, d-d�Z d. d/d�Z d. d+d�Zd0d�Zd0d�Zd0d�Zd0d�Z d1d�Zd#d�Z d2d�Z!d3d�Z"d4d5d�Z#d3d�Z$d%d �Z%y)6�BaseHTTPResponse)r�r��deflateNr�rh)i-i.i/i3i4ztuple[type[Exception], ...]�DECODER_ERROR_CLASSES)�headers�retriesc�~�t|t�r||_nt|�|_||_||_||_||_||_d|_||_ ||_ d|_ |jjdd�j�} d�| jd�D�} d| vrd|_ d|_|y)NFztransfer-encoding�c3�<K�|]}|j����y�wr")rv)r��encs r(r�z,BaseHTTPResponse.__init__.<locals>.<genexpr>Ws����>�,=�S�S�Y�Y�[�,=�s�rs�chunkedT)� isinstancer r��status�version�version_string�reason�decode_content�_has_decoded_content� _request_urlr�r�r��lowerrt�_decoder) r&r�r�r�r�r�r�� request_urlr��tr_enc� encodingss r(r?zBaseHTTPResponse.__init__;s��� �g�~� .�"�D�L�)�'�2�D�L��� ��� �,����� �,���$)��!�(3����� ��� ����!�!�"5�r�:�@�@�B��>�F�L�L��,=�>� � � � !��D�L�/3�� � r+c�j�|j|jvr|jjd�Sy)a Should we redirect and where to? :returns: Truthy redirect location string if we got a redirect status code and valid location. ``None`` if redirect status and no location. ``False`` if not a redirect status code. �locationF)r��REDIRECT_STATUSESr�r�r-s r(�get_redirect_locationz&BaseHTTPResponse.get_redirect_location^s.�� �;�;�$�0�0� 0��<�<�#�#�J�/� /�r+c��t��r"r#r-s r(r'zBaseHTTPResponse.dataj� ��!�#�#r+c�b�|jjd�}tj|�S)a� Deserializes the body of the HTTP response as a Python object. The body of the HTTP response must be encoded using UTF-8, as per `RFC 8529 Section 8.1 <https://www.rfc-editor.org/rfc/rfc8259#section-8.1>`_. To use a custom JSON decoder pass the result of :attr:`HTTPResponse.data` to your custom decoder instead. If the body of the HTTP response is not decodable to UTF-8, a `UnicodeDecodeError` will be raised. If the body of the HTTP response is not a valid JSON document, a `json.JSONDecodeError` will be raised. Read more :ref:`here <json_content>`. :returns: The body of the HTTP response as a Python object. zutf-8)r'�decode�_json�loadsr%s r(�jsonzBaseHTTPResponse.jsonns'��$�y�y����(���{�{�4� � r+c��t��r"r#r-s r(�urlzBaseHTTPResponse.url�r�r+c��t��r"r#�r&r�s r(r�zBaseHTTPResponse.url�r�r+c��t��r"r#r-s r(� connectionzBaseHTTPResponse.connection�r�r+c��|jSr")�_retriesr-s r(r�zBaseHTTPResponse.retries�s ���}�}�r+c�j�|�*|jr|jdj|_||_y)N�����)�history�redirect_locationr�r�)r&r�s r(r�zBaseHTTPResponse.retries�s-�� � �7�?�?����r�*�<�<�D�H��� r+c��t��r"r#�r&�amtr�s r(�streamzBaseHTTPResponse.stream�s ��"�#�#r+c��t��r"r#)r&r�r�� cache_contents r(�readzBaseHTTPResponse.read�s �� "�#�#r+c��t��r"r#r�s r(�read1zBaseHTTPResponse.read1�� �� "�#�#r+c��t��r"r#r�s r(� read_chunkedzBaseHTTPResponse.read_chunked�r�r+c��t��r"r#r-s r(� release_connzBaseHTTPResponse.release_conn�r*r+c��t��r"r#r-s r(� drain_connzBaseHTTPResponse.drain_conn�r*r+c��t��r"r#r-s r(�closezBaseHTTPResponse.close�r*r+c�z�|jjdd�j�}|j��||jvrt |�|_yd|vr\|j d�D�cgc].}|j�|jvr|j���0}}|rt |�|_yyyycc}w)z= Set-up the _decoder attribute if necessary. �content-encodingr�Nrs)r�r�r�r��CONTENT_DECODERSrurtrv)r&�content_encoding�er�s r(� _init_decoderzBaseHTTPResponse._init_decoder�s���  �<�<�+�+�,>��C�I�I�K�� �=�=� ��4�#8�#8�8� ,�-=� >�� ��(�(�.�3�3�C�8��8���w�w�y�D�$9�$9�9��G�G�I�8��� �$0�1A�$B�D�M�� )� !��s�-3B8c�f�|s|jr td��|S |jr"|jj|�}d|_|r||j�z }|S#|j$r?}|j j dd�j�}td|z|�|�d}~wwxYw)zN Decode the data passed in and potentially flush the decoder. �_Calling read(decode_content=False) is not supported after read(decode_content=True) was called.Tr�r�zEReceived response with content-encoding: %s, but failed to decode it.N) r�r�r�r)r�r�r�r�r�_flush_decoder)r&r'r�� flush_decoderr�r�s r(�_decodezBaseHTTPResponse._decode�s��� ��(�(�"�<����K� ��}�}��}�}�/�/��5��,0��)� � �D�'�'�)� )�D�� ���)�)� �#�|�|�/�/�0B�B�G�M�M�O� ��'�)9�:����  �� �s�.A"�"B0�1:B+�+B0c��|jr6|jjd�|jj�zSy)zk Flushes the decoder. Should only be called if the decoder is actually being used. r+)r�r)r.r-s r(r�zBaseHTTPResponse._flush_decoder�s5�� �=�=��=�=�+�+�C�0�4�=�=�3F�3F�3H�H� H�r+c��|jt|��}t|�dk(ry||dt|�t|�Sr{)r�r�)r&�b�temps r(�readintozBaseHTTPResponse.readinto�s;���y�y��Q�� �� �t�9��>��!�A�k��D� �N��t�9� r+c�R�tjdtd��|jS)Nz|HTTPResponse.getheaders() is deprecated and will be removed in urllib3 v2.1.0. Instead access HTTPResponse.headers directly.rL��category� stacklevel)�warnings�warn�DeprecationWarningr�r-s r(� getheaderszBaseHTTPResponse.getheaderss&��� � � O�'��  � �|�|�r+c�r�tjdtd��|jj ||�S)Nz�HTTPResponse.getheader() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTPResponse.headers.get(name, default).rLr)rrrr�r�)r&�name�defaults r(� getheaderzBaseHTTPResponse.getheader s3��� � � V�'��  � �|�|����g�.�.r+c��|jSr")r�r-s r(�infozBaseHTTPResponse.infos ���|�|�r+c��|jSr")r�r-s r(�geturlzBaseHTTPResponse.geturls ���x�x�r+)r��>typing.Mapping[str, str] | typing.Mapping[bytes, bytes] | Noner�r�r�r�r�rr�� str | Noner��boolr�rr�� Retry | Noner1rH)r1z"str | None | typing.Literal[False]r2)r1z typing.Any�r1r)r�rr1rH)r1zBaseHTTPConnection | None)r1r)r�rr1rH�iN)r�� int | Noner�� bool | Noner1�typing.Iterator[bytes]�NNF�r�rr�rr�rr1r0�NN�r�rr�rr1r0rG)r'r0r�rr�rr1r0)r�rWr1r�)r1r r")r rr rr1r)&r3r4r5r�r_r�r��IOErrorr<rAr��__annotations__rh� ZstdErrorr?r��propertyr'r�r��setterr�r�r�r�r�r�r�r�r�r�r�r�rrr rrr6r+r(r�r�,sm��4�� ���T�F�"����V�H�$��1��:A�4�:�:�9N��6�N� ���&�,�,��0����$�.�.�!2�2�� SW�!%�!*�P�!*�� !*� � !*� � !*��!*��!*� �!*��!*� �!*�F ��$��$�!�*�$��$� �Z�Z�$��$��$��$����� �^�^� �� �FJ�$��$�7B�$� �$��&*�#� $� �$�$�$�� $� � $��&*�$� �$�$�$� � $��&*�$� �$�$�$� � $�$�$�$�C�&���+6��GK�� ��<���/��r+r�c���eZdZdZ d d�fd� Zd d�Zd d�Zed!d��Zed"d��Z d#d�Z d$d�Z d%d �Z e d&d ��Z d'd d � d(d �Z d'd d � d(d�Z d) d*d�Z d+ d,d�Z d- d.d�Zd#d�Zd d�Zed#d��Zd$d�Zd d�Zd#d�Zd d�Zd/d�Z d+ d.d�Zed0d��Zej<d1d��Zd2d�Z�xZ S)3ra� HTTP Response container. Backwards-compatible with :class:`http.client.HTTPResponse` but the response ``body`` is loaded and decoded on-demand when the ``data`` property is accessed. This class is also compatible with the Python standard library's :mod:`io` module, and can hence be treated as a readable object in the context of that framework. Extra parameters for behaviour not present in :class:`http.client.HTTPResponse`: :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 original_response: When this HTTPResponse wrapper is generated from an :class:`http.client.HTTPResponse` object, it's convenient to include the original for debug purposes. It's otherwise unused. :param retries: The retries contains the last :class:`~urllib3.util.retry.Retry` that was used during the request. :param enforce_content_length: Enforce content length checking. Body returned by server must match value of Content-Length header, if present. Otherwise, raise error. c ���t�|�|||||||| ��||_||_d|_d|_| |_d|_| |_|rt|ttf�r||_| |_ | |_ t|d�r||_d|_|j!|�|_t%�|_|r%|js|j)|��|_yyy)N)r�r�r�r�r�r�r�r�rr��r�)�superr?�enforce_content_length� auto_close�_body�_fp�_original_response�_fp_bytes_read�msgr�rr0�_pool� _connectionra� chunk_left� _init_length�length_remainingr��_decoded_bufferr�)r&�bodyr�r�r�r�r��preload_contentr��original_response�poolr�r-r�r'�request_methodr�r(� __class__s �r(r?zHTTPResponse.__init__=s����( ������)��)�#�� � �'=��#�$����� �04���"3��������� �J�t�c�5�\�2��D�J��� �%��� �4�� ��D�H�'+���!%� 1� 1�.� A��� 0�1��� �4�:�:����.��A�D�J�$.�?r+c��|jr |jsy|jj|j�d|_yr")r.r/� _put_connr-s r(r�zHTTPResponse.release_conn{s4���z�z��!1�!1�� � � ���T�-�-�.���r+c�d� |j�y#ttttf$rYywxYw)z� Read and discard any remaining HTTP response data in the response connection. Unread data in the HTTPResponse connection blocks the connection from being released back to the pool. N)r�r�OSErrorrrr-s r(r�zHTTPResponse.drain_conn�s+��  � �I�I�K���7�L�-�@� � � �s ��/�/c�p�|jr |jS|jr|jd��Sy)NT)r�)r)r*r�r-s r(r'zHTTPResponse.data�s0�� �:�:��:�:� � �8�8��9�9�4�9�0� 0�r+c��|jSr")r/r-s r(r�zHTTPResponse.connection�s�����r+c�,�t|j�Sr")rr*r-s r(�isclosedzHTTPResponse.isclosed�s���D�H�H�%�%r+c��|jS)z� Obtain the number of bytes pulled over the wire so far. May differ from the amount of content returned by :meth:``urllib3.response.HTTPResponse.read`` if bytes are encoded on the wire (e.g, compressed). )r,r-s r(�tellzHTTPResponse.tell�s�� �"�"�"r+c���|jjd�}|�~|jrtj d�y |j d�D�chc] }t |���}}t|�dkDrtd|z��|j�}|dkrd}nd} t |j�}|dvsd |cxkrd ksn|d k(rd}|Scc}w#t$rd}Y�BwxYw#t$rd}Y�=wxYw) zM Set initial length value for Response content if available. zcontent-lengthNz�Received response with both Content-Length and Transfer-Encoding set. This is expressly forbidden by RFC 7230 sec 3.3.2. Ignoring Content-Length and attempting to process response as Transfer-Encoding: chunked.rsrz8Content-Length contained multiple unmatching values (%s)r)��i0�d���HEAD) r�r�r��log�warningrtr�r�rr�r�r�)r&r8�content_length�val�lengths�lengthr�s r(r1zHTTPResponse._init_length�s�� &*�\�\�%5�%5�6F�%G�� � %��|�|�� � ���� "� 0>�/C�/C�C�/H�I�/H��3�s�8�/H��I��w�<�!�#�'�1�3A�B���!������A�:�!�F��F� �����%�F� �Z� �3�&�#6�3�#6�.�F�:R��F�� ��7J��� ��� ��� ��F� �s6�C�C�&.C�C$�C� C!� C!�$ C2�1C2c#��K�d} d��d}|sL|jr|jj�|jr|jj�|jr,|jj�r|j!�yyy#t$r}t|jdd�|�d}~wt$r6}dt |�vr t |�|�t|jdd�|�d}~wt $rL}|j�)|j�|j|j k(rd}nd|��}t||�|�d}~wttf$r}td|��|�|�d}~wwxYw#|sL|jr|jj�|jr|jj�|jr,|jj�r|j!�wwwxYw�w)z� Catch low-level python exceptions, instead re-raising urllib3 variants, so that low-level exceptions are not leaked in the high-level api. On exit, release the connection back to the pool. FNzRead timed out.zread operation timed outz!Response may not contain content.zConnection broken: T)� SocketTimeoutrr.rrrr�expected�partialrrr=r+r�r/rAr�)r&� clean_exitr��args r(�_error_catcherzHTTPResponse._error_catcher�s������ �5 $� K��>�J���*�*��+�+�1�1�3� �#�#��$�$�*�*�,��&�&�4�+B�+B�+K�+K�+M��!�!�#�,N�&��a!� S�'�t�z�z�4�9J�K�QR�R��� S�-�S��V�;�"�1�+�1�,�&�t�z�z�4�9J�K�QR�R��!� 3��J�J�*�� � �-�� � �q�y�y�j�0�=�C�/��u�5�C�#�C��+��2��!�7�+� K�#�&9�!��$?��C��J�� K����*�*��+�+�1�1�3� �#�#��$�$�*�*�,��&�&�4�+B�+B�+K�+K�+M��!�!�#�,N�&�s_�G:�B�E/�BG:� E,�B5�5 E,�1C2�2 E,�>AE�E,�E'�'E,�,E/�/BG7�7G:F�r�c���|jsJ�d}|r||kDs|��|jr�|j|kDr�tjstj dkr�|r|jj |�Stj�}d}|�|dk7r_|�t||�}||z}n|}|jj|�}|s |j�S|j|�~|��Y|dk7r�_|j�S|r7|�|jj |�S|jj �S|�|jj|�S|jj�S)a_ Read a response with the thought that reading the number of bytes larger than can fit in a 32-bit int at a time via SSL in some known cases leads to an overflow error that has to be prevented if `amt` or `self.length_remaining` indicate that a problem may happen. The known cases: * 3.8 <= CPython < 3.9.7 because of a bug https://github.com/urllib3/urllib3/issues/2513#issuecomment-1152559900. * urllib3 injected with pyOpenSSL-backed SSL-support. * CPython < 3.10 only when `amt` does not fit 32-bit int. i���)�� ir) r*r2r � IS_PYOPENSSL�sys� version_infor�r�r��minr�r�r�)r&r�r�� c_int_maxr�� max_chunk_amt� chunk_amtr's r(�_fp_readzHTTPResponse._fp_read!sH��&�x�x��x�� � �S�9�_�� ��)�)��)�)�I�5�� � �C�$4�$4�w�$>���x�x�~�~�i�0�0��Z�Z�\�F�"�M��+�����?� #�C�� 7�I��9�$�C� -�I��x�x�}�}�Y�/�����?�?�$� $�� � �T�"���+�����?�?�$� $� �*-�/�4�8�8�>�>�#�&� O�t�x�x�~�~�?O� O�*-��4�8�8�=�=��%� M�d�h�h�m�m�o� Mr+c��|j�yt|jdd�}|j�5|s|j||��nd}|�h|dk7rc|sa|jj �|j rv|j �j|j dk7r[t|j|j ��|r9|dk7r|r|j t|�k(r|jj �ddd�rH|xjt|�z c_|j �|xj t|�zc_|S#1swY�UxYw)z7 Reads `amt` of bytes from the socket. N�closedFrVr+r) r*�getattrrUrar�r'r2rr,r�)r&r�r�� fp_closedr's r(� _raw_readzHTTPResponse._raw_readZs�� �8�8� ���D�H�H�h��6� � � � � "�:C�4�=�=��E�=�2��D���3�!�8�D������ ��/�/��-�-�9��-�-��2�)��)<�)<�d�>S�>S�T�T�����$�4�+@�+@�C��I�+M� ����� �=#�@ � � � �3�t�9� ,� ��$�$�0��%�%��T��2�%�� �I#� "�s �B=E�Ec�.�|j�|� |j}|r|dkrd}n7|�5d}t|j�|k\r|jj |�S|j |�}|duxs |dk7xr| }|st|j�dk(r|S|�|j |||�}|r||_|S|s|jr td��|S|j |||�}|jj|�t|j�|kr\|rZ|j |�}|j |||�}|jj|�t|j�|kr|r�Z|jj |�}|S)aT Similar to :meth:`http.client.HTTPResponse.read`, but with two additional parameters: ``decode_content`` and ``cache_content``. :param amt: How much of the content to read. If specified, caching is skipped because it doesn't make sense to cache partial content as the full response. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. :param cache_content: If True, will save the returned data such that the same result is returned despite of the state of the underlying file object. This is useful if you want the ``.data`` property to continue working after having ``.read()`` the file object. (Overridden if ``amt`` is set.) NrFr�) r�r�r�r3r�rfr�r)r�r�r�)r&r�r�r�r'r�� decoded_datas r(r�zHTTPResponse.read�s���4 ���� � !�!�0�0�N� �3��7��C� �_�!�M��4�'�'�(�C�/��+�+�/�/��4�4��~�~�c�"���t� �>��q��(=��X� ���D�0�0�1�Q�6��K� �;��<�<��n�m�D�D��!�� �.� �)"��,�,�&�@���� ��<�<��n�m�L�L� � � � $� $�\� 2��d�*�*�+�c�1�d��~�~�c�*��#�|�|�D�.�-�P� ��$�$�(�(��6� �d�*�*�+�c�1�d��'�'�+�+�C�0�D�� r+c�b�|� |j}|r|dkrd}|jr\|s td��t|j�dkDr7|�|jj �S|jj |�S|dk(ry|j|d��}|r|�|S|j� | }|j|||�}|jj|�|s|rn|jdd��}�J|�|jj �S|jj |�S)a� Similar to ``http.client.HTTPResponse.read1`` and documented in :meth:`io.BufferedReader.read1`, but with an additional parameter: ``decode_content``. :param amt: How much of the content to read. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. NrzaCalling read1(decode_content=False) is not supported after read1(decode_content=True) was called.r+TrVi ) r�r�r�r�r3r�r�rfr�r�r�)r&r�r�r'r�rhs r(r�zHTTPResponse.read1�s?��" � !�!�0�0�N� �3��7��C� � $� $�!�"�=����4�'�'�(�1�,��;��/�/�7�7�9�9��+�+�/�/��4�4� �!�8���~�~�c��~�.������K� ����� $�H�M��<�<��n�m�L�L� � � � $� $�\� 2��}���>�>�$�d�>�3�D� � �;��'�'�/�/�1� 1��#�#�'�'��,�,r+c#�lK�|jr,|j�r|j||��Ed{���yt|j�rt |j �dkDrI|j||��}|r|��t|j�s�/t |j �dkDr�Hyy7�|�w)a_ A generator wrapper for the read() method. A call will block until ``amt`` bytes have been read from the connection or until the connection is closed. :param amt: How much of the content to read. The generator will return up to much data per iteration, but may return less. This is particularly likely when using compressed data. However, the empty string will never be returned. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. r%Nr)r�r�)r��supports_chunked_readsr�rr*r�r3r�)r&r�r�r's r(r�zHTTPResponse.streams�����$ �<�<�D�7�7�9��(�(��^�(�L� L� L�"�4�8�8�,��D�4H�4H�0I�A�0M��y�y�S��y�H����J� #�4�8�8�,��D�4H�4H�0I�A�0M� M�s�3B4�B2�A B4�B4�0B4c��y)NTr6r-s r(�readablezHTTPResponse.readable*s��r+c� �|js&|jr|jj�|jr|jj�|js t j j|�yyr")rcr*r�r/r(r��IOBaser-s r(r�zHTTPResponse.close-sT���{�{�t�x�x� �H�H�N�N� � � � � � � � "� "� $���� �I�I�O�O�D� !�r+c�@�|js)tjjj |�S|j �yt |j d�r|j j�St |j d�r|j jSy)NTrArc)r(r�rorc�__get__r*rarAr-s r(rczHTTPResponse.closed7sq������9�9�#�#�+�+�D�1� 1� �X�X� �� �T�X�X�z� *��8�8�$�$�&� &� �T�X�X�x� (��8�8�?�?� "�r+c��|j� td��t|jd�r|jj�Std��)Nz-HTTPResponse has no file to get a fileno from�filenozOThe file-like object this HTTPResponse is wrapped around has no file descriptor)r*r=rarsr-s r(rszHTTPResponse.filenoDsI�� �8�8� ��I�J� J� �T�X�X�x� (��8�8�?�?�$� $��0�� r+c��|j�It|jd�r2t|jdd�s|jj�Syyy)Nr.rcF)r*rardr.r-s r(r.zHTTPResponse.flushOsJ�� �H�H� �����'�*��D�H�H�h��6��8�8�>�>�#� #�7�+� !r+c�.�t|jd�S)a Checks if the underlying file-like object looks like a :class:`http.client.HTTPResponse` object. We do this by testing for the fp attribute. If it is present we assume it returns raw chunks as processed by read_chunked(). �fp)rar*r-s r(rkz#HTTPResponse.supports_chunked_readsWs���t�x�x��&�&r+c�$�|j�y|jjj�}|j dd�d} t |d�|_y#t $r,|j�|r t||�d�td�d�wxYw)N�;rrrTzResponse ended prematurely) r0r*rv�readlinertr�r�r�rr)r&�lines r(�_update_chunk_lengthz!HTTPResponse._update_chunk_length`s��� �?�?� &���x�x�{�{�#�#�%���z�z�$��"�1�%�� L�!�$��m�D�O��� L� �J�J�L��(��t�4�$�>�$�$@�A�t�K� L�s �A�5Bc�n�d}|�K|jj|j�}|}|jjd�d|_|S|j�B||jkr3|jj|�}|j|z |_|}|S||jk(rA|jj|�}|jjd�d|_|}|S|jj|j�}|jjd�d|_|S)NrL)r*� _safe_readr0)r&r��returned_chunkr��values r(� _handle_chunkzHTTPResponse._handle_chunkrs���� �;��H�H�'�'����8�E�"�N� �H�H� � �� "�"�D�O����_�_� (�S�4�?�?�-B��H�H�'�'��,�E�"�o�o��3�D�O�"�N����D�O�O� #��H�H�'�'��,�E� �H�H� � �� "�"�D�O�"�N� ��"�X�X�0�0����A�N� �H�H� � �� "�"�D�O��r+c#�XK�|j�|js td��|j�s t d��|j �5|j r9t|j �r$|j j� ddd�y|jj� ddd�y|r|dkrd} |j�|jdk(rn,|j|�}|j||d��}|r|���L|r|j�}|r|��|j�:|jjj!�}|sn|dk(rn |j��:|j r|j j�ddd�y#1swYyxYw�w)a� Similar to :meth:`HTTPResponse.read`, but with an additional parameter: ``decode_content``. :param amt: How much of the content to read. If specified, caching is skipped because it doesn't make sense to cache partial content as the full response. :param decode_content: If True, will attempt to decode the body based on the 'content-encoding' header. zHResponse is not chunked. Header 'transfer-encoding: chunked' is missing.zkBody should be http.client.HTTPResponse like. It should have have an fp attribute which returns raw chunks.NrF)r�r�s )r�r�rrkrrUr+rr�r*rvr{r0r�r�r�ry)r&r�r�r��decodedrzs r(r�zHTTPResponse.read_chunked�s����� �����|�|�$�B�� ��*�*�,�*�P�� � � � � "��&�&�+>�t�?V�?V�+W��'�'�-�-�/�� . 0�. 0��x�x�{�{�"��. 0�. 0��s�Q�w�����)�)�+��?�?�a�'���*�*�3�/���,�,��.��'����!�M����-�-�/���!�M��(�(�&��x�x�{�{�+�+�-�����7�?�� �(�(�&��&�&��'�'�-�-�/�]#� "� "�s=�AF*�=F� F*�F�2 F*�;B3F�/&F� F*�F'�#F*c��|jS)z� Returns the URL that was the source of this response. If the request that generated this response redirected, this method will return the final redirect location. �r�r-s r(r�zHTTPResponse.url�s��� � � r+c��||_yr"r�r�s r(r�zHTTPResponse.url�s ����r+c#�.K�g}|jd��D]d}d|vrM|jd�}dj|�|dzdz��|ddD] }|dz��� |dr|dg}�Qg}�T|j|��f|rdj|���yy�w)NTr%� r+rrr�)r�rtrmrl)r&r�r��chunks�xs r(�__iter__zHTTPResponse.__iter__�s����� ���[�[��[�5�E���~����U�+���h�h�v�&����2�U�:�:���"��A��e�)�O�&��"�:�$�R�j�\�F��F�� � �e�$�6� ��(�(�6�"� "� �s�BB)r�NrrzHTTP/?NTTNNNNNTNNT)$r4r r�rr�r�r�r�r�rr�rr5rr�rr6z_HttplibHTTPResponse | Noner7zHTTPConnectionPool | Noner��HTTPConnection | Noner-z_HttplibHTTPMessage | Noner�rr'rr8rr�rr(rr1rHrGr2)r1r�)r1rr�)r8rr1r)r1z"typing.Generator[None, None, None]r")r�rr�rr1r0rrrrr)r�rr�rr1z#typing.Generator[bytes, None, None])r�rr1r0r)r�rr1rH)r1r)!r3r4r5r�r?r�r�r!r'r�rArCr1rrUrarfr�r�r�rmr�rcrsr.rkr{r�r�r�r"r�� __classcell__)r9s@r(rrs�����D�RV���&�!� $�#�9=�*.�,0�*.� $�'+�%)�"&��%<B��<B�P�<B�� <B� � <B� � <B��<B��<B��<B�7�<B�(�<B�*�<B�(�<B��<B�!%�<B� #�!<B�" �#<B�$�%<B�& �'<B�| � ������ �� �&�#�6�p�?$��?$�F�7N�� 7N� �7N�� 7N� � 7N�v�2�� 2� �2�� 2� � 2�l�&*�#� H� �H�$�H�� H� � H�X�&*�4-� �4-�$�4-� � 4-�nFJ����7B�� ,��8�"�� �� � �$�'�L�$�.EI�K0��K0�6A�K0� ,�K0�Z�!��!� �Z�Z� �� �#r+r)r�rr1r )Q� __future__rr�r�r�r��logging�rer[�typingrr<� contextlibr� http.clientr�_HttplibHTTPMessager�_HttplibHTTPResponse�socketrrP� TYPE_CHECKING�_base_connectionr � brotlicffir_� ImportError� zstandardrh�tuple�mapr��search� __version__�groups� _zstd_versionr��AttributeErrorr�r�r r � _collectionsr r�rrr� exceptionsrrrrrrrrrr� util.responserr� util.retryr�connectionpoolr� getLoggerr3rIr r8rKrQr]rfrqrur�ror�r6r+r(�<module>r�s���"�� ��� � � �� �%�:�<�+� ���4���#� ��� �C�����1�4�3C�3C�D�K�K�M�N��M��w�������(�(�C�C� � � �=�� ���2��g����!��$�$�!�^�!�@�� !�.�!�< �����" ��n��*�>��*�$F�F�Rm�r�y�y�m�`U #�#�U #��K ������� �F��� � �Z�0���H��s<�F�F%� F�F�F�F�F"�!F"�% F3�2F3

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