
     
3j^8                         S r SrSSKrSSKrSSKrS rS rS r " S S5      r " S	 S
5      r	 " S S\	5      r
S rS rS rS rS rS rSS jrg)zMethod decorator helpers.     Nc                 8    [         R                  " S[        U S9  g )Nz9decorating class methods with @cachedmethod is deprecated
stacklevelwarningswarnDeprecationWarningr   s    R/home/wildlama/miniconda3/lib/python3.13/site-packages/cachetools/_cachedmethod.py_warn_classmethodr   
   s    MMC    c                 8    [         R                  " U [        US9  g )Nr   r   )msgr   s     r   _warn_instance_dictr      s    MMr   c                     g Nr   )_s    r   _noner      s    r   c                   n    \ rS rSrSrSS jrS rS r\S 5       r	\S 5       r
\S	 5       r\S
 5       rSrg)_WrapperBase   zDWrapper base class providing default implementations for properties.Nc                    [        U[        5      (       a	  [        SS9  [        R                  " X5        Xl        X0l        [        R                  " XA5      U l        Ub  UO[        U l
        Ub  X`l        g [        U l        g )N   r   )
isinstancetyper   	functoolsupdate_wrapper_obj_WrapperBase__cachepartial_WrapperBase__keyr   _WrapperBase__lock_WrapperBase__cond)selfobjmethodcachekeylockconds          r   __init___WrapperBase.__init__!   s_    c4  +  .	&&s0
".dE".dEr   c                     [        5       er   NotImplementedErrorr$   argskwargss      r   __call___WrapperBase.__call__+       !##r   c                     [        5       er   r.   r$   s    r   cache_clear_WrapperBase.cache_clear.   r5   r   c                 8    U R                  U R                  5      $ r   )r   r   r7   s    r   r'   _WrapperBase.cache1   s    ||DII&&r   c                     U R                   $ r   )r!   r7   s    r   	cache_key_WrapperBase.cache_key5   s    zzr   c                 8    U R                  U R                  5      $ r   )r"   r   r7   s    r   
cache_lock_WrapperBase.cache_lock9       {{499%%r   c                 8    U R                  U R                  5      $ r   )r#   r   r7   s    r   cache_condition_WrapperBase.cache_condition=   rB   r   )__cache__cond__key__lockr   )NN)__name__
__module____qualname____firstlineno____doc__r+   r3   r8   propertyr'   r=   r@   rD   __static_attributes__r   r   r   r   r      sd    N:$$ ' '   & & & &r   r   c                   2    \ rS rSrSrSS jrS rS	S jrSrg)
_DescriptorBaseB   zADescriptor base class implementing the basic descriptor protocol.c                     S U l         Xl        g r   )_DescriptorBase__attrname_DescriptorBase__deprecated)r$   
deprecateds     r   r+   _DescriptorBase.__init__E   s    &r   c                     U R                   c  X l         g X R                   :w  a  [        SU R                   < SU< S35      eg )Nz=Cannot assign the same @cachedmethod to two different names (z and z).)rU   	TypeError)r$   ownernames      r   __set_name___DescriptorBase.__set_name__I   sI    ??""O__$OO&eD827  %r   Nc                 ^   U R                  U5      nUc   U$ U R                  b)   UR                  R                  U R                  U5      nU$ U R                  (       a   U$ Sn[        U5      S e! [         aU    S[        U5      R                  < SU R                  < S3nU R                  (       a  [        US5         U$ [        U5      S e[         aU    S[        U5      R                  < SU R                  < S3nU R                  (       a  [        US5         U$ [        U5      S ef = f)NzNo '__dict__' attribute on z instance to cache z
 property.   zThe '__dict__' attribute on z7 instance does not support item assignment for caching zDCannot use @cachedmethod instance without calling __set_name__ on it)
WrapperrU   __dict__
setdefaultAttributeErrorr   rJ   rV   r   rZ   )r$   r%   objtypewrapperr   s        r   __get___DescriptorBase.__get__R   sK   ,,s#; @ ? __(3 ,,11$//7K4    YCC.d*1 " 	3 2$s)2D2D1G H))-(;:G  $$'Q/$ ! $C.d2 	32493E3E2H I#1= 
 $$'Q/  $C.d2	3s   &A0 0AD,AD,D,)
__attrname__deprecated)Fr   )	rJ   rK   rL   rM   rN   r+   r]   rg   rP   r   r   r   rR   rR   B   s    K'&r   rR   c                   8   ^  \ rS rSrSrU 4S jrS rS rSrU =r	$ )_DeprecatedDescriptorBase{   z=Descriptor base class supporting deprecated @classmethod use.c                 8   > [         TU ]  SS9  Xl        X l        g )NT)rW   )superr+   "_DeprecatedDescriptorBase__wrapper&_DeprecatedDescriptorBase__cache_clear)r$   rf   r8   	__class__s      r   r+   "_DeprecatedDescriptorBase.__init__~   s    D) (r   c                 8    [        SS9  U R                  " U0 UD6$ Nr`   r   )r   rp   r0   s      r   r3   "_DeprecatedDescriptorBase.__call__   s    Q'~~t.v..r   c                 6    [        SS9  U R                  U5      $ ru   )r   rq   )r$   re   s     r   r8   %_DeprecatedDescriptorBase.cache_clear   s    Q'!!'**r   )__cache_clear	__wrapper)
rJ   rK   rL   rM   rN   r+   r3   r8   rP   __classcell__)rr   s   @r   rl   rl   {   s    G)/
+ +r   rl   c                 J   ^ ^^^^^  " UUUUUU 4S jS[         5      nU" 5       $ )Nc                   <   > \ rS rSr " U UUUUU4S jS\5      rSrg)#_condition_info.<locals>.Descriptor   c                   R   >^  \ rS rSrU UUUUU4S jrU4S jrS rU4S jrSrU =r	$ )+_condition_info.<locals>.Descriptor.Wrapper   c                 h   > [         TU ]  UTTTTT5        S=U l        U l        [	        5       U l        g Nr   )ro   r+   _Wrapper__hits_Wrapper__missesset_Wrapper__pendingr$   r%   rr   r'   r*   r(   r)   r&   s     r   r+   4_condition_info.<locals>.Descriptor.Wrapper.__init__   s1     feS$E.//dm!$r   c                   >^ ^ T R                   nT R                  nT R                  nT R                  " U0 UD6mU   UR	                  UU 4S j5         UT   nT =R
                  S-  sl        UsS S S 5        $ ! [         a3    T R                  R                  T5        T =R                  S-  sl	         Of = f S S S 5        O! , (       d  f       O= f T	" T R                  /UQ70 UD6nU    XsT'   O! [         a     Of = fUsS S S 5        U   T R                  R                  T5        UR                  5         S S S 5        $ ! , (       d  f       $ = f! , (       d  f       O= f U   T R                  R                  T5        UR                  5         S S S 5        g ! , (       d  f       g = f! U   T R                  R                  T5        UR                  5         S S S 5        f ! , (       d  f       f = f= f)Nc                  "   > T TR                   ;  $ r   )r   )r(   r$   s   r   <lambda>F_condition_info.<locals>.Descriptor.Wrapper.__call__.<locals>.<lambda>   s    #T^^*Cr      )r'   r@   rD   r=   wait_forr   KeyErrorr   addr   r   
ValueErrorremove
notify_all)
r$   r1   r2   r'   r)   r*   resultvalr(   r&   s
   `       @r   r3   4_condition_info.<locals>.Descriptor.Wrapper.__call__   sw   

++nnd5f5MM"CD+!&sq(% T $ +**3/*+% TT* <T<V<C!),#J) ! !"  --c2)   --c2) --c2) s   CA99:B63C5B66C
CF0 -E/C43E4
D>E DE	F0 ,E
E	
E$ F0 *,F
F-0G93,G(	G9(
G62G9c                     U R                      U R                  R                  5         S=U l        U l        S S S 5        g ! , (       d  f       g = fr   r@   r'   clearr   r   r7   s    r   r8   7_condition_info.<locals>.Descriptor.Wrapper.cache_clear   1    __JJ$$&233DK$- %__	   )?
Ac                    > U R                      T" U R                  U R                  U R                  5      sS S S 5        $ ! , (       d  f       g = fr   r@   r'   r   r   r$   infos    r   
cache_info6_condition_info.<locals>.Descriptor.Wrapper.cache_info   ,    __

DKKG %__   (A  
A)__hits__misses	__pending
rJ   rK   rL   rM   r+   r3   r8   r   rP   r{   )rr   r'   r*   r   r(   r)   r&   s   @r   ra   r      s#    ' '
*84
H Hr   ra   r   NrJ   rK   rL   rM   r   ra   rP   )r'   r*   r   r(   r)   r&   s   r   
Descriptorr~      s    )	H )	Hl )	Hr   r   rR   )r&   r'   r(   r)   r*   r   r   s   `````` r   _condition_infor      s"    *H *H_ *HX <r   c                 F   ^ ^^^^  " UUUUU 4S jS[         5      nU" 5       $ )Nc                   :   > \ rS rSr " U UUUU4S jS\5      rSrg) _locked_info.<locals>.Descriptor   c                   P   >^  \ rS rSrU UUUU4S jrU4S jrS rU4S jrSrU =r	$ )(_locked_info.<locals>.Descriptor.Wrapper   c                 H   > [         TU ]  UTTTT5        S=U l        U l        g r   ro   r+   r   r   r$   r%   rr   r'   r(   r)   r&   s     r   r+   1_locked_info.<locals>.Descriptor.Wrapper.__init__   s&     feS$?.//dmr   c                   > U R                   nU R                  nU R                  " U0 UD6nU    X5   nU =R                  S-  sl        UsS S S 5        $ ! [         a    U =R
                  S-  sl         Of = f S S S 5        O! , (       d  f       O= fT" U R                  /UQ70 UD6nU    UR                  XW5      sS S S 5        $ ! [         a    Us sS S S 5        $ f = f! , (       d  f       g = fNr   )	r'   r@   r=   r   r   r   r   rc   r   )	r$   r1   r2   r'   r)   r(   r   r   r&   s	           r   r3   1_locked_info.<locals>.Descriptor.Wrapper.__call__   s    

nnd5f5+!&q(%	 T
 $ +*+% TT TYY888#  %//9 T & #"
 T# TsR   BAA63B5A66B
B,C#.CC C#C  C##
C1c                     U R                      U R                  R                  5         S=U l        U l        S S S 5        g ! , (       d  f       g = fr   r   r7   s    r   r8   4_locked_info.<locals>.Descriptor.Wrapper.cache_clear   r   r   c                    > U R                      T" U R                  U R                  U R                  5      sS S S 5        $ ! , (       d  f       g = fr   r   r   s    r   r   3_locked_info.<locals>.Descriptor.Wrapper.cache_info   r   r   r   r   r   )rr   r'   r   r(   r)   r&   s   @r   ra   r      s#    0 0#*4
H Hr   ra   r   Nr   )r'   r   r(   r)   r&   s   r   r   r      s    !	H !	Hl !	Hr   r   r   )r&   r'   r(   r)   r   r   s   ````` r   _locked_infor      s"    "H "H_ "HH <r   c                 B   ^ ^^^  " UUUU 4S jS[         5      nU" 5       $ )Nc                   8   > \ rS rSr " U UUU4S jS\5      rSrg)"_unlocked_info.<locals>.Descriptor   c                   N   >^  \ rS rSrU UUU4S jrU4S jrS rU4S jrSrU =r	$ )*_unlocked_info.<locals>.Descriptor.Wrapper   c                 F   > [         TU ]  UTTT5        S=U l        U l        g r   r   r$   r%   rr   r'   r(   r&   s     r   r+   3_unlocked_info.<locals>.Descriptor.Wrapper.__init__   s$     feS9.//dmr   c                   > U R                   nU R                  " U0 UD6n X4   nU =R                  S-  sl        U$ ! [         a    U =R                  S-  sl         Of = fT" U R
                  /UQ70 UD6n XcU'   U$ ! [         a     U$ f = fr   )r'   r=   r   r   r   r   r   )r$   r1   r2   r'   r(   r   r   r&   s          r   r3   3_unlocked_info.<locals>.Descriptor.Wrapper.__call__   s    

nnd5f5'"ZFKK1$K!M 'MMQ&M'TYY888!$#J 
 " 
s!   < AA8A> >
BBc                 T    U R                   R                  5         S=U l        U l        g r   )r'   r   r   r   r7   s    r   r8   6_unlocked_info.<locals>.Descriptor.Wrapper.cache_clear  s     

  ".//dmr   c                 T   > T" U R                   U R                  U R                  5      $ r   )r'   r   r   r   s    r   r   5_unlocked_info.<locals>.Descriptor.Wrapper.cache_info  s    DJJT]]CCr   r   r   )rr   r'   r   r(   r&   s   @r   ra   r      s#    0 0 0D Dr   ra   r   Nr   )r'   r   r(   r&   s   r   r   r      s    	D 	Dl 	Dr   r   r   )r&   r'   r(   r   r   s   ```` r   _unlocked_infor      s!    D D_ D: <r   c           	         ^ ^^^^^^^	 [         R                  " 5       mUUUUU 4S jm	UU4S jmUU	4S jn " UUUUUU U	4S jS[        5      nU" UT5      $ )Nc                 d  >^^ T" U 5      nT	" U /UQ70 UD6mT
" U 5         T" U 5      R                  UU4S j5         UT   sS S S 5        $ ! [         a    TR                  T5         Of = f S S S 5        O! , (       d  f       O= f T" U /UQ70 UD6nT
" U 5          XTT'   O! [         a     Of = fUsS S S 5        T
" U 5         TR	                  T5        T" U 5      R                  5         S S S 5        $ ! , (       d  f       $ = f! , (       d  f       O= f T
" U 5         TR	                  T5        T" U 5      R                  5         S S S 5        g ! , (       d  f       g = f! T
" U 5         TR	                  T5        T" U 5      R                  5         S S S 5        f ! , (       d  f       f = f= f)Nc                     > T T;  $ r   r   )kpendings   r   r   -_condition.<locals>.wrapper.<locals>.<lambda>  s
    (8r   )r   r   r   r   r   r   )r$   r   r1   r2   cvr   r'   r*   r(   r)   r&   s    `    @r   rf   _condition.<locals>.wrapper  sR   $K&t&v&$ZJ 89t Z  A ZZ	(t-d-f-AdaD!   dq!T
%%'   dq!T
%%' dq!T
%%' s   A7AA*'A7)A**A77
B	E$ DB$#D$
B1.D0B11D5	E$ (C77
D	
DE$ "(E
E!$	F/-(F	F/
F,(F/c                 z   > T" U 5      nT" U 5         UR                  5         S S S 5        g ! , (       d  f       g = fr   r   r$   r   r'   r)   s     r   r8   _condition.<locals>.cache_clear'  &    $K$ZGGI ZZ   ,
:c                 P   > TR                  U [        5       5      nT" X/UQ70 UD6$ r   )rc   r   )r$   r1   r2   pr   rf   s       r   classmethod_wrapper'_condition.<locals>.classmethod_wrapper,  s,    tSU+t0000r   c            	       >   > \ rS rSr " U UUUUUU4S jS\5      rSrg)_condition.<locals>.Descriptori0  c                   P   >^  \ rS rSrU UUUUU4S jrU4S jrSU4S jjrSrU =r$ )&_condition.<locals>.Descriptor.Wrapperi1  c                 L   > [         TU ]  UTTTTT5        [        5       U l        g r   )ro   r+   r   r   r   s     r   r+   /_condition.<locals>.Descriptor.Wrapper.__init__2  s#     feS$E!$r   c                 F   > T" U R                   U R                  /UQ70 UD6$ r   )r   r   r$   r1   r2   rf   s      r   r3   /_condition.<locals>.Descriptor.Wrapper.__call__6  s"    tyy$..J4J6JJr   c                 (   > T" U R                   5      $ r   r   r$   _objtyper8   s     r   r8   2_condition.<locals>.Descriptor.Wrapper.cache_clear:      "499--r   )r   r   	rJ   rK   rL   rM   r+   r3   r8   rP   r{   )rr   r'   r8   r*   r(   r)   r&   rf   s   @r   ra   r   1  s    ' 'K. .r   ra   r   Nr   )r'   r8   r*   r(   r)   r&   rf   s   r   r   r   0  s    
	. 
	.l 
	.r   r   )weakrefWeakKeyDictionaryrl   )
r&   r'   r(   r)   r*   r   r   r8   r   rf   s
   `````  @@@r   
_conditionr     sG    '')G( (,
1. .. . );77r   c                 n   ^ ^^^^^ UUUU 4S jmUU4S jm " UUUUU U4S jS[         5      nU" TT5      $ )Nc                 h  > T" U 5      nT" U /UQ70 UD6nT" U 5          X4   sS S S 5        $ ! [          a     Of = f S S S 5        O! , (       d  f       O= fT	" U /UQ70 UD6nT" U 5          UR                  XE5      sS S S 5        $ ! [         a    Us sS S S 5        $ f = f! , (       d  f       g = fr   )r   rc   r   )
r$   r1   r2   r   r   r   r'   r(   r)   r&   s
         r   rf   _locked.<locals>.wrapperA  s    $K&t&v&$Zt Z  	 ZZ
 4)$)&)$Z ||A) Z   Z ZsK   A-
:A:A
A,B#.BB B#B  B##
B1c                 z   > T" U 5      nT" U 5         UR                  5         S S S 5        g ! , (       d  f       g = fr   r   r   s     r   r8   _locked.<locals>.cache_clearS  r   r   c                   <   > \ rS rSr " U UUUUU4S jS\5      rSrg)_locked.<locals>.DescriptoriX  c                   N   >^  \ rS rSrU UUUU4S jrU4S jrSU4S jjrSrU =r$ )#_locked.<locals>.Descriptor.WrapperiY  c                 ,   > [         TU ]  UTTTT5        g r   ro   r+   r   s     r   r+   ,_locked.<locals>.Descriptor.Wrapper.__init__Z  s     feS$?r   c                 0   > T" U R                   /UQ70 UD6$ r   r   r   s      r   r3   ,_locked.<locals>.Descriptor.Wrapper.__call__]      tyy:4:6::r   c                 (   > T" U R                   5      $ r   r   r   s     r   r8   /_locked.<locals>.Descriptor.Wrapper.cache_cleara  r   r   r   r   r   )rr   r'   r8   r(   r)   r&   rf   s   @r   ra   r  Y  s    @ @;. .r   ra   r   Nr   )r'   r8   r(   r)   r&   rf   s   r   r   r   X  s    		. 		.l 		.r   r   rl   )r&   r'   r(   r)   r   r8   rf   s   ```` @@r   _lockedr  @  s3     $

. 
.. 
. g{++r   c                 f   ^ ^^^^ UUU 4S jmU4S jm " UUUU U4S jS[         5      nU" TT5      $ )Nc                    > T" U 5      nT" U /UQ70 UD6n X4   $ ! [          a     Of = fT" U /UQ70 UD6n XSU'   U$ ! [         a     U$ f = fr   )r   r   )	r$   r1   r2   r   r   r   r'   r(   r&   s	         r   rf   _unlocked.<locals>.wrapperh  s~    $K&t&v&	4K 		4)$)&)	aD   		s    
((> 
AAc                 6   > T" U 5      nUR                  5         g r   r   )r$   r   r'   s     r   r8   _unlocked.<locals>.cache_clearv  s    $K		r   c                   :   > \ rS rSr " U UUUU4S jS\5      rSrg)_unlocked.<locals>.Descriptoriz  c                   L   >^  \ rS rSrU UUU4S jrU4S jrSU4S jjrSrU =r$ )%_unlocked.<locals>.Descriptor.Wrapperi{  c                 *   > [         TU ]  UTTT5        g r   r  r   s     r   r+   ._unlocked.<locals>.Descriptor.Wrapper.__init__|  s     feS9r   c                 0   > T" U R                   /UQ70 UD6$ r   r   r   s      r   r3   ._unlocked.<locals>.Descriptor.Wrapper.__call__  r  r   c                 (   > T" U R                   5      $ r   r   r   s     r   r8   1_unlocked.<locals>.Descriptor.Wrapper.cache_clear  r   r   r   r   r   )rr   r'   r8   r(   r&   rf   s   @r   ra   r  {  s    : :;. .r   ra   r   Nr   )r'   r8   r(   r&   rf   s   r   r   r  z  s    		. 		.l 		.r   r   r  )r&   r'   r(   r   r8   rf   s   ``` @@r   	_unlockedr  g  s.    
. 
.. 
. g{++r   c                 x   UbC  Ub  Ub  [        XX#XE5      nOpUb  [        XX$XE5      nO_Ub  [        XX#U5      nON[        XX%5      nOAUb  Ub  [        XX#U5      nO-Ub  [        XX$U5      nOUb  [	        XX#5      nO[        XU5      nXl        X&l        Ub  UOUUl        XFl	        [        R                  " X`5      $ r   )r   r   r   r   r  r  r'   r=   r@   rD   r   r   )r&   r'   r(   r)   r*   r   rf   s          r   _wrapperr    s     0%fSKG%fSKG"6#TBG$VC>G 0 4@G 4@GfS7Gs3G M!%!1tG" ##G44r   )NNN)rN   __all__r   r   r   r   r   r   r   rR   rl   r   r   r   r   r  r  r  r   r   r   <module>r      sp    
   !& !&H6 6r+ +2-`%PB08f$,N,D5r   