Skip to main content
Glama

ClickUp Operator

by noah-vh
connection.cpython-312.pyc35.7 kB
� lMgT�����ddlmZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddlm ZddlmZddlmZddlmZe j&rddlmZdd lmZdd lmZdd lmZdd lmZdd lm Z ddl!m"Z"m#Z#m$Z$ddl%m&Z&ddl'm(Z( ddl)Z)e)jTZ+ddl/m0Z0ddl/m1Z1ddl/m2Z2ddl3m4Z4ddl5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;ddl<m=Z=m>Z>m?Z?m@Z@ddlAmBZBddlmCZDddlmEZEmFZFmGZGmHZHmIZIddlJmKZKmLZLddlMmNZNeOZOePZPej�eR�ZSddd �ZTej�d!d"d�ZVej�d#�ZXeYe d$�ZZGd%�d&e�Z Gd'�d(e �Z[Gd)�d*e j��Z]d+d,� d4d-�Z^ d5 d6d.�Z_d7d/�Z`d8d0�ZaGd1�d2�Zbe)sebZ[e[Zc d9 d:d3�Zdy#e,e-f$rdZ)Gd�de.�Z+Y��AwxYw);�)� annotationsN)�HTTPConnection)� HTTPException)�ResponseNotReady��timeout��� HTTPResponse)�_TYPE_PEER_CERT_RET_DICT)� SSLTransport)�HTTPHeaderDict)�probe)�assert_header_parsing)�_DEFAULT_TIMEOUT� _TYPE_TIMEOUT�Timeout)�to_str)� wait_for_readc� �eZdZy)� BaseSSLErrorN)�__name__� __module__� __qualname__���^C:\Users\noahv\Documents\GitHub\clickup-operator\.venv\Lib\site-packages\urllib3/connection.pyrr%s�� rr)� _TYPE_BODY)� ProxyConfig)�_ResponseOptions�� __version__)�ConnectTimeoutError�HeaderParsingError�NameResolutionError�NewConnectionError� ProxyError�SystemTimeWarning)� SKIP_HEADER�SKIPPABLE_HEADERS� connection�ssl_)�body_to_chunks)�assert_fingerprint)�create_urllib3_context� is_ipaddress�resolve_cert_reqs�resolve_ssl_version�ssl_wrap_socket)�CertificateError�match_hostname)�Url�Pi���http�httpsi��z[^-!#$%&'*+.^_`|~0-9a-zA-Z]�auditc���eZdZUdZedZded<ejejdfgZ ded<dZ d ed <d Z d ed <ded<ded<ded<d ed<ded<ded<ded<ded< d2e d de d d d� d3�fd�Zed4d��Zej"d5d ��Zd6d!�Z d7 d8�fd"� Zej*d#krd9d$�Zd9d%�Zed:d&��Zed:d'��Zed:d(��Zed:d)��Zd9�fd*� Z d; d<�fd+� Zd=�fd,� Z d>dd-d-d-d.� d?d/�Z d> d@d0�Z dA�fd1� Z!�xZ"S)Bra� Based on :class:`http.client.HTTPConnection` but provides an extra constructor backwards-compatibility layer between older and newer Pythons. Additional keyword parameters are used to configure attributes of the connection. Accepted parameters include: - ``source_address``: Set the source address for the current connection. - ``socket_options``: Set specific options on the underlying socket. If not specified, then defaults are loaded from ``HTTPConnection.default_socket_options`` which includes disabling Nagle's algorithm (sets TCP_NODELAY to 1) unless the connection is behind a proxy. For example, if you wish to enable TCP Keep Alive in addition to the defaults, you might pass: .. code-block:: python HTTPConnection.default_socket_options + [ (socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1), ] Or you may want to disable the defaults by passing an empty list (e.g., ``[]``). r9ztyping.ClassVar[int]� default_portr z0typing.ClassVar[connection._TYPE_SOCKET_OPTIONS]�default_socket_optionsF�bool� is_verifiedNz bool | None�proxy_is_verified�int� blocksize�tuple[str, int] | None�source_addressz&connection._TYPE_SOCKET_OPTIONS | None�socket_options�_has_connected_to_proxyz_ResponseOptions | None�_response_options� str | None� _tunnel_host� int | None� _tunnel_port�_tunnel_scheme�@)rrFrDrG�proxy� proxy_configc����t� |�||tj|�||��||_||_||_d|_d|_d|_ d|_ d|_ y)N)�host�portrrFrDF) �super�__init__r�resolve_default_timeoutrGrPrQrHrIrKrMrN) �selfrSrTrrFrDrGrPrQ� __class__s �rrVzHTTPConnection.__init__�sr��� ������3�3�G�<�)�� � �-����� �(���',��$�!%���(,���(,���*.��rc�8�|jjd�S)a� Getter method to remove any trailing dots that indicate the hostname is an FQDN. In general, SSL certificates don't include the trailing dot indicating a fully-qualified domain name, and thus, they don't validate properly when checked against a domain name that includes the dot. In addition, some servers may not expect to receive the trailing dot when provided. However, the hostname with trailing dot is critical to DNS resolution; doing a lookup with the trailing dot will properly only resolve the appropriate FQDN, whereas a lookup without a trailing dot will search the system's search domain list. Thus, it's important to keep the original host around for use only in those cases where it's appropriate (i.e., when doing DNS lookup to establish the actual TCP connection across which we're going to send HTTP requests). �.)� _dns_host�rstrip�rXs rrSzHTTPConnection.host�s��"�~�~�$�$�S�)�)rc��||_y)z� Setter for the `host` property. We assume that only urllib3 uses the _dns_host attribute; httplib itself only uses `host`, and it seems reasonable that other libraries follow suit. N)r\)rX�values rrSzHTTPConnection.host�s ����rc � � tj|j|jf|j|j |j ��}tr,t!j"d||j|j�|S#tj$r}t|j||�|�d}~wt$r-}t|d|j�d|j�d��|�d}~wt$r}t|d|���|�d}~wwxYw)zoEstablish a socket connection and set nodelay settings on it. :return: New socket connection. )rFrGNzConnection to z timed out. (connect timeout=�)z&Failed to establish a new connection: zhttp.client.connect)r+�create_connectionr\rTrrFrG�socket�gaierrorr%rS� SocketTimeoutr#�OSErrorr&�_HAS_SYS_AUDIT�sysr<)rX�sock�es r� _new_connzHTTPConnection._new_conn�s���  ��/�/�������+�� � �#�2�2�#�2�2� �D�( � �I�I�+�T�4�9�9�d�i�i� H�� ��#��� A�%�d�i�i��q�9�q� @��� �%�� ���� �+H�����VW�X��� �� � �$��>�q�c�B��� �� �s0�A B�D�B.�. D�:(C"�" D�.C>�>Dc�^��|dvrtd|�d���t�|� |||��||_y)Nr8z$Invalid proxy scheme for tunneling: z", must be either 'http' or 'https')rT�headers)� ValueErrorrU� set_tunnelrN)rXrSrTrn�schemerYs �rrpzHTTPConnection.set_tunnel�sF��� �*� *��6�v�j�@b�c�� � ���4�d�G��<�$��r)�� �c���tjj}d|jj d�|j fz}|g}|j j�D]+\}}|j|�d|�d�j d���-|jd�|jdj|��~|j|j|j��} |j�\}}} |tjj k7r/|j#�t%d |�d | j'����� |j(j+|d z�} t-| �|kDrtjj/d ��| sn/| d vrn*|j0dkDrt3d| j5���}|j#�y#|j#�wxYw)NsCONNECT %s:%d HTTP/1.0 �asciiz: z zlatin-1� r)�methodzTunnel connection failed: � r z header line)rw� rrzheader:)r9�client�_MAXLINErK�encoderM�_tunnel_headers�items�append�send�join�response_classrj�_method� _read_status� HTTPStatus�OK�closerg�strip�fp�readline�len� LineTooLong� debuglevel�print�decode) rXr|�connectrn�headerr`�response�version�code�message�lines r�_tunnelzHTTPConnection._tunnel�s����{�{�+�+�H�3��!�!�(�(��1��!�!�7��G��i�G�!%�!5�!5�!;�!;�!=� ������&���E�7�$�7�>�>�y�I�J�">� �N�N�7� #� �I�I�c�h�h�w�'� (���*�*�4�9�9�T�\�\�*�J�H� !�+3�+@�+@�+B�(��$���4�?�?�-�-�-��J�J�L�!�$>�t�f�A�g�m�m�o�EV�"W�X�X��#�;�;�/�/��1� �=�D��4�y�8�+�"�k�k�5�5�m�D�D����4�4������*��i�����7����� ����� �s �*CG�G+c���|j�|_|jrd|_|j �t |j �|_|jrd|_yy)NTF)rlrjrKrHr�r@rPrBr^s rr�zHTTPConnection.connectsU���N�N�$�� � � � �+/�D� (� �L�L�N� (,�D�J�J�'7��$� � '� '�%*�D� "� (rc��|jduS�N)rjr^s r� is_closedzHTTPConnection.is_closed's���y�y�D� � rc�L�|j�yt|jd�� S)NFgr)rjrr^s r� is_connectedzHTTPConnection.is_connected+s#�� �9�9� �� ����C�8�8�8rc��|jSr�)rHr^s r�has_connected_to_proxyz%HTTPConnection.has_connected_to_proxy1s���+�+�+rc�L�t|j�xr|jduS)zT Return True if a forwarding proxy is configured, else return False N)r@rPrKr^s r�proxy_is_forwardingz"HTTPConnection.proxy_is_forwarding5s#�� �D�J�J��=�D�$5�$5��$=�=rc��� t�|��d|_d|_d|_d|_d|_d|_d|_d|_ y#d|_d|_d|_d|_d|_d|_d|_d|_ wxYw)NF) rUr�rjrArBrHrIrKrMrN)rXrYs �rr�zHTTPConnection.close<s���� '� �G�M�O��D�I�$�D� �%)�D� "�+0�D� (�%)�D� "� $�D� � $�D� �"&�D� ���D�I�$�D� �%)�D� "�+0�D� (�%)�D� "� $�D� � $�D� �"&�D� �s �A � :Bc���tj|�}|r td|�d|j��d���t�|�||||��S)�z+Method cannot contain non-token characters z (found at least rb)� skip_host�skip_accept_encoding)�_CONTAINS_CONTROL_CHAR_RE�searchro�grouprU� putrequest)rXrx�urlr�r��matchrYs �rr�zHTTPConnection.putrequestKsg���*�0�0��8�� ��=�f�Z�GX�Y^�Yd�Yd�Yf�Xi�ij�k�� ��w�!� �C�9�CW�"� � rc�0��td�|D��st�|�|g|���yt|j ��t vrNdj tt �D�cgc]}tj|���c}�}td|�d���ycc}w)r�c3�RK�|]}t|t�xr |tk(���!y�wr�)� isinstance�strr))�.0�vs r� <genexpr>z+HTTPConnection.putheader.<locals>.<genexpr>as%����K�F�q�:�a��%�:�!�{�*:�:�F�s�%'z', 'z(urllib3.util.SKIP_HEADER only supports '�'N) �anyrU� putheaderr�lowerr*r��sortedr��titlero)rXr��values�skippable_headersrYs �rr�zHTTPConnection.putheader_s�����K�F�K�K� �G� �f� .�v� .� �F�L�L�N� #�+<� <� &� � �17�8I�1J�K�1J�v����6�"�1J�K�!� ��:�;L�:M�Q�O�� � =��Ks� BT)�chunked�preload_content�decode_content�enforce_content_lengthc��|j�%|jj|j�t|||||��|_|�i}t d�|D��} d| v} d| v} |j ||| | ��t|||j��} | j} | j}|rd| vrW|jdd �nDd | vrd }n=d| vrd }n6d }|�| �0d }|jdd �n|jd t|��d| vr|jdt��|j�D]\}}|j||��|j�| �^| D]Y}|s�t!|t�r|j#d�}|r |j%dt'|�|fz��I|j%|��[|r|j%d�yy)N)�request_method� request_urlr�r�r�c3�NK�|]}t|j�����y�wr�)rr�)r��ks rr�z)HTTPConnection.request.<locals>.<genexpr>�s����C�7�a��q�w�w�y� 1�7�s�#%zaccept-encodingrS)r�r�)rxrDztransfer-encodingzTransfer-Encodingr�zcontent-lengthFTzContent-Lengthz user-agentz User-Agentzutf-8s%x %b s0 )rj� settimeoutrr rI� frozensetr�r-rD�chunks�content_lengthr�r��_get_default_user_agentr� endheadersr�r}r�r�)rXrxr��bodyrnr�r�r�r�� header_keysr�r�� chunks_and_clr�r�r�r`�chunks r�requestzHTTPConnection.requestms��� �9�9� � �I�I� � ���� .�"2�!��+�)�#9� " ��� �?��G��C�7�C�C� �0�K�?���k�)� � ��� �C�.B�i� � � '�t�F�d�n�n�U� ��%�%��&�5�5�� �"�+�5����2�I�>�  �;�.���$� �3��� ��!�)��)�"&�����':�I�F��N�N�#3�S��5H�I� �{� *� �N�N�<�)@�)B� C�$�]�]�_�M�F�E� �N�N�6�5� )�-� ���� � ������e�S�)�!�L�L��1�E���I�I�o��U��U�0C�C�D��I�I�e�$� � � �I�I�l� #� rc�h�tjdtd��|j||||d��y)z� Alternative to the common request method, which sends the body with chunked encoding and not as one block z�HTTPConnection.request_chunked() is deprecated and will be removed in urllib3 v2.1.0. Instead use HTTPConnection.request(..., chunked=True).���category� stacklevelT)r�rnr�N)�warnings�warn�DeprecationWarningr�)rXrxr�r�rns r�request_chunkedzHTTPConnection.request_chunked�s4�� � � � X�'��  � � � �V�S�t�W�d� �Krc���|j� t��|j}d|_|jj|j�ddlm}t�|�!�} t|j�t#|jj%��}||||j&|j(t+|dd�|j,|j.|j0||j2|j4|j � � }|S#ttf$r7}tjdt||j �|d��Yd}~��d}~wwxYw) a Get the response from the server. If the HTTPConnection is in the correct state, returns an instance of HTTPResponse or of whatever object is returned by the response_class variable. If a request has not been sent or if a previous response has not be handled, ResponseNotReady is raised. If the HTTP response indicates that the connection should be closed, then it will be closed before the response is returned. When the connection is closed, the underlying socket is closed. Nr r z$Failed to parse headers (url=%s): %sT)�exc_info� _http_vsn_strzHTTP/?) r�rn�statusr��version_string�reasonr�r��original_responser�r�r�)rIrrjr�rr�r rU� getresponser�msgr$� TypeError�log�warning�_url_from_connectionr�rrr�r��getattrr�r�r�r�r�)rX� resp_optionsr �httplib_response�hpernr�rYs �rr�zHTTPConnection.getresponse�s@��� � !� !� )�"�$� $��-�-� �!%��� � � ���T�\�\�*� +�!�7�.�0�� � !�"2�"6�"6� 7�!�!1�!5�!5�!;�!;�!=�>���!��#�*�*�$�,�,�"�4��(�C�#�*�*�(�8�8�'�6�6�.�#/�#F�#F�'�6�6�$�0�0�  �����1#�I�.� � �K�K�6�$�T�<�+C�+C�D��� � � �� �s�%D�E�-E�Er�)rSr�rTrLrrrFrErDrCrG�&None | connection._TYPE_SOCKET_OPTIONSrP� Url | NonerQ�ProxyConfig | None�return�None�r�r�)r`r�r�r�)r�� socket.socket)NNr9) rSr�rTrLrn�typing.Mapping[str, str] | Nonerqr�r�r��r�r�)r�r@)FF) rxr�r�r�r�r@r�r@r�r�)r�r�r�r�r�r�)NN)rxr�r�r�r��_TYPE_BODY | Nonernr�r�r@r�r@r�r@r�r@r�r�) rxr�r�r�r�r�rnr�r�r�)r�r )#rrr�__doc__�port_by_schemer>�__annotations__rd� IPPROTO_TCP� TCP_NODELAYr?rArBrrV�propertyrS�setterrlrpri� version_infor�r�r�r�r�r�r�r�r�r�r�r�� __classcell__�rYs@rrrTs����0*8��)?�L�&�?� � � �V�/�/��3�P��L�� �K���&*��{�)��N�*�*�:�:�!�!�.�.�������  �/� "2�15��.D� �+/�/��/��/� � /� /� /��/�,�/��/�)�/� �/�<�*��*�$ �[�[�����D �37�� %�� %�� %�1� %� � %� � %� ���*�$�$ !�L+�"�!��!��9��9� �,��,��>��>� '�& �%*�  �� �� ��  � #�  � �  �( �$#'�37� _$�� $�#�'+�_$��_$��_$� � _$� 1� _$��_$��_$��_$�!%�_$� �_$�J#'�37� L��L��L� � L� 1� L� � L�&6� �6�6rrc���eZdZUdZedZdZded<dZded<dZ ded<dZ d ed <dZ ded <dZ d ed <dZ d ed<dZded<dZded< deddej$ddddddddddddddddd� d�fd�Z d dd�Zdd�Zdd�Z�xZS)�HTTPSConnectionz� Many of the parameters to this constructor are passed to the underlying SSL socket by means of :py:func:`urllib3.util.ssl_wrap_socket`. r:N�int | str | None� cert_reqsrJ�ca_certs� ca_cert_dir�None | str | bytes� ca_cert_data� ssl_versionrL�ssl_minimum_version�ssl_maximum_versionr.z!typing.Callable[..., None] | None�_connect_callbackrO)rrFrDrGrPrQr�assert_hostnamer.�server_hostname� ssl_contextrrrrr r� cert_file�key_file� key_passwordc ����t�|�||||||||��||_||_||_| |_| |_| |_| |_||_ ||_ ||_ |xrtjj|�|_|xrtjj|�|_||_| �.|j �|j j$} n t'd�} | |_d|_y)N)rTrrFrDrGrPrQ)rUrVrrrr r r r.rrr �os�path� expanduserrrr� verify_moder1rr )rXrSrTrrFrDrGrPrQrr r.r r rrrrr rrrrrYs �rrVzHTTPSConnection.__init__,s����6 ��� ���)��)��%� � �!�� �"���(���&���.���.���"4���&���#6�� �#6�� � �A�R�W�W�%7�%7��%A�� �&�J�2�7�7�+=�+=�k�+J���(��� � ����+� �,�,�8�8� �-�d�3� �"���!%��rc ��tjdtd��|�.|j�|jj}n t d�}||_||_||_||_ ||_ ||_ |xrtjj|�|_|xrtjj|�|_| |_y)zX This method should only be called once, before the connection is used. z�HTTPSConnection.set_cert() is deprecated and will be removed in urllib3 v2.1.0. Instead provide the parameters to the HTTPSConnection constructor.r�r�N)r�r�r�r rr1rrrrr r.rrrrrr) rXrrrrrr r.rrs r�set_certzHTTPSConnection.set_certis��� � � � +�(��  � � ����+� �,�,�8�8� �-�d�3� � �� �"���"���(���.���"4��� �A�R�W�W�%7�%7��%A�� �&�J�2�7�7�+=�+=�k�+J���(��rc��|j�%|j�|j}|j}n|j}|j}dtj vrt j||��}nd}|j�&|jdtj�|�� |j�x|_ }|j}d}|j�n|jdk(r&|j|j|�x|_ }d}n|jdk(rd|_d|_|j#�|j}|j$� |j$}t&j(j+�t,k}|r"t/j0d t,�d �t2�|j5d �}t7did |�d |j8�d|j:�d|j<�d|j>�d|j@�d|jB�d|jD�d|jF�d|jH�d|jJ�d|�d|jL�d|�d|jN�d|jP��} | jR|_ |�5| jRjY�dk(} t jV||| ��|jZrd|_.n| j\|_.t_|j`�|_|j r|j�| j\|_yyy#tT$rN|j�&|jdtj�|��|�t jV||d���wxYw)N�h2)rSrTFzbefore connect)� thread_id�target_supports_http2r:Tr9zSystem time is way off (before z5). This will probably lead to SSL verification errorsr[rjrrrr rrrrrrr r � tls_in_tlsr r.zafter connect failure)rSrT�supports_http2r)1rKrMrSrTr,�ALPN_PROTOCOLS� http2_probe�acquire_and_getr � threading� get_identrlrjrN�_connect_tls_proxyrBrHr�r �datetime�date�today� RECENT_DATEr�r�r(r]�#_ssl_wrap_socket_and_match_hostnamerrrr rrrrrrr r r.rd� BaseException�set_and_release�selected_alpn_protocolr�rAr@rP) rX�probe_http2_host�probe_http2_portrrjr r� is_time_off�server_hostname_rm_dot�sock_and_verifiedrs rr�zHTTPSConnection.connect�s��� � � � (�T�->�->�-J�#�0�0� �#�0�0� �#�y�y� �#�y�y� � �4�&�&� &�$/�$?�$?�%�,<�%� !� %*� !� � !� !� -� � "� "� �#�-�-�/�&;� #� � I �#�~�~�/� /�D�I��#'�9�9�O��J�� � �,��&�&�'�1�'+�'>�'>�t�y�y�$�'O�O�D�I��!%�J��(�(�F�2�-2�D�*�04��,�� � ��"&�"3�"3���#�#�/�"&�"6�"6��"�-�-�-�-�/�+�=�K��� � �9�+��G:�:�&� �&5�%;�%;�C�%@� "� C�!��!��.�.�!�!�,�,�!�%)�$<�$<� !� %)�$<�$<� !� ��� !�!�,�,�!�"�.�.�!��.�.�!����!�"�.�.�!�!7�!�!�,�,�!�&�!�!%� 4� 4�!� $(�#:�#:�!!� �$*�0�0�D�I�( !� (�.�5�5�L�L�N�RV�V�N� � '� '�%�%�-� � � #� #�$�D� �0�<�<�D� � (,�D�J�J�'7��$� � '� '�D�,B�,B�,J�%6�%B�%B�D� "�-K� '��Q� ��%�%�1��&�&�+�'�1�1�3�*?�'�� %�,��+�+�)�0@�QU�� � �s�)GL(�(AM?c��tjt|j�}|j}t |f|j |j|j|j|j|j|j|||j|jddddd��}|j|_|j"S)zY Establish a TLS connection to the proxy using the provided SSL context. NF)rrrr rrrr r r r.rrrr)�typing�castrrQr r(rrrr rrrr r.rArBrd)rX�hostnamerjrQr r0s rr#z"HTTPSConnection._connect_tls_proxys��� �{�{�;��0A�0A�B� �"�.�.� �?� � ��n�n��(�(� $� 8� 8� $� 8� 8��]�]��(�(��*�*�$�#�(�8�8�+�>�>�����# ��&"3�!>�!>��� �'�'�'rr�).rSr�rTrLrrrFrErDrCrGr�rPr�rQr�rrr �"None | str | typing.Literal[False]r.rJr rJr �ssl.SSLContext | NonerrJrrJrrrrLr rLrrrrJrrJrrJr�r�) NNNNNNNNN)rrJrrJrrrrJrrJr r5r.rJrrJrrr�r�r�)r4r�rjr�r�z ssl.SSLSocket)rrrr�r�r>rr�rrrrrr r.r rrr?rVrr�r#r�r�s@rrrs@���� "�'�*�L�"&�I��&��H�j��"�K��"�'+�L�$�+�$(�K�!�(�&*���*�&*���*�%)�� �)�;?��8�?�  �;&� "2�15��.<�.S�.S� �+/�&*�>B�)-�&*�-1�#�"&�+/�*.�*.�(,� $�#�#'�3;&��;&��;&� � ;&� /� ;&��;&�,�;&��;&�)�;&�$�;&�<�;&�'�;&�$�;&� +�!;&�"�#;&�$ �%;&�&)�';&�((�);&�*(�+;&�,&�-;&�.�/;&�0�1;&�2!�3;&�4 �5;&�~ $� $�&*�#'�#�>B�)-�"&�+/�')��')��')�$� ')� !� ')� � ')�<�')�'�')� �')�)�')� �')�RGC�R(rrc�&�eZdZUdZded<ded<y)�_WrappedAndVerifiedSocketz[ Wrapped socket and whether the connection is verified after the TLS handshake zssl.SSLSocket | SSLTransportrdr@rAN)rrrr�r�rrrr8r89s��� )�(��rr8F)rc �d�d}|�$d}tt|�||t|���}n|}t|�|_| s&| s$| dus tj stj sd|_|s"| s | s|rt|d�r|j�| �6| jd�}d|vr|d|jd�}t|�r|} t|||||| | | ||�� } | rt|jd� �| �nd|jt j"k7rG|js;| dur7|j�}|rd}nt%|d d�xsd}t'|| xs| |�t)||jt j*k(xs t-| �� �S#t.$r|j1��wxYw) a2Logic for constructing an SSLContext from all TLS parameters, passing that down into ssl_wrap_socket, and then doing certificate verification either via hostname or fingerprint. This function exists to guarantee that both proxies and targets have the same behavior when connecting via TLS. FNT)rrr r�load_default_certs�[]�%) rj�keyfile�certfilerrrrr r r)� binary_form�hostname_checks_common_name)rdrA)r/r2r1rr,� IS_PYOPENSSL�HAS_NEVER_CHECK_COMMON_NAME�check_hostname�hasattrr:r��rfindr0r3�_assert_fingerprint� getpeercert�ssl� CERT_NONEr��_match_hostnamer8� CERT_REQUIREDr@r)r�)rjrrrr rrrrrrr r.r r r�default_ssl_context�context� normalized�ssl_sock�certr@s rr(r(Cs���0 ����"��(�+�K�8� 3� 3�'� �2�  ����+�I�6�G�� � � �e� #� � � ��/�/�!&��� ��� � �G�1� 2��"�"�$� �"�$�*�*�4�0� � �*� �#�$;�j�&6�&6�s�&;�<�J� � � #�(�O�� ���!���!�'��� �H�#� � ��$�$��$�6�8J� � � � �3�=�=� 0��*�*��u�,�-5�-A�-A�-C�D� #�.3�+��G�%B�E�J�S�e�,� ���2�?�+� � )���+�+�s�/@�/@�@�(��&�'� � �� ������ ��s �B7F�F/c��|jd�}t|�r|} t|||�y#t$r$}tj d||�||_�d}~wwxYw)Nr;z@Certificate did not match expected hostname: %s. Certificate: %s)r�r0r5r4r�r�� _peer_cert)rP�asserted_hostnamer@�stripped_hostnamerks rrJrJ�sh��*�/�/��5���%�&�-�� ��t�.�0K�L�� � � � � � N� � � ��� � �� �s� .� A�A�Ac���djtjdt|�j ���}d|vxs d|vxsd|v}d}t d|r|dk(r|nd ��|�}||_|S) Nryz[^a-z]zwrong version numberzunknown protocolzrecord layer failurez�. Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#https-proxy-error-http-proxyzUnable to connect to proxyr:r�)r��re�splitr�r�r'� __cause__)�err� proxy_scheme�error_normalized�is_likely_http_proxy�http_proxy_warning�new_errs r�_wrap_proxy_errorr_�s����x�x�����3�s�8�>�>�3C� D�E���"2�2� 6� �!1� 1� 6� !�%5� 5��  (�� � $�!5�,�'�:Q� �WY� Z� \� ��G� �G�� �Nrc��dt��S)Nzpython-urllib3/r!rrrr�r��s�� �[�M� *�*rc��eZdZdZy)�DummyConnectionz-Used to detect a failed ConnectionCls import.N)rrrr�rrrrbrb�s��7rrbc��t|t�rdnd}t||j|j|��j S)zUReturns the URL from a given connection. This is mainly used for testing and logging.r:r9)rqrSrTr)r�rr6rSrTr�)�connrrqs rr�r�s3�� #�4��9�W�v�F� �f�4�9�9�4�9�9�4� H� L� L�Lr)"rjr�r�None | str | intrrerrLr rLrrJrrJrrJrrJrrJrrr r5r.rJr rJr r6rr@r�r8)F)rPz_TYPE_PEER_CERT_RET_DICT | NonerSr�r@r@r�r�)rY� ExceptionrZrJr�r'r�r�)rdz HTTPConnection | HTTPSConnectionrrJr�r�)e� __future__rr$� http.clientr9�loggingrrVrdrir!r2r�r�_HTTPConnectionrrrrf� TYPE_CHECKINGr�r � util.ssl_r �util.ssltransportr � _collectionsr�http2rr� util.responser� util.timeoutrrr� util.utilr� util.waitrrH�SSLErrorr� ImportError�AttributeErrorr)�_base_connectionrrr �_versionr"� exceptionsr#r$r%r&r'r(�utilr)r*r+r,� util.requestr-r.rFr/r0r1r2r3�util.ssl_match_hostnamer4r5�util.urlr6�ConnectionError�BrokenPipeError� getLoggerrr�r�r%r'�compiler�rDrhr� NamedTupler8r(rJr_r�rb�VerifiedHTTPSConnectionr�rrr�<module>r�s���"���� � � � �� ��9�6�(�+� ���&�3�/�(�'�0�B�B��$� ���<�<�L�)�8�B�!���C�B�(�@���F��"��!���g����!���s�+���h�m�m�D�!�Q�'� �&�B�J�J�'E�F����g�&��C�_�C�L\(�n�\(�~�� 1� 1��6�#z� �z� �z�"� z� $� z� $� z��z��z��z��z��z�%�z�8�z�#�z� �z� '�!z�"�#z�$�%z�@).�� )����"&�� � �4�2+�8�8� �%�O�*��@D�M� *�M�2<�M��M��A �^�$� � �C� �}� � �s�G�G �G 

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