
    F\hDi                     V   S r SSKr/ SQrS2S jrS3S jrS rS r\rS r\r	S	 r
S
\S
SS4S jr\SS4S jrS rS r " S S\5      rS rS rS rS rS rS rS rS rS4SS.S jjr  S5S jr " S S \5      r " S! S"\5      r " S# S$5      rS%r \ 4\RB                  S&.S' jjr"S( r# SS)K$J%r%J&r&J'r'JrJrJ(r(  \&r)\'r*S*r+\" \R\                  5        \+(       d7  \/" \S-5      (       d)  \" S+\0S.SS/9  \" S0\0SS19  \" S0\1SS19  \" S0\2SS19  \" S0\3SS19  C+g! \, a    / r%S+r)0 r*Sq-S, r(Sr+ Ngf = f)6z&Python part of the warnings subsystem.    N)	warnwarn_explicitshowwarningformatwarningfilterwarningssimplefilterresetwarningscatch_warnings
deprecatedc                 4    [        XX#XE5      n[        U5        g)7Hook to write a warning to a file; replace if you like.N)WarningMessage_showwarnmsg_impl)messagecategoryfilenamelinenofilelinemsgs          /usr/lib/python3.13/warnings.pyr   r   
   s    
Hd
ICc    c                 4    [        XX#SU5      n[        U5      $ ).Function to format a warning the standard way.N)r   _formatwarnmsg_impl)r   r   r   r   r   r   s         r   r   r      s    
HdD
ICs##r   c                     U R                   nUc  [        R                  nUc  g [        U 5      n UR	                  U5        g ! [
         a     g f = fN)r   sysstderr_formatwarnmsgwriteOSError)r   r   texts      r   r   r      sP    88D|zz< #D

4 s   A 
AAc                    U R                   R                  nU R                   SU R                   SU SU R                   S3nU R
                  c,   SS KnUR                  U R                  U R                  5      nOU R
                  nU(       a  UR                  5       nUSU-  -  nU R                  b   SS Kn UR                  5       (       + nUR                  U R                  5      nUb  US-  nU Ht  nUSUR                  < S	UR                  < S3-  n Wb'  UR                  UR                  UR                  5      nOS n U(       d  M\  UR                  5       nUS
U-  -  nMv     U$ U(       a  X! S3-  nU$ ! [         a    S nS n GNf = f! [         a    SnS n Nf = f! [         a    SnS n Nf = f! [         a    S n Nf = f)N:z: 
r   z  %s
Fz-Object allocated at (most recent call last):
z  File "z
", lineno z    %s
z<: Enable tracemalloc to get the object allocation traceback
)r   __name__r   r   r   r   	linecachegetline	Exceptionstripsourcetracemalloc
is_tracingget_object_traceback)	r   r   sr(   r   r-   suggest_tracemalloctbframes	            r   r   r   #   s   ||$$HLL>3::,b
"S[[M	DA
xx	$$S\\3::>D xxzz|	X_
zz	*5*@*@*B&B# 55cjjA >AAA7 8  ,(00N# 4::<Dd**A " H !J + , -AHc  	 DI		0   ',#	  	"'B	2 !  D sN   *E> 5F' :0F )F;F;>FFF$#F$'F87F8;G
	G
c                 &    [         nU[        Lae  [        U5      (       d  [        S5      eU" U R                  U R
                  U R                  U R                  U R                  U R                  5        g [        U 5        g! [         a     Nf = f)r   z:warnings.showwarning() must be set to a function or methodN)r   _showwarning_origcallable	TypeErrorr   r   r   r   r   r   	NameErrorr   )r   sws     r   _showwarnmsgr:   a   s     &&B<< !5 6 6 s{{CLL#,,

xx# ' c  s   B 
BBc                      [         nU[        La>  U" U R                  U R                  U R                  U R
                  U R                  5      $  [        U 5      $ ! [         a     Nf = f)r   )	r   _formatwarning_origr   r   r   r   r   r8   r   )r   fws     r   r    r    v   si    : ((ckk3<<llCJJ: : ) s##  s   A 
A('A( Fc           	      4   U S;  a  [        SU < 35      e[        U[        5      (       d  [        S5      e[        U[        5      (       a  [        U[        5      (       d  [        S5      e[        U[        5      (       d  [        S5      e[        U[        5      (       d  [        S5      eUS:  a  [        S5      eU(       d  U(       a  SS	KnU(       a  WR                  XR                  5      nOS	nU(       a  WR                  U5      nOS	n[        XX#XES
9  g	)a  Insert an entry into the list of warnings filters (at the front).

'action' -- one of "error", "ignore", "always", "default", "module",
            or "once"
'message' -- a regex that the warning message must match
'category' -- a class that the warning must be a subclass of
'module' -- a regex that the module name must match
'lineno' -- an integer line number, 0 matches all warnings
'append' -- if true, append to the list of filters
>   onceerroralwaysignoremoduledefaultinvalid action: zmessage must be a stringz#category must be a Warning subclasszmodule must be a stringlineno must be an intr   lineno must be an int >= 0Nappend)
ValueError
isinstancestrr7   type
issubclassWarningintrecompileI_add_filter)actionr   r   rD   r   rJ   rR   s          r   r   r      s     OO+F:677gs##233h%%Z'-J-J=>>fc""122fc""/00z566&**Wdd+F#6Ir   c           	          U S;  a  [        SU < 35      e[        U[        5      (       d  [        S5      eUS:  a  [        S5      e[	        U SUSX#S9  g)a  Insert a simple entry into the list of warnings filters (at the front).

A simple filter matches all modules and messages.
'action' -- one of "error", "ignore", "always", "default", "module",
            or "once"
'category' -- a class that the warning must be a subclass of
'lineno' -- an integer line number, 0 matches all warnings
'append' -- if true, append to the list of filters
>   r@   rA   rB   rC   rD   rE   rF   rG   r   rH   NrI   )rK   rL   rQ   r7   rU   )rV   r   r   rJ   s       r   r   r      s\     OO+F:677fc""/00z566hfDr   c                     U (       d/   [         R                  " U5        [         R                  " SU5        O U[         ;  a  [         R                  " U5        [        5         g ! [         a     NOf = f)Nr   )filtersremoverK   insertrJ   _filters_mutated)rJ   items     r   rU   rU      sV     	NN4  	q$wNN4   		s   A" "
A/.A/c                  *    / [         SS& [        5         g)zAClear the list of warning filters, so that no filters are active.N)rY   r\    r   r   r	   r	      s    GAJr   c                       \ rS rSrSrSrg)_OptionError   z,Exception used by option processing helpers.r_   N)r'   
__module____qualname____firstlineno____doc____static_attributes__r_   r   r   ra   ra      s    6r   ra   c                     U  H  n [        U5        M     g ! [         a$  n[        SU[        R                  S9   S nAM=  S nAff = f)NzInvalid -W option ignored:)r   )
_setoptionra   printr   r   )argsargr   s      r   _processoptionsrm      sA    	FsO   	F.#**EE	Fs   
AA  Ac                 t   U R                  S5      n[        U5      S:  a  [        SU < 35      e[        U5      S:  a"  UR                  S5        [        U5      S:  a  M"  U Vs/ s H  nUR	                  5       PM     snu  p4pVn[        U5      n[        U5      nU(       d  U(       a  SS KnU(       a  WR                  U5      nU(       a  WR                  U5      S-   nU(       a   [        U5      nUS:  a  [        eOSn[        X4XVU5        g s  snf ! [        [        4 a    [        SU< 35      S ef = f)Nr%      ztoo many fields (max 5): r>   r   z\Zzinvalid lineno )splitlenra   rJ   r+   
_getaction_getcategoryrR   escaperQ   rK   OverflowErrorr   )	rl   partsr0   rV   r   r   rD   r   rR   s	            r   ri   ri      s#   IIcNE
5zA~CABB
e*q.R e*q. ;@1A:?Q 23:?1A-FXvFH%H&))G$6"U*	J[Fz   
 6Hf='1A M* 	Jf>?TI	Js   %D)D !D7c                     U (       d  gU S:X  a  gS H  nUR                  U 5      (       d  M  Us  $    [        SU < 35      e)NrE   allrB   )rE   rB   rC   rD   r@   rA   rF   )
startswithra   )rV   as     r   rr   rr      s@    xG<<H H v7
88r   c                 Z   U (       d  [         $ SU ;  a  SS KnU nO$U R                  S5      u  p4n [        US S U/5      n [        X5      n[        U[         5      (       d  [        SU < 35      eU$ ! [         a    [        SU< 35      S ef = f! [         a    [        SU < 35      S ef = f)N.r   zinvalid module name: zunknown warning category: zinvalid warning category: )	rP   builtins
rpartition
__import__ImportErrorra   getattrAttributeErrorrO   )r   mklassrD   _cats         r   rs   rs     s    
(#..s35	P64w7ASa c7##XGHHJ  	PFDE4O	P  SXGHdRSs   A1  B 1BB*c                 $    SU ;   =(       a    SU ;   $ )N	importlib
_bootstrapr_   )r   s    r   _is_internal_filenamer     s    ("?|x'??r   c                 .   ^  [        U 4S jU 5       5      $ )Nc              3   F   >#    U  H  nTR                  U5      v   M     g 7fr   )ry   ).0prefixr   s     r   	<genexpr>'_is_filename_to_skip.<locals>.<genexpr>  s!     L9Kvx""6**9Ks   !)any)r   skip_file_prefixess   ` r   _is_filename_to_skipr     s    L9KLLLr   c                 @    [        U R                  R                  5      $ )zFSignal whether the frame is an internal CPython implementation detail.)r   f_codeco_filename)r3   s    r   _is_internal_framer     s     !9!9::r   c                 "   U R                   n U b  [        U R                  R                  =n5      (       d  [	        X!5      (       aI  U R                   n U b:  [        U R                  R                  =n5      (       a  M7  [	        X!5      (       a  MI  U $ )zBFind the next frame that doesn't involve Python or user internals.)f_backr   r   r   r   )r3   r   r   s      r   _next_external_framer   $  sq    LLE

!ell.F.F"F(GG >> 
!ell.F.F"F(GG >>Lr      r_   )r   c          
      n   [        U [        5      (       a  U R                  nUc  [        n[        U[        5      (       a  [        U[        5      (       d-  [        SR                  [	        U5      R                  5      5      e[        U[        5      (       d  [        S5      eU(       a  [        SU5      n US::  d$  [        [        R                  " S5      5      (       a  [        R                  " U5      nO?[        R                  " S5      n[        US-
  5       H  n[        XT5      nUb  M  [         e   UR"                  nUR$                  R&                  nUR(                  n	SU;   a  US   n
OS	n
UR-                  S
0 5      n[/        XXXXs5        g! [          a    [        R*                  nSnSn	 NOf = f)z:Issue a warning, or maybe ignore it or raise an exception.Nz/category must be a Warning subclass, not '{:s}'z+skip_file_prefixes must be a tuple of strs.   r   z<sys>r   r'   z<string>__warningregistry__)rL   rP   	__class__UserWarningrN   rO   r7   formatr'   tuplemaxr   r   	_getframeranger   rK   	f_globalsr   r   f_lineno__dict__
setdefaultr   )r   r   
stacklevelr,   r   r3   xglobalsr   r   rD   registrys               r   r   r   /  sy    '7##$$x&&:h+H+H %%+VDN,C,C%DF 	F(%00EFFJ'
 ?0q1ABB MM*-EMM!$E:a<(,UG=$$ ) //<<++W$!!"7<H'Xv#  ,,s   6A4F .F F43F4c                    [        U5      nUc'  U=(       d    SnUSS  R                  5       S:X  a  US S nUc  0 nUR                  SS5      [        :w  a  UR	                  5         [        US'   [        U [        5      (       a  [        U 5      nU R                  nO
U nU" U 5      n XU4n	UR                  U	5      (       a  g [         H^  n
U
u  ppnUb  UR                  U5      (       d  M$  [        X5      (       d  M6  Ub  UR                  U5      (       d  MQ  US:X  d  X?:X  d  M^    O   [        nUS:X  a  g SS KnUR                  X&5        US:X  a  U eUS:X  a,  S	XY'   X4n[        R                  U5      (       a  g S	[        U'   OPUS
:X  a  OIUS:X  a%  S	XY'   XS4nUR                  U5      (       a  g S	UU'   OUS:X  a  S	XY'   O[!        SU< SW
< 35      e[#        XX#US9n[%        U5        g )Nz	<unknown>z.pyversionr   rC   rA   r@   r   rB   rD   rE   zUnrecognized action (z) in warnings.filters:
 )r,   )rQ   lowerget_filters_versionclearrL   rP   rM   r   rY   matchrO   defaultactionr(   getlinesonceregistryRuntimeErrorr   r:   )r   r   r   r   rD   r   module_globalsr,   r#   keyr]   rV   r   r   modlnr(   oncekeyaltkeys                      r   r   r   ]  s    [F~(["#;%'CR[F||Iq!%55.'7##7|$$7#6
"C||C$(!Sr[CIIdOOx%%[CIIf--1W   x0"G$$ !W	8		8	!$<<	9	 t 	 HV
LCr   c                   ,    \ rS rSrSr  SS jrS rSrg)r   i  )r   r   r   r   r   r   r,   Nc                     Xl         X l        X0l        X@l        XPl        X`l        Xpl        U(       a  UR                  U l        g S U l        g r   )	r   r   r   r   r   r   r,   r'   _category_name)selfr   r   r   r   r   r   r,   s           r   __init__WarningMessage.__init__  s<      		3;h//r   c                     SU R                   < SU R                  < SU R                  < SU R                  < SU R                  < S3$ )Nz{message : z, category : z, filename : z, lineno : z	, line : })r   r   r   r   r   )r   s    r   __str__WarningMessage.__str__  s0    $(LL$2E2E$(MM4;;		K 	Lr   )r   r   r   r   r   r   r   r,   )NNN)r'   rc   rd   re   _WARNING_DETAILSr   r   rg   r_   r   r   r   r     s     * BF#'	FLr   r   c                   B    \ rS rSrSrSSS\SSS.S jrS rS	 rS
 r	Sr
g)r
   i  a  A context manager that copies and restores the warnings filter upon
exiting the context.

The 'record' argument specifies whether warnings should be captured by a
custom implementation of warnings.showwarning() and be appended to a list
returned by the context manager. Otherwise None is returned by the context
manager. The objects appended to the list are arguments whose attributes
mirror the arguments to showwarning().

The 'module' argument is to specify an alternative module to the module
named 'warnings' and imported under that name. This argument is only useful
when testing the warnings module itself.

If the 'action' argument is not None, the remaining arguments are passed
to warnings.simplefilter() as if it were called immediately on entering the
context.
FNr   )recordrD   rV   r   r   rJ   c                    Xl         Uc  [        R                  S   OUU l        SU l        Uc  SU l        gX4XV4U l        g)zSpecify whether to record warnings and if an alternative module
should be used other than sys.modules['warnings'].

For compatibility with Python 3.0, please consider all arguments to be
keyword-only.

NwarningsF)_recordr   modules_module_entered_filter)r   r   rD   rV   r   r   rJ   s          r   r   catch_warnings.__init__  s>     28.s{{:.f>DL"f=DLr   c                 "   / nU R                   (       a  UR                  S5        U R                  [        R                  S   La  UR                  SU R                  -  5        [        U 5      R                  nU< SSR                  U5      < S3$ )Nzrecord=Truer   z	module=%r(z, ))r   rJ   r   r   r   rN   r'   join)r   rk   names      r   __repr__catch_warnings.__repr__  sf    <<KK&<<s{{:66KKdll23Dz""411r   c                 J   U R                   (       a  [        SU -  5      eSU l         U R                  R                  U l        U R                  S S  U R                  l        U R                  R                  5         U R                  R                  U l        U R                  R                  U l        U R                  b  [        U R                  6   U R                  (       aD  / nUR                  U R                  l        U R                  R                  U R                  l        U$ g )NzCannot enter %r twiceT)r   r   r   rY   _filtersr\   r   _showwarningr   r   r   r   rJ   r5   )r   logs     r   	__enter__catch_warnings.__enter__  s    ==6=>>,,#}}Q/%%' LL44!%!?!?<<#$,,'<<C-0ZZDLL* (,||'E'EDLL$Jr   c                    U R                   (       d  [        SU -  5      eU R                  U R                  l        U R                  R                  5         U R                  U R                  l        U R                  U R                  l        g )Nz%Cannot exit %r without entering first)	r   r   r   r   rY   r\   r   r   r   )r   exc_infos     r   __exit__catch_warnings.__exit__  s^    }}FMNN#}}%%'#'#4#4 )-)?)?&r   )r   r   r   r   r   r   r   )r'   rc   rd   re   rf   rP   r   r   r   r   rg   r_   r   r   r
   r
     s,    $ "'twq>"2*@r   r
   c            	       N    \ rS rSrSr\SS.S\S\\   S-  S\	S	S4S
 jjr
S rSrg)r   i  a"  Indicate that a class, function or overload is deprecated.

When this decorator is applied to an object, the type checker
will generate a diagnostic on usage of the deprecated object.

Usage:

    @deprecated("Use B instead")
    class A:
        pass

    @deprecated("Use g instead")
    def f():
        pass

    @overload
    @deprecated("int support is deprecated")
    def g(x: int) -> int: ...
    @overload
    def g(x: str) -> int: ...

The warning specified by *category* will be emitted at runtime
on use of deprecated objects. For functions, that happens on calls;
for classes, on instantiation and on creation of subclasses.
If the *category* is ``None``, no warning is emitted at runtime.
The *stacklevel* determines where the
warning is emitted. If it is ``1`` (the default), the warning
is emitted at the direct caller of the deprecated object; if it
is higher, it is emitted further up the stack.
Static type checker behavior is not affected by the *category*
and *stacklevel* arguments.

The deprecation message passed to the decorator is saved in the
``__deprecated__`` attribute on the decorated object.
If applied to an overload, the decorator
must be after the ``@overload`` decorator for the attribute to
exist on the overload as returned by ``get_overloads()``.

See PEP 702 for details.

r   r   r   r   r   Nr   returnc                   [        U[        5      (       d"  [        S[        U5      R                  < 35      eXl        X l        X0l        g )Nz2Expected an object of type str for 'message', not )rL   rM   r7   rN   r'   r   r   r   )r   r   r   r   s       r   r   deprecated.__init__0  sD     '3''DT']E[E[D^_   $r   c                :  ^^^	^
^^ U R                   m	U R                  mU R                  mTc	  T	Tl        T$ [	        T[
        5      (       a  SS KnSSKJn  TR                  mUR                  T5      UUU	UU4S j5       n[        U5      Tl	        TR                  m
[	        T
U5      (       a:  T
R                  m
UR                  T
5      UU	U
U4S j5       n[        U5      Tl        O$UR                  T
5      UU	U
U4S j5       nUTl        T	=Tl        Ul        T	Ul        T$ [        T5      (       a\  SS KnSS KnUR                  T5      UUU	U4S j5       nUR#                  T5      (       a  UR%                  U5      nT	=Tl        Ul        U$ ['        ST< 35      e)Nr   )
MethodTypec                   > U TL a  [        TTTS-   S9  T[        R                  La  T" U /UQ70 UD6$ U R                  [        R                  L a&  U(       d  U(       a  [	        U R
                   S35      eT" U 5      $ )Nr   r   z() takes no arguments)r   object__new__r   r7   r'   )clsrk   kwargsrl   r   r   original_newr   s      r   r   $deprecated.__call__.<locals>.__new__O  sq    #:xJNKv~~5'=d=f==\\V__4$&#s||n4I$JKK',,r   c                  0   > [        TTTS-   S9  T" U 0 UD6$ Nr   r   r   rk   r   r   r   original_init_subclassr   s     r   __init_subclass__.deprecated.__call__.<locals>.__init_subclass__c  #    xJNK14B6BBr   c                  0   > [        TTTS-   S9  T" U 0 UD6$ r   r   r   s     r   r   r   l  r   r   c                  0   > [        TTTS-   S9  T" U 0 UD6$ r   r   )rk   r   rl   r   r   r   s     r   wrapper$deprecated.__call__.<locals>.wrapperz  s#    S8
QGD+F++r   zY@deprecated decorator with non-None category must be applied to a class or callable, not )r   r   r   __deprecated__rL   rN   	functoolstypesr   r   wrapsstaticmethodr   __func__classmethodr6   inspectiscoroutinefunctionmarkcoroutinefunctionr7   )r   rl   r  r   r   r   r  r   r   r   r   r   r   s    `      @@@@@r   __call__deprecated.__call__@  s    ll==__
!$CJT""(;;L__\*	- 	- +	- 'w/CK%(%:%:" 0*==)?)H)H&!78C 9C )44E(F% !78C 9C ):%:==C!7/2,Jc]]__S!, ", **3//!77@:==C!7N,,/74 r   )r   r   r   )r'   rc   rd   re   rf   DeprecationWarningrM   rN   rP   rQ   r   r
  rg   r_   r   r   r   r     sJ    (\ *<%%
 w-$&% % 
% Hr   r   z@{name!r} is deprecated and slated for removal in Python {remove})_versionc                    US    SUS    3nUSS U:  d  USS U:X  a  US   S:w  a  U < SU S	3n[        U5      eUR                  XS
9n[        U[        SS9  g)a.  Warn that *name* is deprecated or should be removed.

RuntimeError is raised if *remove* specifies a major/minor tuple older than
the current Python version or the same version but past the alpha.

The *message* argument is formatted with *name* and *remove* as a Python
version tuple (e.g. (3, 11)).

r   r|   r   Nr      alphaz% was slated for removal after Python z alpha)r   rZ   )r   )r   r   r   r  )r   r   rZ   r  remove_formattedr   s         r   _deprecatedr    s     !)AfQi[1!v8BQ<6#9hqkW>T=>N=OvV3nn$n@S$3r   c                 &  ^ ^ ST R                    S3/nT R                  bA  SS KmSS KnU U4S jnUR	                  S5        XR                  [        U" 5       5      5      -  nSR                  U5      R                  S5      n[        U[        ST S	9  g )
Nzcoroutine 'z' was never awaited
r   c               3   z   >#    [        TR                  5       H  u  pnTR                  X5      nXX#4v   M     g 7fr   )reversed	cr_originr)   )r   r   funcnamer   coror(   s       r   extract*_warn_unawaited_coroutine.<locals>.extract  s:     .6t~~.F*( ((:88 /Gs   8;z-Coroutine created at (most recent call last)
r>   r&   r   )r   r   r,   )rd   r  r(   	tracebackrJ   format_listlistr   rstripr   RuntimeWarning)r  	msg_linesr  r  r   r(   s   `    @r   _warn_unawaited_coroutiner!    s    
d''((=>I ~~!#	9 	IJ**4	?;;	
'')

#
#D
)C 	~!DAr   )rY   _defaultaction_onceregistryr   r   r\   TrE   c                      [         S-  q g )Nr   )r   r_   r   r   r\   r\     s    Ar   gettotalrefcount__main__)r   rD   rJ   rC   )r   rJ   )NNr   )Nr   N)NNNN)4rf   r   __all__r   r   r   r   r5   r:   r<   r    rP   r   r   rU   r	   r*   ra   rm   ri   rr   rs   r   r   r   r   r   r   r   r   r
   r   _DEPRECATED_MSGversion_infor  r!  	_warningsrY   r"  r#  r\   r   r   _warnings_defaultsr   r   warnoptionshasattrr  PendingDeprecationWarningImportWarningResourceWarningr_   r   r   <module>r1     s   , 
<
$
9x   & $ $ $&1%JN #*!E E$
	9 	
F>89*@M;
,#!,#^ >BDNLV L,I@V I@XB BJ U- 43CSCS 4(B<B B"M L    3*++y+=(	4X(:1EX(A!LXa@XB5  GML s   *D D('D(