� F�gA����ddlZddlZddlZddlZddlZddlZddlZddlmZm Z m Z ddl m Z ddl mZddlmZmZmZddlmZddlmZddlmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(ddl)Z)d d l*m+Z+m,Z,d d l-m.Z.m/Z/d d l0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9m:Z:m;Z;d d l<m=Z=d dl>m?Z?m@Z@mAZAd dl,mBZBmCZCmDZDmEZEmFZFmGZGd dlHmIZIer ddlJZJeJjKZKn ddlJZJeJjKZKn#eL$rdZJeMZKYnwxYweNdh��ZOeNddh��ZPeNddh��ZQePeOzZReReQzZSdejTcxkodkncp ejTdkZUdZVerd dlWmXZXd dl>mYZYd dlZm[Z[Gd�d��Z\Gd�d ��Z]Gd!�d"��Z^Gd#�d$��Z_Gd%�d&��Z`d'ead(eKfd)�Zbebd*��Zcebd+��ZdGd,�d-e_��ZeGd.�d/e_��ZfGd0�d1e_��ZgdS)2�N)� OrderedDict� defaultdict�deque)�suppress)� HTTPStatus)�chain�cycle�islice)� monotonic)� TracebackType)� TYPE_CHECKING�Any� Awaitable�Callable� DefaultDict�Deque�Dict�Iterator�List�Literal�Optional�Sequence�Set�Tuple�Type�Union�cast�)�hdrs�helpers)�AbstractResolver� ResolveResult) �ClientConnectionError�ClientConnectorCertificateError�ClientConnectorDNSError�ClientConnectorError�ClientConnectorSSLError�ClientHttpProxyError�ClientProxyConnectionError�ServerFingerprintMismatch�UnixClientConnectorError� cert_errors� ssl_errors)�ResponseHandler)� ClientRequest� Fingerprint�_merge_ssl_params)� ceil_timeout� is_ip_address�noop�sentinel� set_exception� set_result)�DefaultResolver��http�https�ws�wss)�� r)r>r?r)r>� �)� BaseConnector� TCPConnector� UnixConnector�NamedPipeConnector)� ClientTimeout)� ConnectionKey)�Tracec�B�eZdZdZdeeddfd�Zdefd�Zdd�ZdS) �_DeprecationWaiter�� _awaitable�_awaited� awaitable�returnNc�"�||_d|_dS�NFrK)�selfrNs �a/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/aiohttp/connector.py�__init__z_DeprecationWaiter.__init__hs��#����� � � �c�B�d|_|j���S�NT)rMrL� __await__�rRs rSrXz_DeprecationWaiter.__await__ls���� ���(�(�*�*�*rUc�L�|jstjdt��dSdS)NzDConnector.close() is a coroutine, please use await connector.close())rM�warnings�warn�DeprecationWarningrYs rS�__del__z_DeprecationWaiter.__del__ps<���}� � �M�5�"� � � � � � � rU�rON) �__name__� __module__� __qualname__� __slots__rrrTrXr^�rUrSrJrJesn������*�I��)�C�.��T�����+�3�+�+�+�+������rUrJc �D�eZdZdZdddddedejddf d �Zdefd �Z e fd e ddfd �Z de d fd�Zedejfd���Zedeejfd���Zedeefd���Zdegdfddfd�Zdd�Zdd�Zdd�Zedefd���ZdS)� ConnectionN� connectorrB�keyrG�protocol�looprOc���||_||_||_||_g|_|���r-t jtj d����|_ dSdS)Nr) �_key� _connector�_loop� _protocol� _callbacks� get_debug� traceback� extract_stack�sys� _getframe�_source_traceback)rRrgrhrirjs rSrTzConnection.__init__}si���� �#����� �4<���46��� �>�>� � � O�%.�%<�S�]�1�=M�=M�%N�%N�D� "� "� "� O� OrUc��d|j�d�S)Nz Connection<�>)rlrYs rS�__repr__zConnection.__repr__�s��)�T�Y�)�)�)�)rU� _warningsc�2�|j��d|i}|jd|��tfi|��|j���rdS|j�|j|jd���|dd�}|j� |j|d<|j� |��dSdS)N�sourcezUnclosed connection T�� should_closezUnclosed connection)�client_connection�message�source_traceback) ror\�ResourceWarningrn� is_closedrm�_releaserlrv�call_exception_handler)rRrz�kwargs�contexts rSr^zConnection.__del__�s��� �>� %���%�F� �I�N�:�$�:�:�O� V� V�v� V� V� V��z�#�#�%�%� ��� �O� $� $�T�Y���T� $� R� R� R�,0�=R�S�S�G��%�1�.2�.D��*�+� �J� -� -�g� 6� 6� 6� 6� 6� &� %rUTc��dS)z9Force subclasses to not be falsy, to make checks simpler.TrdrYs rS�__bool__zConnection.__bool__�s���trUc�H�tjdtd���|jS)Nz%connector.loop property is deprecated��� stacklevel)r[r\r]rnrYs rSrjzConnection.loop�s.��� � 3�5G�TU� � � � ��z�rUc�,�|j�dS|jjS�N)ro� transportrYs rSr�zConnection.transport�s�� �>� !��4��~�'�'rUc��|jSr�)rorYs rSrizConnection.protocol�s ���~�rU�callbackc�B�|�|j�|��dSdSr�)rp�append)rRr�s rS� add_callbackzConnection.add_callback�s,�� � � �O� "� "�8� ,� ,� ,� ,� ,� � rUc��|jdd�gc}|_|D]8}tt��5|��ddd��n #1swxYwY�9dSr�)rpr� Exception)rR� callbacks�cbs rS�_notify_releasezConnection._notify_release�s���%)�_�Q�Q�Q�%7��"� �4�?�� � �B��)�$�$� � ������ � � � � � � � � � � ���� � � � �� � s� A�A �A c��|���|j�0|j�|j|jd���d|_dSdS)NTr}�r�rormr�rlrYs rS�closezConnection.close�sP�� ������ �>� %� �O� $� $�T�Y���T� $� R� R� R�!�D�N�N�N� &� %rUc��|���|j�.|j�|j|j��d|_dSdSr�r�rYs rS�releasezConnection.release�sK�� ������ �>� %� �O� $� $�T�Y��� ?� ?� ?�!�D�N�N�N� &� %rUc�H�|jdup|j��� Sr�)ro� is_connectedrYs rS�closedzConnection.closed�s%���~��%�J�T�^�-H�-H�-J�-J�)J�JrUr_)r`rarbrvr.�asyncio�AbstractEventLooprT�strryr[rr^rr��propertyrjr� Transportr�rirr�r�r�r��boolr�rdrUrSrfrfys���������O�"�O��O�"� O� �'� O� � O�O�O�O� *�#�*�*�*�*�(0� 7� 7�� 7�D� 7� 7� 7� 7��'�$�-�������g�/�����X�� �(�8�G�$5�6�(�(�(��X�(� ��(�?�3�����X��-�X�b�$�h�%7�-�D�-�-�-�-�����"�"�"�"�"�"�"�"��K��K�K�K��X�K�K�KrUrfc��eZdZdZdZdd�ZdS)�_TransportPlaceholderz.placeholder for BaseConnector.connect functionrdrONc��dS)z Close the placeholder transport.NrdrYs rSr�z_TransportPlaceholder.close�s���rUr_)r`rarb�__doc__rcr�rdrUrSr�r��s3������8�8��I�/�/�/�/�/�/rUr�c��eZdZdZdZdZdZeZe ddddddd �d e e de fd e d ed ede deejde ddfd�Zefdeddfd�Zd8d�Zdeddfd�Zd8d�Z d9deeedeedeeddfd�Zede fd���Zedefd���Zedefd���Z d:d �Z!d:d!�Z"de#dfd"�Z$d:d#�Z%ede fd$���Z&d%d&defd'�Z'd(e(d)e)d*d+d,de*fd-�Z+d%d&d)e)d*ddfd.�Z,d%d&d)e)d*dee*fd/�Z-d:d0�Z.d%d&d1e/ddfd2�Z0dd3�d%d&d4e/d5e ddfd6�Z1d(e(d)e)d*d+d,de/fd7�Z2dS);rBa\Base connector class. keepalive_timeout - (optional) Keep-alive timeout. force_close - Set to True to force close and do reconnect after each request (and between redirects). limit - The total number of simultaneous connections. limit_per_host - Number of simultaneous connections to one host. enable_cleanup_closed - Enables clean-up closed ssl transports. Disabled by default. timeout_ceil_threshold - Trigger ceiling of timeout values when it's above timeout_ceil_threshold. loop - Optional event loop. TNg@F�dr���keepalive_timeout� force_close�limit�limit_per_host�enable_cleanup_closedrj�timeout_ceil_thresholdr�r�r�r�r�rjr�rOc�L�|r|�|turtd���n |turd}|ptj��}||_d|_|���r+tjtj d����|_ tt��|_||_||_t#��|_tt"��|_t)t*|��|_||_tt0��|_||_t7jt:|���|_d|_d|_ |r2tBs+tEj#dtj$��tJd���d}| |_&g|_'|�(��dS) Nz6keepalive_timeout cannot be set if force_close is Trueg.@Fr�rjzoenable_cleanup_closed ignored because https://github.com/python/cpython/pull/118960 is fixed in Python version r�r�))r5� ValueErrorr��get_running_loop�_timeout_ceil_threshold�_closedrqrrrsrtrurvrr�_conns�_limit�_limit_per_host�set� _acquired�_acquired_per_hostr�float�_keepalive_timeout� _force_closer�_waitersrn� functools�partialr.�_factory�_cleanup_handle�_cleanup_closed_handle�NEEDS_CLEANUP_CLOSEDr[r\� version_infor]�_cleanup_closed_disabled�_cleanup_closed_transports�_cleanup_closed)rRr�r�r�r�r�rjr�s rSrTzBaseConnector.__init__�s��� � )� �,�1B�(�1R�1R� �L�����!�H�,�,�$(�!��1�w�/�1�1��'=��$��� � �>�>� � � O�%.�%<�S�]�1�=M�=M�%N�%N�D� "� �� � � � ��� �-���/2�u�u��� �� � � ��#'�u�.?�"@�"@���'��� � � $� $� � ��� �!�)�/��E�E�E�� �?C���FJ��#� � *�)=� *� �M�8�%(�%5�8�8�#��  � � � �%*� !�,A�(A��%�MO��'� �������rUrzc�0�|jrdS|jsdSd�|j���D��}|���d|i}|jd|��t fi|��||dd�}|j� |j|d<|j�|��dS)Nc�,�g|]}t|����Srd)�repr)�.0�cs rS� <listcomp>z)BaseConnector.__del__.<locals>.<listcomp>@s��7�7�7�Q��a���7�7�7rUr|zUnclosed connector zUnclosed connector)rg� connectionsr�r�) r�r��values�_closer\r�rvrnr�)rRrz�connsr�r�s rSr^zBaseConnector.__del__:s��� �<� � �F��{� � �F�7�7�$�+�"4�"4�"6�"6�7�7�7�� � � � � � ��D�!��� ��5�T�5�5��Q�Q�&�Q�Q�Q�� �+� � �� � !� -�*.�*@�G�&� '� � �)�)�'�2�2�2�2�2rUc�:�tjdt��|S)NzH"with Connector():" is deprecated, use "async with Connector():" instead)r[r\r]rYs rS� __enter__zBaseConnector.__enter__Os%��� � 4� � � � � � rU�excc�.�|���dSr�)r�)rRr�s rS�__exit__zBaseConnector.__exit__Ws�� � � � � � � � rUc�� K�|Sr�rdrYs rS� __aenter__zBaseConnector.__aenter__Zs ����� rU�exc_type� exc_value� exc_tracebackc��>K�|����d{V��dSr�)r�)rRr�r�r�s rS� __aexit__zBaseConnector.__aexit__]s.���� �j�j�l�l���������rUc��|jS)z1Ultimately close connection on releasing if True.)r�rYs rSr�zBaseConnector.force_closees ��� � rUc��|jS)z�The total number for simultaneous connections. If limit is 0 the connector has no limit. The default limit size is 100. )r�rYs rSr�zBaseConnector.limitjs ���{�rUc��|jS)z�The limit for simultaneous connections to the same endpoint. Endpoints are the same if they are have equal (host, port, is_ssl) triple. )r�rYs rSr�zBaseConnector.limit_per_hostss ���#�#rUc��|jr |j���d|_t��}|j}|jr�t t ��}||z }|j���D]�\}}t ��}|D]}\}} |���r!| |z dkr|� || f���:|j } |� ��|j s!|j r|j� | ���~|r|||<��||_|jr*tj|d||j|j���|_dSdS)zCleanup unused transports.Nr�_cleanup�r�)r��cancelr r�r�rr�itemsr�r�r�r�r��is_sslr�r �weakref_handlernr�) rR�now�timeoutr��deadlinerhr��alive�proto�use_timer�s rSr�zBaseConnector._cleanup|s}�� � � (� � � '� '� )� )� )�$(�D� ��k�k���)�� �;� &�%�e�,�,�K��W�}�H�"�k�/�/�1�1� -� -� ��U�>C�g�g��',�J�J�O�E�8��)�)�+�+�!��8�0C�q�0H�0H�� � �e�X�%6�7�7�7� � %��I��K�K�M�M�M��8�J�S�Z�J��7�>�>�y�I�I�I���-�',�K��$��%�D�K� �;� �#*�#9����� �'+�'C� $�$�$�D� � � � � rUc��|jr|j���|jD]}|�|����g|_|js/t j|d|j|j|j ���|_dSdS)z~Double confirmation for transport close. Some broken ssl servers may leave socket open without proper close. Nr�r�) r�r�r��abortr�r r��_cleanup_closed_periodrnr�)rRr�s rSr�zBaseConnector._cleanup_closed�s��� � &� 1� � '� .� .� 0� 0� 0��8� "� "�I��$����!�!�!��*,��'��,� �*1�*@��!��+�� �'+�'C� +�+�+�D� '� '� '� � rUc�`�|���tt����S)zClose all opened transports.)r�rJr4rYs rSr�zBaseConnector.close�s!�� � � � � � �!�$�&�&�)�)�)rUc���|jrdSd|_ |j���r� |j���|j���|j���D]}|D]}|�����|j���d|_ |j ���d|_ dS|j r|j ���|j r|j ���|j���D]}|D]\}}|� ����|jD]}|� ���|j D]}|�|� ��� |j���|j���|j���D]}|D]}|�����|j���d|_ |j ���d|_ dS#|j���|j���|j���D]}|D]}|�����|j���d|_ |j ���d|_ wxYwrW)r�rnr�r��clearr�r�r�r�r�r�r�r�r�)rR� keyed_waiters� keyed_waiter�datar��t0r�s rSr�zBaseConnector._close�s"�� �<� � �F��� � /��z�#�#�%�%� ��, �K� � � � � � �N� � � "� "� "�!%��!5�!5�!7�!7� *� *� �$1�*�*�L� �'�'�)�)�)�)�*� �M� � � !� !� !�#'�D� � � +� 1� 1� 3� 3� 3�*.�D� '� '� '�7�#� .��$�+�+�-�-�-��*� 5��+�2�2�4�4�4�� �*�*�,�,� "� "��!%�"�"�I�E�2��K�K�M�M�M�M�"��� � ��� � � � � � �!�<� &� &� ��(��O�O�%�%�%�� &� �K� � � � � � �N� � � "� "� "�!%��!5�!5�!7�!7� *� *� �$1�*�*�L� �'�'�)�)�)�)�*� �M� � � !� !� !�#'�D� � � +� 1� 1� 3� 3� 3�*.�D� '� '� '�� �K� � � � � � �N� � � "� "� "�!%��!5�!5�!7�!7� *� *� �$1�*�*�L� �'�'�)�)�)�)�*� �M� � � !� !� !�#'�D� � � +� 1� 1� 3� 3� 3�*.�D� '� .� .� .� .s�H5�B6H5�5B)Kc��|jS)z;Is connector closed. A readonly property. )r�rYs rSr�zBaseConnector.closed�s �� �|�rUrhrGc���d}|jr$|jt|j��z x}dkr|S|jx}r6|j�|��x}r|t|��z}||kr|S|S)z� Return number of available connections. The limit, limit_per_host and the connection key are taken into account. If it returns less than 1 means that there are no connections available. rr)r��lenr�r�r��get)rRrh� total_remain� host_remain�acquireds rS�_available_connectionsz$BaseConnector._available_connections�s���� � �;� �D�K�#�d�n�:M�:M�,M�M�L�RS�S�S�� ��.� .�;� #��2�6�6�s�;�;�;�x� -��s�8�}�}�,� ��k�)�)�"�"��rU�req�tracesrHr�rFc���K�|j}|�||���d{V��x}�|St|j|j��4�d{V��|�|��dkrN|�||���d{V��|�||���d{V��x}�|cddd���d{V��Sttt����}|j � |��|j r |j |� |�� |r|D]}|����d{V���|�|||���d{V��}|r|D]}|����d{V���|jr#|���t'd���n%#t($r|�||���wxYw ddd���d{V��n#1�d{V��swxYwY|j �|��|j � |��|j r7|j |} | �|��| � |��t/||||j��S)z'Get from pool or create new connection.NrzConnector is closed.)�connection_key�_getr2�connect�ceil_thresholdr�_wait_for_available_connectionrr.r�r��addr�r��send_connection_create_start�_create_connection�send_connection_create_endr�r�r#� BaseException�_release_acquired�removerfrn) rRr r r�rh�conn� placeholder�tracer��acquired_per_hosts rSrzBaseConnector.connects������ ���)�)�C��0�0�0�0�0�0�0�0� 0�D� =��K�����1G�H�H� H� H� H� H� H� H� H� H��*�*�3�/�/�1�4�4��9�9�#�v�F�F�F�F�F�F�F�F�F�"&�)�)�C��"8�"8�8�8�8�8�8�8�8�D�E��  H� H� H� H� H� H� H� H� H� H� H� H� H� H� ��0E�0G�0G�H�H�K� �N� � �{� +� +� +��#� >��'��,�0�0��=�=�=� H��C�!'�C�C��#�@�@�B�B�B�B�B�B�B�B�B�B�"�5�5�c�6�7�K�K�K�K�K�K�K�K���A�!'�A�A��#�>�>�@�@�@�@�@�@�@�@�@�@� �<�H��K�K�M�M�M�/�0F�G�G�G�H�� !� � � ��&�&�s�K�8�8�8�� ����H�5 H� H� H� H� H� H� H� H� H� H� H� H� H� H� H� H� H� H� H� H� H� H� H���� H� H� H� H�F ����k�*�*�*� ����5�!�!�!� � � )� $� 7�� <� � � $� $�[� 1� 1� 1� � !� !�%� (� (� (��$��U�D�J�7�7�7s3� AG�2A"G�AF�4+G�"G�G� G!�$G!c��^K�d} |j���}|j|}d||<|r|�|d��� |r|D]}|����d{V���|�d{V��|r|D]}|����d{V���|�|d��|j�|d��s|j|=n>#|�|d��|j�|d��s|j|=wxYw|�|��dkrdS|dz }��))z&Wait for an available connection slot.rTNF��lastr) rn� create_futurer�� move_to_end�send_connection_queued_start�send_connection_queued_end�poprr)rRrhr �attempts�futr�rs rSrz,BaseConnector._wait_for_available_connection=s������� �(,� �(@�(@�(B�(B�C� �M�#�.�M�!%�M�#� �� ;��)�)�#�E�)�:�:�:� +��C�!'�C�C��#�@�@�B�B�B�B�B�B�B�B�B�B�� � � � � � � ��A�!'�A�A��#�>�>�@�@�@�@�@�@�@�@�@�@��!�!�#�t�,�,�,��}�(�(��d�3�3�+�� �c�*����!�!�#�t�,�,�,��}�(�(��d�3�3�+�� �c�*�*�*�*�*��*�*�3�/�/�!�3�3��� ��M�H�; s � A C�;D c���K�|j�|��x}�dSt��}|�r(|���\}}|���r�||z |jkr�|s|j|=|j�|��|jr |j |�|��|rE|D]B} |� ���d{V���#t$r|� ||���wxYwt||||j��S|j}|���|js!|jr|j�|��|��(|j|=dS)znGet next reusable connection for the key or None. The connection will be marked as acquired. N)r�rr �popleftr�r�r�rr�r��send_connection_reuseconnrrrfrnr�r�r�r�r�r�) rRrhr r��t1r�rrr�s rSr zBaseConnector._getgs������[�_�_�S�)�)� )�E� 2��4� �[�[��� B�� � ���I�E�2��!�!�#�#� @��R��4�3J�(J�(J��)�� �C�(���"�"�5�)�)�)��'�<��+�C�0�4�4�U�;�;�;��"�!'�"�"��"�"'�"A�"A�"C�"C�C�C�C�C�C�C�C�C��,�"�"�"� �2�2�3��>�>�>�!�"����"�$��U�D�J�?�?�?���I� �K�K�M�M�M��0� B�S�Z� B��/�6�6�y�A�A�A�3� B�8 �K�� ��ts �=C�"C:c�R�|jsdSt|j��}tj|��|D]r}|�|��dkr�|j|}|rG|�d���\}}|���s|�d��dS|�G�sdS)z� Iterates over all waiters until one to be released is found. The one to be released is not finished and belongs to a host that has available connections. NrFr)r��list�random�shuffler�popitem�doner7)rR�queuesrh�waiters�waiter�_s rS�_release_waiterzBaseConnector._release_waiter�s����}� � �F��d�m�$�$����v����� � �C��*�*�3�/�/�!�3�3���m�C�(�G�� �#�O�O��O�7�7� ����{�{�}�}���%�%�d�+�+�+��F�F� � �� � rUr�c���|jrdS|j�|��|jr;|j�|��x}r|�|��|s|j|=|���dS)zRelease acquired connection.N)r�r��discardr�r�rr4)rRrhr�r�s rSrzBaseConnector._release_acquired�s��� �<� � �F� ����u�%�%�%� � � 1�d�.E�.I�.I�#�.N�.N�%N�U� 1� �M�M�%� � � �� 1��+�C�0� �������rUr}rir~c��|jrdS|�||��|js |s|jrE|j}|���|jr!|js|j� |��dS|j |� |t��f��|j �/tj|d|j|j|j���|_ dSdS)Nr�r�)r�rr�r~r�r�r�r�r�r�r�r r�r r�r�rnr�)rRrhrir~r�s rSr�zBaseConnector._release�s��� �<� � �F� ���s�H�-�-�-� � � � � ��0E� � �*�I� �N�N� � � ��z� B�$�"?� B��/�6�6�y�A�A�A� �F� � �C�����9�;�;� 7�8�8�8� � � '�#*�#9����'�� �'+�'C� $�$�$�D� � � � (� 'rUc��"K�t���r�)�NotImplementedError)rRr r r�s rSrz BaseConnector._create_connection�s����"�#�#�#rU)rOrB)NNNr_)3r`rarbr�r�rvr��HIGH_LEVEL_SCHEMA_SET�allowed_protocol_schema_setr5r�objectr�r��intrr�r�rTr[rr^r�r�r�rrr r�r�r�r�r�r�r�rr�r�r�rr/rrfrrr r4r.rr�rrdrUrSrBrB�s1������ � ��G���!��"7�� 9A�!���&+�48�()�G�G�G�!���u�!4�5�G�� G� � G� � G� $�G��w�0�1�G�!&�G� �G�G�G�G�R(0�3�3��3�D�3�3�3�3�*�����S��T��������� 37�-1�15� ���4� �.�/���M�*�� � �.� � � �����!�T�!�!�!��X�!���s�����X���$��$�$�$��X�$�%�%�%�%�N����.*�y���*�*�*�*� &/�&/�&/�&/�P�������X���/��c�����238� �38�*.�w�-�38�BQ�38� �38�38�38�38�j(�"�(�,0��M�(� �(�(�(�(�T(�"�(�,0��M�(� �*� �(�(�(�(�T����4 �_� �_� �QU� � � � �$#� ��� ��"�� � � � ����@$� �$�*.�w�-�$�BQ�$� �$�$�$�$�$�$rUrBc���eZdZddeeddfd�Zdedefd�Zde e e fde e ddfd �Zde e e fddfd �Zdd �Zde e e fde e fd �Zde e e fdefd �ZdS)�_DNSCacheTableN�ttlrOc�0�i|_i|_||_dSr�)� _addrs_rr� _timestamps�_ttl)rRr@s rSrTz_DNSCacheTable.__init__�s��UW���9;����� � � rU�hostc��||jvSr�)rB)rRrEs rS� __contains__z_DNSCacheTable.__contains__�s���t�~�%�%rUrh�addrsc��t|��t|��f|j|<|j�t ��|j|<dSdSr�)r rrBrDr rC)rRrhrHs rSrz_DNSCacheTable.add�sF��$�U�|�|�S��Z�Z�8���s�� �9� �$-�K�K�D� �S� !� !� !� !� rUc��|j�|d��|j�|j�|d��dSdSr�)rBr#rDrC�rRrhs rSrz_DNSCacheTable.remove�sI�� ����3��%�%�%� �9� � � � � ��d� +� +� +� +� +� !� rUc�j�|j���|j���dSr�)rBr�rCrYs rSr�z_DNSCacheTable.clear�s1�� ������� ���� � � � � rUc�~�|j|\}}tt||����}t|��|Sr�)rBr+r �next)rRrhrj�lengthrHs rS� next_addrsz_DNSCacheTable.next_addrs�s9���~�c�*� ��f��V�D�&�)�)�*�*�� �T� � � �� rUc�^�|j�dS|j||jzt��kSrQ)rDrCr rKs rS�expiredz_DNSCacheTable.expired�s-�� �9� ��5����$�t�y�0�9�;�;�>�>rUr�r_)r`rarbrr�rTr<r�rGrr�r=rr"rrr�rPrRrdrUrSr?r?�s.��������H�U�O��t����� &��&�D�&�&�&�&�0�u�S�#�X��0�t�M�/B�0�t�0�0�0�0� ,�%��S��/�,�d�,�,�,�,� !�!�!�!��e�C��H�o��$�}�2E�����?�5��c��?�?�t�?�?�?�?�?�?rUr?�verifiedrOc��t�dS|rtj��}n�tjtj��}|xjtjzc_|xjtjzc_d|_tj|_ |xjtj zc_|� ��|� d��|S)z�Create SSL context. This method is not async-friendly and should be called from a thread because it will load certificates from disk and do other blocking I/O. NF)zhttp/1.1) �ssl�create_default_context� SSLContext�PROTOCOL_TLS_CLIENT�options� OP_NO_SSLv2� OP_NO_SSLv3�check_hostname� CERT_NONE� verify_mode�OP_NO_COMPRESSION�set_default_verify_paths�set_alpn_protocols)rS� sslcontexts rS�_make_ssl_contextrcs���  �{��t�� .��/�1�1� � ��^�C�$;�<�<� ����c�o�-������c�o�-���$)� �!�!$�� �����c�3�3����+�+�-�-�-��!�!�-�0�0�0� �rUTFc&����eZdZdZeedh��zZddddejj dddde dddddd d dd �d e d e e de de edejde edee eefde eeefde ededeefde dedede de ejdede ede ef$�fd�Zdedf�fd � Zedefd!���Zede fd"���Z dFd#e ed$e eddfd%�Z dGd#ed$ed&e e d'de!e"fd(�Z#d)eeefd#ed$ed*e$d+d&e e d'de!e"f d,�Z%d-e&d&e!d'd.d/de'fd0�Z(d-e&de efd1�Z)d-e&de d2fd3�Z*e+d4�d5e,d6e!e-j.d-e&d.d/d7e/e0d8e,deej1e'ffd9�Z2e+d4�d5e,d-e&d.d/d7e/e0d8e,deej1e'ff d:�Z3dHd<�Z4dId=�Z5de fd>�Z6d?ej1d-e&ddfd@�Z7e+fd?ej1d-e&d.d/d7e/e0deej8e'ff dA�Z9dBe!e"de!e-j.fdC�Z:e+d4�d-e&d&e!d'd.d/d7e/e0deej1e'ff dD�Z;d-e&d&e!d'd.d/deej8e'ffdE�Z<�xZ=S)JrCu-TCP connector. verify_ssl - Set to True to check ssl certifications. fingerprint - Pass the binary sha256 digest of the expected certificate in DER format to verify that the certificate the server presents matches. See also https://en.wikipedia.org/wiki/HTTP_Public_Key_Pinning resolver - Enable DNS lookups and use this resolver use_dns_cache - Use memory cache for DNS lookups. ttl_dns_cache - Max seconds having cached a DNS entry, None forever. family - socket address family local_addr - local tuple of (host, port) to bind socket to keepalive_timeout - (optional) Keep-alive timeout. force_close - Set to True to force close and do reconnect after each request (and between redirects). limit - The total number of simultaneous connections. limit_per_host - Number of simultaneous connections to one host. enable_cleanup_closed - Enables clean-up closed ssl transports. Disabled by default. happy_eyeballs_delay - This is the “Connection Attempt Delay” as defined in RFC 8305. To disable the happy eyeballs algorithm, set to None. interleave - “First Address Family Count” as defined in RFC 8305 loop - Optional event loop. �tcpTN� Fr�rr�g�?)� verify_ssl� fingerprint� use_dns_cache� ttl_dns_cache�family� ssl_contextrU� local_addr�resolverr�r�r�r�r�rjr��happy_eyeballs_delay� interleavergrhrirjrkrlrUrmrnr�r�r�r�r�rjr�rorpc ���t���| | | | |||���t||||��|_| �t |j���} | |_||_t|���|_ i|_ ||_ tj |��|_||_||_t#��|_dS)Nr�r�)r@)�superrTr1�_sslr8rn� _resolver�_use_dns_cacher?� _cached_hosts�_throttle_dns_futures�_family�aiohappyeyeballs�addr_to_addr_infos�_local_addr_infos�_happy_eyeballs_delay� _interleaver��_resolve_host_tasks)rRrgrhrirjrkrlrUrmrnr�r�r�r�r�rjr�rorp� __class__s �rSrTzTCPConnector.__init__Cs����, �����/�#��)�"7��#9� � � � �&�c�:�{�K�P�P�� � � �&�D�J�7�7�7�H�!���+���+� �>�>�>��� � �"��� �!1�!D�Z�!P�!P���%9��"�%���MP�U�U�� � � rUrOc���tj|j�����D]}|����|jD]}|����t �����S)zClose all ongoing DNS calls.)r� from_iterablerwr�r�r~rrr�)rRr%�trs �rSr�zTCPConnector.closessn����&�t�'A�'H�'H�'J�'J�K�K� � �C� �J�J�L�L�L�L��)� � �A� �H�H�J�J�J�J��w�w�}�}���rUc��|jS)zSocket family like AF_INET.)rxrYs rSrkzTCPConnector.family}s ���|�rUc��|jS)z%True if local DNS caching is enabled.)rurYs rSrizTCPConnector.use_dns_cache�s ���"�"rUrE�portc��|� |�|j�||f��dS|�|�td���|j���dS)z8Remove specified host/port or clear all dns local cache.Nz5either both host and port or none of them are allowed)rvrr�r�)rRrEr�s rS�clear_dns_cachezTCPConnector.clear_dns_cache�se�� � �� 0� � � %� %�t�T�l� 3� 3� 3� 3� 3� � ��!1��T�U�U� U� � � $� $� &� &� &� &� &rUr rHc��K�t|��r||||jddd�gS|jsn|r |D]}|�|���d{V���|j�|||j����d{V��}|r |D]}|�|���d{V���|S||f}||jvrX|j�|��s>|j� |��}|r |D]}|� |���d{V���|S||j vr�|j |}|j � ��} |�| ��|r |D]}|� |���d{V��� | �d{V��|�| ��n#|�| ��wxYw|j� |��St!��x|j |<}|�|||||��} t%j��} t(jdkrt%j| | d���} n| �| ��} | ���s9|j�| ��| �|jj�� t%j| ���d{V��S#t$j$rd d �} | �| ���wxYw) z*Resolve host and return list of addresses.r)�hostnamerEr�rkr��flagsN�rk)r>r@T)rj� eager_startr%�#asyncio.Future[List[ResolveResult]]rOc��tttj��5|���ddd��dS#1swxYwYdSr�)rr�r��CancelledError�result)r%s rS�drop_exceptionz2TCPConnector._resolve_host.<locals>.drop_exception�s����i��)?�@�@�!�!��J�J�L�L�L�!�!�!�!�!�!�!�!�!�!�!�!����!�!�!�!�!�!s�A�A� A)r%r�rON)r3rxru�send_dns_resolvehost_startrt�resolve�send_dns_resolvehost_endrvrRrP�send_dns_cache_hitrwrnrrr6r��_resolve_host_with_throttler�r�rtr��Task� create_taskr/r~�add_done_callback�shieldr�)rRrEr�r r�resrhr��futures�future�cororj�resolved_host_taskr�s rS� _resolve_hostzTCPConnector._resolve_host�s����� �� � � �!%� � �"�l��� �� � ��"� �� A�#�A�A�E��:�:�4�@�@�@�@�@�@�@�@�@�@���.�.�t�T�$�,�.�O�O�O�O�O�O�O�O�C�� ?�#�?�?�E��8�8��>�>�>�>�>�>�>�>�>�>��J��T�l�� �$�$� $� $�T�-?�-G�-G��-L�-L� $��'�2�2�3�7�7�F�� 9�#�9�9�E��2�2�4�8�8�8�8�8�8�8�8�8�8��M� �$�,� ,� ,��0��5�G�+/�:�+C�+C�+E�+E�F� �K�K�� � � �� 9�#�9�9�E��2�2�4�8�8�8�8�8�8�8�8�8�8� (�� � � � � � � �����'�'�'�'������'�'�'�'�����%�0�0��5�5� 5�58�E�E�9��"�3�'�'� �/�/��T�4��&�Q�Q���'�)�)�� � �w� &� &�!(��d��4�!P�!P�!P� � �!%�!1�!1�$�!7�!7� �!�&�&�(�(� S� � $� (� (�);� <� <� <� � 0� 0��1I�1Q� R� R� R� � ��(:�;�;�;�;�;�;�;�;� ;���%� � � � !� !� !� !� � 0� 0�� @� @� @� � ���s�"F�F�J�*Krhr�zasyncio.Future[None]c��K�|r |D]}|�|���d{V��� |r |D]}|�|���d{V���|j�|||j����d{V��}|r |D]}|�|���d{V���|j�||��|D]}t|d���n(#t$r} |D]}t|| ����d} ~ wwxYw |j � |��n#|j � |��wxYw|j� |��S)z�Resolve host and set result for all waiters. This method must be run in a task and shielded from cancellation to avoid cancelling the underlying lookup. Nr�)�send_dns_cache_missr�rtr�rxr�rvrr7rr6rwr#rP) rRrhrEr�r�r rrHr%�es rSr�z(TCPConnector._resolve_host_with_throttle�s����� � 6�� 6� 6���/�/��5�5�5�5�5�5�5�5�5�5� 0�� A�#�A�A�E��:�:�4�@�@�@�@�@�@�@�@�@�@��.�0�0��t�D�L�0�Q�Q�Q�Q�Q�Q�Q�Q�E�� ?�#�?�?�E��8�8��>�>�>�>�>�>�>�>�>�>� � � "� "�3�� .� .� .�� &� &���3��%�%�%�%� &��� � � �� &� &���c�1�%�%�%�%� �����  ���� &� � &� *� *�3� /� /� /� /��D� &� *� *�3� /� /� /� /�����!�,�,�S�1�1�1s*�BC�D� C(� C#�#C(�(D�D#r r�rFc��K�|jr!|�|||���d{V��\}}n |�|||���d{V��\}}|S)zcCreate connection. Has same keyword arguments as BaseEventLoop.create_connection. N)�proxy�_create_proxy_connection�_create_direct_connection)rRr r r�r3r�s rSrzTCPConnector._create_connectionst���� �9� R�!�:�:�3���P�P�P�P�P�P�P�P�H�A�u�u�!�;�;�C���Q�Q�Q�Q�Q�Q�Q�Q�H�A�u�� rUc� �|���sdSt�td���|j}t|tj��r|S|durt S|j}t|tj��r|S|durt StS)a*Logic to get the correct SSL context 0. if req.ssl is false, return None 1. if ssl_context is specified in req, use it 2. if _ssl_context is specified in self, use it 3. otherwise: 1. if verify_ssl is not specified in req, use self.ssl_context (will generate a default context according to self.verify_ssl) 2. if verify_ssl is True in req, generate a default SSL context 3. if verify_ssl is False in req, generate a SSL context that won't verify NzSSL is not supported.T)r�rU� RuntimeError� isinstancerW�_SSL_CONTEXT_UNVERIFIEDrs�_SSL_CONTEXT_VERIFIED)rRr rbs rS�_get_ssl_contextzTCPConnector._get_ssl_context$s����z�z�|�|� ��4� �;��6�7�7� 7��W� � �j�#�.� 1� 1� �� � �T� !� !�*� *��Y� � �j�#�.� 1� 1� �� � �T� !� !�*� *�$�$rUr0c�~�|j}t|t��r|S|j}t|t��r|SdSr�)rUr�r0rs)rRr �rets rS�_get_fingerprintzTCPConnector._get_fingerprintEsC���g�� �c�;� '� '� ��J��i�� �c�;� '� '� ��J��trU�� client_error�args� addr_infosr�r�c��LK� t|j|j���4�d{V��tj||j|j|j|j����d{V��}|jj |i|�d|i���d{V��cddd���d{V��S#1�d{V��swxYwYdS#t$r}t|j |��|�d}~wt$r}t|j |��|�d}~wt$r9}|j�t#|t$j��r�||j |��|�d}~wwxYw)N�r)r��local_addr_infosrorprj�sock)r2� sock_connectrry�start_connectionr{r|r}rn�create_connectionr,r$r r-r'�OSError�errnor�r�� TimeoutError) rRr�r r�r�r�r�r�r�s rS�_wrap_create_connectionz$TCPConnector._wrap_create_connectionNsN���� A�#��$�W�5K���� V� V� V� V� V� V� V� V�.�>�)�%)�%;�)-�)C�#�/��� ����������:�T�Z�9�4�U�6�U�U�PT�U�U�U�U�U�U�U�U�U� V� V� V� V� V� V� V� V� V� V� V� V� V� V� V� V� V� V� V� V� V� V� V� V���� V� V� V� V� V� V��� T� T� T�1�#�2D�c�J�J�PS� S������ L� L� L�)�#�*<�c�B�B�� K������ A� A� A��y� �Z��W�5I�%J�%J� ���,�s�1�3�7�7�S� @����� A���sS�!B�AB�4B� B�B�B�B� D#�$B:�: D#�C� D#�*4D�D#c���K� t|j|j���4�d{V��|jj|i|���d{V��cddd���d{V��S#1�d{V��swxYwYdS#t $r}t |j|��|�d}~wt$r}t|j|��|�d}~wt$r9}|j �t|tj��r�||j|��|�d}~wwxYw�Nr�)r2r�rrnr�r,r$r r-r'r�r�r�r�r�)rRr r�r�r�r�r�s rS�_wrap_existing_connectionz&TCPConnector._wrap_existing_connectionls����� A�#��$�W�5K���� K� K� K� K� K� K� K� K�:�T�Z�9�4�J�6�J�J�J�J�J�J�J�J� K� K� K� K� K� K� K� K� K� K� K� K� K� K� K� K� K� K� K� K� K� K� K� K���� K� K� K� K� K� K��� T� T� T�1�#�2D�c�J�J�PS� S������ L� L� L�)�#�*<�c�B�B�� K������ A� A� A��y� �Z��W�5I�%J�%J� ���,�s�1�3�7�7�S� @����� A���sQ�!A#�A�A#� A�A#�A�A#�# C,�-B� C,�B&�& C,�34C'�'C,r/c��|���sdS|j}|�J�|jdkrdS|���dS)z�Raise a :py:exc:`RuntimeError` on missing ``start_tls()``. It is necessary for TLS-in-TLS so that it is possible to send HTTPS queries through HTTPS proxies. This doesn't affect regular HTTP requests, though. Nr;)r�r��scheme�_check_loop_for_start_tls)rRr � proxy_urls rS�_fail_on_no_start_tlsz"TCPConnector._fail_on_no_start_tls�sW���z�z�|�|� � �F��I� ��$�$�$� � �w� &� &� �F� �&�&�(�(�(�(�(rUc�d� |jjdS#t$r}td��|�d}~wwxYw)Na�An HTTPS request is being sent through an HTTPS proxy. This needs support for TLS in TLS but it is not implemented in your runtime for the stdlib asyncio. Please upgrade to Python 3.11 or higher. For more details, please see: * https://bugs.python.org/issue37179 * https://github.com/python/cpython/pull/28073 * https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support * https://github.com/aio-libs/aiohttp/discussions/6044 )rn� start_tls�AttributeErrorr�)rR�attr_excs rSr�z&TCPConnector._check_loop_for_start_tls�sT�� � �J� � � � ��� � � �� K� � �� ����� ���s� � /�*�/c�R� |���dS#t$rYdSwxYw)NTF)r�r�rYs rS�_loop_supports_start_tlsz%TCPConnector._loop_supports_start_tls�sD�� � � *� *� ,� ,� ,��4��� � � ��5�5� ���s �� &�&�underlying_transportc��|jjjdkrdSt|dd��}|rdSt jdt |d���dS)z6Issue a warning if the requested URL has HTTPS scheme.r;N�_start_tls_compatibleFaAn HTTPS request is being sent through an HTTPS proxy. This support for TLS in TLS is known to be disabled in the stdlib asyncio (Python <3.11). This is why you'll probably see an error in the log below. It is possible to enable it via monkeypatching. For more details, see: * https://bugs.python.org/issue37179 * https://github.com/python/cpython/pull/28073 You can temporarily patch this as follows: * https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support * https://github.com/aio-libs/aiohttp/discussions/6044 r>)r|r�)� request_info�urlr��getattrr[r\�RuntimeWarning)rRr�r �asyncio_supports_tls_in_tlss rS�_warn_about_tls_in_tlsz#TCPConnector._warn_about_tls_in_tls�s{�� � � � &�'� 1� 1� �F�&-� � #� �' �' �#� '� � �F�� � G� ���! � � � � � rUc���K�|���}|�|��}tr|�J� t|j|j���4�d{V�� |j�||||jp|j |j ����d{V��}n##t$r|� ���wxYwt|tj��rr|�|��}|r[ |�|��nD#t$$r7|� ��|js|j�|���wxYwddd���d{V��n#1�d{V��swxYwY|� d} ||jt/| �����|�|��n�#t2$r} t5|j| ��| �d} ~ wt6$r} t9|j| ��| �d} ~ wt.$r9} | j�t| tj��r�||j| ��| �d} ~ wt>$r<} tAd|j �d|j!d�d|j"�d |j#pd �d | �d � ��| �d} ~ wwxYw||fS) z$Wrap the raw TCP transport with TLS.Nr�)�server_hostname�ssl_handshake_timeoutz:Failed to start TLS (possibly caused by closing transport)z2Cannot initialize a TLS-in-TLS connection to host �:�dz4 through an underlying connection to an HTTPS proxy z ssl:�defaultz [�])$r�r�r r2r�rrnr�r�rE�totalrr�r�r�r�r��checkr*r�r�r�r r��connection_mader,r$r-r'r�r�� TypeErrorr#r�r�rU) rRr�r r�r�� tls_protorb� tls_transportrh�msgr��type_errs rS�_start_tls_connectionz"TCPConnector._start_tls_connection�s������M�M�O�O� ��*�*�3�/�/� � � *��)�)�)�5 �#��$�W�5K���� "� "� "� "� "� "� "� "� �*.�*�*>�*>�,�!�"�(+�(;�(G�s�x�.5�m� +?�+�+�%�%�%�%�%�%�M�M��%����)�.�.�0�0�0�� ���� �m�W�->�?�?� "�"&�"7�"7��"<�"<�K�"�"�"�'�-�-�m�<�<�<�<��8�"�"�"�)�/�/�1�1�1�#'�#@�V� $� ?� F� F�}� U� U� U�!� "����- "� "� "� "� "� "� "� "� "� "� "� "� "� "� "� "� "� "� "� "� "� "� "���� "� "� "� "�^�$�R��"�l�3�#5�w�s�|�|�D�D�D� � %� %�� � � � ��/� T� T� T�1�#�2D�c�J�J�PS� S������ L� L� L�)�#�*<�c�B�B�� K������ A� A� A��y� �Z��W�5I�%J�%J� ���,�s�1�3�7�7�S� @������ � � � (�"��8�"�"� #��N�"�"�%(�Y�"�"�7:�w�7K�)�"�"��"�"�"��� �  ����� ����&�i�'�'s��!F�E�6B�E� B2�24E�'C=�<E�=AD>�>E�F� E�F� E�!F� I)�&F<�< I)� G� I)�,4H � I)�-7I$�$I)�hostsc��g}|D]�}|d}d|v}|r tjn tj}|jr |j|kr�;|r ||dddfn ||df}|�|tjtjd|f����|S)z�Converts the list of hosts to a list of addr_infos. The list of hosts is the result of a DNS lookup. The list of addr_infos is the result of a call to `socket.getaddrinfo()`. rEr�r�rr9)�socket�AF_INET6�AF_INETrxr�� SOCK_STREAM� IPPROTO_TCP)rRr�r��hinforE�is_ipv6rk�addrs rS�_convert_hosts_to_addr_infosz)TCPConnector._convert_hosts_to_addr_infoss���;=� �� � �E���=�D��T�k�G�(/�C�V�_�_�V�^�F��|� �� �� 6� 6��29�T�D�%��-��A�.�.��e�F�m�?T�D� � � ���+�V�-?��T�J� � � � ��rUc ��K�|�|��}|�|��}|jj}|�J�|�d��r|�d��dz}|j}|�J� |�|||����d{V��} nJ#t$r=} | j �t| tj ��r�t|j| ��| �d} ~ wwxYwd} |�| ��} | �rI|r|jp|�d��nd} |�|j||| | ||����d{V��\}}n?#t&tj f$r&} | } t)j| |j��Yd} ~ ��d} ~ wwxYw|���r�|r� |�|��n�#t2$r�} |���|js|j�|��| } |�d��}|���}t)j | |��Yd} ~ ��@d} ~ wwxYw||fS| �J�| �)Nz..�.)r )r�rUr�r�r r�r�)!r�r�r��raw_host�endswith�rstripr�r�r�r�r�r�r�r%r r�r�r�r�r&ry�pop_addr_infos_interleaver}r�r�r*r�r�r�r��get_extra_info� getpeername�remove_addr_infos)rRr r r�r�rbrhrEr�r�r��last_excr�r��transpr�r��bad_peers rSr�z&TCPConnector._create_direct_connection/s������*�*�3�/�/� ��+�+�C�0�0� ��w������� �=�=�� � � *��;�;�s�#�#�c�)�D��x������ L��,�,�T�4��,�G�G�G�G�G�G�G�G�E�E��� L� L� L��y� �Z��W�5I�%J�%J� ��*�#�*<�c�B�B�� K�����  L����)-���6�6�u�=�=� ��' �>H�Q��$�,��4�4�S�9�9�9�T� � �&*�&B�&B��M�#�"�)�$3��!-�'C�'�'�!�!�!�!�!�!� �����)�'�*>�?� � � ��� �:�:�t�GW�X�X�X���������� ���� �z�z�|�|� � � � ��%�%�f�-�-�-�-��0� � � ��L�L�N�N�N��8�G��7�>�>�v�F�F�F�"�H�*0�*?�*?��*I�*I�D�#�/�/�1�1�H�$�6�z�8�L�L�L��H�H�H�H����� �����5�=� ��'�'�'��NsI�6B� C�8C�C�*E�F�E<�<F�F1�1 H;�;A5H6�6H;c��K�|�|��|���}i}|j�|j}|jtj|tj<|j}|�J�ttj|||j |j |j ���}|� |g|t����d{V��\}} |j�tjd��} | �=|���s| |jtj<n| |jtj<|����r�|r|�||��tj|_|j|_|j�ddd���} t1|| | |j ��} |�| ���d{V��} | j}|�J�|�||j���| �| ���d{V��}d| _ |jdkrJ|j}|�tA|j��j!}tE| j#|j$|j||j����|s<|�%dd���}|�tMd ���|�'��}n##tP$r|�)���wxYw|s|�)��n#|s|�)��wwxYw|sU|�*|��}|�+|j,||||j-|� ���d{V�� | �)��S|�.|||� ���d{V�� | �)��S#tP$r*| �)��| �)���wxYw#| �)��wxYw|| fS) N)�headers�authrjrUr�)r�� proxy_auth�proxy_headers_hash)�read_until_eofr���)�statusr�r�r�)r�z)Transport does not expose socket instance)r�rUr�r�r )r r�)/r�r�� proxy_headersr�r�HOSTr�r/�METH_GETrrnrUr�r)r#� AUTHORIZATIONr��PROXY_AUTHORIZATIONr�� METH_CONNECT�methodr�r �_replacerf�sendro�set_response_paramsr��startr�reasonr�phraser(r��historyr�r��duprr�r�r�r�rEr�)rRr r r��runtime_has_start_tlsr�r�� proxy_reqr�r�rrhr� proxy_respri�respr��rawsockrbs rSr�z%TCPConnector._create_proxy_connectionzs����� �"�"�3�'�'�'� $� =� =� ?� ?��"$�� � � (��'�G� �[���3��� ���i������!� �M� ��������  � � � �"&�!?�!?� �r�7�1K�"@�" �" � � � � � � �� �5�� �$�$�T�%7��>�>�� � ��:�:�<�<� C�8<�� �D�4�5�5�>B� �!�$�":�;� �:�:�<�<�X #�$� <��+�+�I�s�;�;�;� $�0�I� ��G�I�M��$�-�-��t��.���C��d�C��� �;�;�D�(�~�~�d�3�3�3�3�3�3�3�3�J�D #��>���+�+�+� �,�,�#8�+/�+G�-����(�-�-�d�3�3�3�3�3�3�3�3�� "&���*��{�c�)�)�"&�+��"�?�&0���&=�&=�&D�G�2�&�3� �L�#'�;�$+�$(�L� ����1�0�"+�":�":�8�T�":�"R�"R��"�?�".� K�#�#��#*�+�+�-�-����$�����O�O�%�%�%�� ����1�*�!���)�)�)���1�*�!���)�)�)�)�*����-� �!%�!6�!6�s�!;�!;�J�!%�!?�!?�� � '�&�$�(+��� "@�"�"��������"� � �"�"�"�"�"�7�7���#� 8����������� � �"�"�"�"��q!� � � �� � �"�"�"�� � � � � �� �����p� � �"�"�"�"�����%��sQ�>AM<�N3�BJ�K� J<�<K�?N3�K/�/AN3� N3�<4N0�0N3�3O )NNr�)r r/rONr_)>r`rarbr�r:� frozensetr;r�� AddressFamily� AF_UNSPECr5r�r�bytesr=rWrr0rr�r!r�r<r�r�rTrr�r�rkrir�rrr"r�rr�r/r.rr�r�r&rry� AddrInfoTyperr�r�r�r�r�r�r�r�� BaseTransportr�r�r�r�� __classcell__�rs@rSrCrC$s����������8#8�)�)�U�G�:L�:L�"L��  �'+�"�')�'-�';�'E�,0�48�04�/3�8@�!���&+�48�()�04�$(�).S�.S�.S��.S��e�_� .S� � .S�  ��}� .S��$�.S��j�)�.S��4��j�0� 1�.S��U�3��8�_�-�.S��+�,�.S�!��u�f�!4�5�.S��.S��.S��.S� $�!.S�"�w�0�1�#.S�$!&�%.S�&'�u�o�'.S�(�S�M�).S�.S�.S�.S�.S�.S�`�y����������������X���#�t�#�#�#��X�#� AE� '� '��S�M� '�08�� � '� � '� '� '� '�KO�Y�Y��Y�"�Y�,4�X�g�5F�,G�Y� �m� �Y�Y�Y�Y�v'2� �3��8�_�'2��'2�� '2� �+�,� '2� ��'�*�+� '2� �m� �'2�'2�'2�'2�R � � �*.�w�-� �BQ� � � � � � �%�M�%�h�z�6J�%�%�%�%�B�M��h�}�6M�����)=� A�A�A��A��)�6�7�A�� A� !� A� �9�o� A��A� �w� �/�1� 2�A�A�A�A�F)=� A�A�A��A��A�!� A� �9�o� A� � A� �w� �/�1� 2�A�A�A�A�,)�)�)�)�$����"�$�����# �%�/�# ��# � � # �# �# �# �T)=� F(�F(�%�/�F(��F(�!� F(� �9�o� F(� �w�$�o�5� 6� F(�F(�F(�F(�P��-�(�� ��+� ,�����6)=� I�I�I� �I��W� �I�!� I� �9�o� I� �w� �/�1� 2�I�I�I�I�V| � �| �*.�w�-�| �BQ�| � �w�$�o�5� 6�| �| �| �| �| �| �| �| rUrCc����eZdZdZeedh��zZdedddfdede d e e e dfd e d e d eejd df�fd� Zed efd���Zdededddd efd�Z�xZS)rDa�Unix socket connector. path - Unix socket path. keepalive_timeout - (optional) Keep-alive timeout. force_close - Set to True to force close and do reconnect after each request (and between redirects). limit - The total number of simultaneous connections. limit_per_host - Number of simultaneous connections to one host. loop - Optional event loop. �unixFr�rN�pathr�r�r�r�rjrOc�b��t���|||||���||_dS)N�r�r�r�r�rj)rrrT�_path�rRr$r�r�r�r�rjrs �rSrTzUnixConnector.__init__sB��� �����#�/��)�� � � � ��� � � rUc��|jS)zPath to unix socket.�r'rYs rSr$zUnixConnector.path� ���z�rUr r rHr�rFc��K� t|j|j���4�d{V��|j�|j|j���d{V��\}}ddd���d{V��n#1�d{V��swxYwYnP#t$rC}|j�t|tj ��r�t|j |j|��|�d}~wwxYw|Sr�)r2r�rrn�create_unix_connectionr�r'r�r�r�r�r�r+r$r �rRr r r�r3r�r�s rSrz UnixConnector._create_connections����� X�#��$�W�5K���� � � � � � � � �"&��!B�!B��M�4�:�"�"���������5� � � � � � � � � � � � � � � � � � � � � � � ���� � � � ��� � X� X� X��y� �Z��W�5I�%J�%J� ��*�4�9�c�6H�#�N�N�TW� W����� X���� � s:�!A8�/A&�A8�& A0�0A8�3A0�4A8�8 C�>C�C�r`rarbr�r:rr;r5r�r�rr<r�r=rr�r�rTr�r$r/rr.rr r!s@rSrDrD�s-������� � �#8�)�)�V�H�:M�:M�"M�� "�8@���48�������!����!4�5� � � � � ��w�0�1�� �������$��c�����X��� ��*.�w�-��BQ�� ��������rUrDc����eZdZdZeedh��zZdedddfdede d e e e dfd e d e d eejd df�fd� Zed efd���Zdededddd efd�Z�xZS)rEa�Named pipe connector. Only supported by the proactor event loop. See also: https://docs.python.org/3/library/asyncio-eventloop.html path - Windows named pipe path. keepalive_timeout - (optional) Keep-alive timeout. force_close - Set to True to force close and do reconnect after each request (and between redirects). limit - The total number of simultaneous connections. limit_per_host - Number of simultaneous connections to one host. loop - Optional event loop. �npipeFr�rNr$r�r�r�r�rjrOc���t���|||||���t|jtj��st d���||_dS)Nr&z9Named Pipes only available in proactor loop under windows)rrrTr�rnr��ProactorEventLoopr�r'r(s �rSrTzNamedPipeConnector.__init__Asw��� �����#�/��)�� � � � �� �J��1� � � ��K��� ��� � � rUc��|jS)zPath to the named pipe.r*rYs rSr$zNamedPipeConnector.pathYr+rUr r rHr�rFc���K� t|j|j���4�d{V��|j�|j|j���d{V��\}}tjd���d{V��ddd���d{V��n#1�d{V��swxYwYnJ#t$r=}|j �t|tj ��r�t|j|��|�d}~wwxYwtt |��S)Nr�r)r2r�rrn�create_pipe_connectionr�r'r��sleepr�r�r�r�r&r rr.r.s rSrz%NamedPipeConnector._create_connection^s����� I�#��$�W�5K���� '� '� '� '� '� '� '� '�"&��!B�!B��M�4�:�"�"���������5��m�A�&�&�&�&�&�&�&�&�&� '� '� '� '� '� '� '� '� '� '� '� '� '� '� '� '� '� '� '� '� '� '� '���� '� '� '� '���� I� I� I��y� �Z��W�5I�%J�%J� ��&�s�'9�3�?�?�S� H����� I���� �O�U�+�+�+s;�!B�A B�.B� B � B� B �B� C�8C�Cr/r!s@rSrErE0s-������� � �#8�)�)�W�I�:N�:N�"N�� "�8@���48�������!����!4�5� � � � � ��w�0�1�� �������0��c�����X��,� �,�*.�w�-�,�BQ�,� �,�,�,�,�,�,�,�,rUrE)hr�r�r,r�rtrrr[� collectionsrrr� contextlibrr:r� itertoolsrr r �timer �typesr �typingr rrrrrrrrrrrrrrrrryr9rr �abcr!r"�client_exceptionsr#r$r%r&r'r(r)r*r+r,r-� client_protor.� client_reqrepr/r0r1r2r3r4r5r6r7rnr8rUrW� ImportErrorr<r�EMPTY_SCHEMA_SET�HTTP_SCHEMA_SET� WS_SCHEMA_SET�HTTP_AND_EMPTY_SCHEMA_SETr:r�r��__all__�clientrFrG�tracingrHrJrfr�rBr?r�rcr�r�rCrDrErdrUrS�<module>rJs����������� � � � � � � � � � � � ���������7�7�7�7�7�7�7�7�7�7�������������*�*�*�*�*�*�*�*�*�*���������������������������������������������������(������������0�0�0�0�0�0�0�0� � � � � � � � � � � � � � � � � � � � � � � � � � �*�)�)�)�)�)�H�H�H�H�H�H�H�H�H�H�����������������&�%�%�%�%�%�� ��J�J�J���J�J��� � � ��^� � �� ������� � � ������9�b�T�?�?���)�V�W�-�.�.��� �4��-�(�(� �+�.>�>��1�M�A��!�S�%5�����9�����#� �� �"� � S����%�%�%�%�%�%�,�,�,�,�,�,���������������(UK�UK�UK�UK�UK�UK�UK�UK�p/�/�/�/�/�/�/�/�A$�A$�A$�A$�A$�A$�A$�A$�H$?�$?�$?�$?�$?�$?�$?�$?�N��������6*�)�$�/�/��+�+�E�2�2��R  �R  �R  �R  �R  �=�R  �R  �R  �j4�4�4�4�4�M�4�4�4�nD,�D,�D,�D,�D,��D,�D,�D,�D,�D,s� C� C*�)C*
Memory