
    vKg                       S SK Jr  S SKrS SKrS SKJr  S SKJr  S SKJ	r	J
r
Jr  S SKr\	(       a  S SKJr  S SKJr  \" S5      r\" S	5      r " S
 S\5      rSS jrSS jrSSS.             SS jjrSSS.           SS jjr          SS jr\R4                  " SS9 " S S5      5       r " S S\5      rS S jrg)!    )annotationsN)wraps)
ModuleType)TYPE_CHECKINGClassVarTypeVar)Callable)	ParamSpecArgsTRetTc                      \ rS rSrSrSrg)TrioDeprecationWarning   a  Warning emitted if you use deprecated Trio functionality.

As a young project, Trio is currently quite aggressive about deprecating
and/or removing functionality that we realize was a bad idea. If you use
Trio, you should subscribe to `issue #1
<https://github.com/python-trio/trio/issues/1>`__ to get information about
upcoming deprecations and other backwards compatibility breaking changes.

Despite the name, this class currently inherits from
:class:`FutureWarning`, not :class:`DeprecationWarning`, because while
we're in young-and-aggressive mode we want these warnings to be visible by
default. You can hide them by installing a filter or with the ``-W``
switch: see the :mod:`warnings` documentation for details.

 N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       O/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/trio/_deprecate.pyr   r      s    r   r   c                    SU  3$ )Nz+https://github.com/python-trio/trio/issues/r   )issues    r   _url_for_issuer   ,   s    8@@r   c                    [        U S5      (       a,  [        U S5      (       a  U R                   SU R                   3$ [        U 5      $ )Nr   r   .)hasattrr   r   str)things    r   
_stringifyr!   0   sD    ul##~(F(F""#1U%7%7$899u:r      F)
stackleveluse_triodeprecationwarningc                   US-  n[        U 5       SU 3nUc  US-  nOUS[        U5       S3-  nUb  US[        U5       S3-  nU(       a  [        nO[        n[        R
                  " U" U5      US9  g )	N   z is deprecated since Trio z with no replacementz; use z insteadz ())r#   )r!   r   r   DeprecationWarningwarningswarn)r    versionr   insteadr#   r$   msgwarning_classs           r   warn_deprecatedr/   6   s     !OJ9'
CC%%
7+,H55N5)*!,,!'=*MM-$<r   )r    r$   c               (   ^ ^^^^ SUUUUU 4S jjnU$ )Nc                (  >^  [        T 5      S
U UUUUU4S jj5       nTc  UmUR                  bb  UR                  nUR                  5       nUS-  nUST S3-  nTb  US[        T5       S3-  nTb  UST S[	        T5       S	3-  nUS-  nX!l        U$ )Nc                 .   > [        TTTTTS9  T" U 0 UD6$ )N)r,   r   r$   )r/   )argskwargsfnr,   r   r    r$   r+   s     r   wrapper,deprecated.<locals>.do_wrap.<locals>.wrapper[   s,    +E t&v&&r   z

z.. deprecated:: 
z   Use z
 instead.
z   For details, see `issue #z <z>`__.
r3   z
ArgsT.argsr4   zArgsT.kwargsreturnr   )r   r   rstripr!   r   )r5   r6   docr,   r   r    r$   r+   s   `  r   do_wrapdeprecated.<locals>.do_wrapX   s     
r	' 	' 
	' =E??&//C**,C6MC%gYb11C"G!4 5[AA 5eWB~e?T>UU\]]4KC!Or   )r5   Callable[ArgsT, RetT]r:   r?   r   )r+   r    r   r,   r$   r=   s   ````` r   
deprecatedr@   P   s       D Nr   c                  ^ [        X#TS9[        TSS9SU4S jj5       5       nXl        U R                  S5      S   Ul        U$ )Nr   r,   )r   __annotations__)assignedc                    > T" U 0 UD6$ )zDeprecated alias.r   )r3   r4   new_fns     r   r6   !deprecated_alias.<locals>.wrapper   s     t&v&&r   r   r9   )r@   r   r   
rpartitionr   )old_qualnamerF   r+   r   r6   s    `   r   deprecated_aliasrK   }   sS     f5
6=>' ? 6' (#..s3B7GNr   )slotsc                  Z    \ rS rSr% \" 5       rS\S'   S\S'   S\S'   S\S	'   \rS\S
'   Srg)DeprecatedAttribute   zClassVar[object]_not_setobjectvaluer   r+   
int | Noner   r,   r   N)	r   r   r   r   rQ   rP   rC   r,   r   r   r   r   rN   rN      s)    !'H)MLGVr   rN   c                  *    \ rS rSr% S\S'   SS jrSrg)_ModuleWithDeprecations   zdict[str, DeprecatedAttribute]__deprecated_attributes__c                Z   XR                   ;   av  U R                   U   nUR                  nU[        R                  L a  UR                  nU R
                   SU 3n[        XBR                  UR                  US9  UR                  $ Sn[        UR                  U R
                  U5      5      e)Nr   rB   z!module '{}' has no attribute '{}')rW   r,   rN   rP   rR   r   r/   r+   r   AttributeErrorformat)selfnameinfor,   r    r-   s         r   __getattr__#_ModuleWithDeprecations.__getattr__   s    11111$7DllG-666**}}oQtf-EE<<tzz7S::1SZZt<==r   r   N)r\   r   r:   rQ   )r   r   r   r   rC   r^   r   r   r   r   rU   rU      s    ==>r   rU   c                |    [         R                  U    n[        Ul        [	        U[        5      (       d   e0 Ul        g )N)sysmodulesrU   	__class__
isinstancerW   )module_namemodules     r   enable_attribute_deprecationsrg      s6    [[%F.Ff56666 (*F$r   )r   intr:   r   )r    rQ   r:   r   )r    rQ   r+   r   r   rS   r,   rQ   r#   rh   r$   boolr:   None)r+   r   r    rQ   r   rS   r,   rQ   r$   ri   r:   z8Callable[[Callable[ArgsT, RetT]], Callable[ArgsT, RetT]])
rJ   r   rF   r?   r+   r   r   rS   r:   r?   )re   r   r:   rj   )
__future__r   ra   r)   	functoolsr   typesr   typingr   r   r   attrscollections.abcr	   typing_extensionsr
   r   r   FutureWarningr   r   r!   r/   r@   rK   frozenrN   rU   rg   r   r   r   <module>rt      sO   " 
    3 3 (+gEv] $A ',=== 	=
 = = !%= 
=:  (-** * 	*
 * !%* >*Z! 
  $ E  >j >"*r   