
    hp                    P    S SK Jr  S SKrS SKrS SKrS SKrSSKJr   " S S5      rg)    )annotationsN   )Requestc                      \ rS rSr  S         SS jjrSS jrSS jr   S       SS jjrSS jrSS jr	   S       SS	 jjr
S
rg)Trace   Nc                   Xl         X l        Uc  S OUR                  R                  S5      U l        U R                  R                  [        R                  5      U l        U=(       d    0 U l	        S U l
        U R                  =(       d    U R                  S LU l        U R                  R                   R                  S5      S   U l        g )Ntrace.)namelogger
extensionsgettrace_extensionisEnabledForloggingDEBUGdebugkwargsreturn_valueshould_tracesplitprefix)selfr   r   requestr   s        A/var/www/html/env/lib/python3.13/site-packages/httpcore/_trace.py__init__Trace.__init__   s     	OD););)?)?)H 	 [[--gmm<
l(, JJJ$*>*>d*Jkk&&,,S1"5    c           	        U R                   bH  U R                   SU 3nU R                  X25      n[        R                  " U5      (       a  [	        S5      eU R
                  (       as  U(       a  SU;   a	  US   c  UnOASR                  UR                  5        VVs/ s H  u  pgU SU< 3PM     snn5      nU SU 3nU R                  R                  U5        g g s  snnf )Nr   zIf 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
   Trace.trace   s    +!%Qtf5O&&=C""3''P  ::>T1d>6J6Rxxdjjl Sl
C5%!3l ST!F!D6*KKg&  !Ts   C
c                ~    U R                   (       a+  U R                  nU R                  U R                   S3U5        U $ Nz.started)r   r   r
   r   r   r*   s     r   	__enter__Trace.__enter__1   s2    ;;DJJ$))H-t4r    c                    U R                   (       aU  Uc.  SU R                  0nU R                  U R                   S3U5        g SU0nU R                  U R                   S3U5        g g Nr   z	.complete	exceptionz.failed)r   r   r
   r   r   exc_type	exc_value	tracebackr*   s        r   __exit__Trace.__exit__7   sd      &(9(9:

dii[	2D9#Y/

dii[0$7 r    c           	       #    U R                   bR  U R                   SU 3nU R                  X25      n[        R                  " U5      (       d  [	        S5      eUI S h  vN   U R
                  (       as  U(       a  SU;   a	  US   c  UnOASR                  UR                  5        VVs/ s H  u  pgU SU< 3PM     snn5      nU SU 3nU R                  R                  U5        g g  Ns  snnf 7f)Nr   zIf 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$   )	r   r   r*   r+   coror-   r.   r/   r0   s	            r   atraceTrace.atraceE   s     +!%Qtf5O''>D&&t,,Q 
 JJ::>T1d>6J6Rxxdjjl Sl
C5%!3l ST!F!D6*KKg&   !Ts%   AC/C'A	C/'C)
;-C/)C/c                   #    U R                   (       a3  U R                  nU R                  U R                   S3U5      I S h  vN   U $  N7fr3   )r   r   rB   r   r4   s     r   
__aenter__Trace.__aenter__Y   s@     ;;D++84d;;; <s   A AA	Ac                   #    U R                   (       ae  Uc6  SU R                  0nU R                  U R                   S3U5      I S h  vN   g SU0nU R                  U R                   S3U5      I S h  vN   g g  N2 N7fr8   )r   r   rB   r   r:   s        r   	__aexit__Trace.__aexit___   s~       &(9(9:kkTYYKy"94@@@#Y/kkTYYKw"7>>>  A ?s$   AA>A:+A>3A<4A><A>)r   r   r   r   r   r   r   r   )NN)
r   strr   zlogging.Loggerr   zRequest | Noner   zdict[str, typing.Any] | NonereturnNone)r   rJ   r*   zdict[str, typing.Any]rK   rL   )rK   r   )NNN)r;   ztype[BaseException] | Noner<   zBaseException | Noner=   ztypes.TracebackType | NonerK   rL   )__name__
__module____qualname____firstlineno__r   r
   r5   r>   rB   rE   rH   __static_attributes__ r    r   r   r      s    
 #'/366 6  	6
 -6 
6$'& 04*.04	8,8 (8 .	8
 
8'( 04*.04	?,? (? .	?
 
? ?r    r   )	
__future__r   r%   r   typestyping_modelsr   r   rR   r    r   <module>rW      s#    "     `? `?r    