← back to Atmos Game
assets/gen/.venv/lib/python3.12/site-packages/httpcore/__pycache__/_trace.cpython-312.pyc
31 lines
�
c�bjp � �P � d dl mZ d dlZd dlZd dlZd dlZddlmZ G d� d� Zy)� )�annotationsN� )�Requestc � � e Zd Z d d
d�Zdd�Zdd�Z d
dd�Zdd�Zdd�Z d
dd�Z y)�TraceNc � � || _ || _ |�d n|j j d� | _ | j j t j � | _ |xs i | _ d | _
| j xs | j d u| _ | j j j d� d | _
y )N�trace�.�����)�name�logger�
extensions�get�trace_extension�isEnabledFor�logging�DEBUG�debug�kwargs�return_value�should_trace�split�prefix)�selfr r
�requestr s �f/Users/macstudio3/Projects/atmos-game/assets/gen/.venv/lib/python3.12/site-packages/httpcore/_trace.py�__init__zTrace.__init__ s� � � �� �����O�D��);�);�)?�)?��)H�
�� �[�[�-�-�g�m�m�<��
��l����(,��� �J�J�J�$�*>�*>�d�*J����k�k�&�&�,�,�S�1�"�5��� c � � | j �C| j � d|� �}| j ||� }t j |� rt d� �| j
rh|r d|v r|d �|}n>dj
|j � D ��cg c] \ }}|� d|���� c}}� }|� d|� �}| j j |� y y c c}}w )Nr
z�If you are using a synchronous interface, the callback of the `trace` extension should be a normal function instead of an asynchronous function.r � �=� r r �inspect�iscoroutine� TypeErrorr �join�itemsr
) r r �info�prefix_and_name�ret�message�key�value�argss r r zTrace.trace s� � ����+�!%���
�Q�t�f�5�O��&�&���=�C��"�"�3�'��P�� � �:�:��>�T�1�d�>�6J�6R����x�x�d�j�j�l� S�l�
��U�C�5��%��!3�l� S�T��!�F�!�D�6�*���K�K���g�&�
�� !Ts �C
c �t � | j r+| j }| j | j � d�|� | S �Nz.started)r r r r �r r( s r � __enter__zTrace.__enter__1 s2 � �����;�;�D��J�J�$�)�)��H�-�t�4��r c �� � | j rT|�.d| j i}| j | j � d�|� y d|i}| j | j � d�|� y y �Nr z .complete� exceptionz.failed)r r r r �r �exc_type� exc_value� tracebackr( s r �__exit__zTrace.__exit__7 sd � � ���� �&��(9�(9�:���
�
�d�i�i�[� �2�D�9�#�Y�/���
�
�d�i�i�[��0�$�7�
r c � � K � | j �M| j � d|� �}| j ||� }t j |� st d� �|� d { ��� | j
rh|r d|v r|d �|}n>dj
|j � D ��cg c] \ }}|� d|���� c}}� }|� d|� �}| j j |� y y 7 �yc c}}w �w)Nr
z�If you're using an asynchronous interface, the callback of the `trace` extension should be an asynchronous function rather than a normal function.r r r! r"