
    ,hP                    j   d dl mZ d dlZd dlZd dlmZ d dlmZmZm	Z	 d dl
Z
erd dlmZ d dlmZ  ed      Z e	d      Z G d	 d
e      ZddZddZddd	 	 	 	 	 	 	 	 	 	 	 	 	 ddZddd	 	 	 	 	 	 	 	 	 	 	 ddZ	 	 	 	 	 	 	 	 	 	 ddZ e
j0                  d       G d d             Z	 	 	 	 	 	 ddZy)    )annotationsN)wraps)TYPE_CHECKINGClassVarTypeVar)Callable)	ParamSpecArgsTRetTc                      e Zd ZdZy)TrioDeprecationWarninga0  Warning emitted if you use deprecated Trio functionality.

    While a relatively mature project, Trio remains committed to refining its
    design and improving usability. As part of this, we occasionally deprecate
    or remove functionality that proves suboptimal. If you use Trio, we
    recommend `subscribing 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 until a
    1.0 release, 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____doc__     Q/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/trio/_deprecate.pyr   r      s    r   r   c                    d|  S )Nz+https://github.com/python-trio/trio/issues/r   )issues    r   _url_for_issuer   +   s    8@@r   c                ~    t        | d      r't        | d      r| j                   d| j                   S t        |       S )Nr   r   .)hasattrr   r   str)things    r   
_stringifyr   /   s>    ul#~(F""#1U%7%7$899u:r      F)
stackleveluse_triodeprecationwarningc                   |dz  }t        |        d| }||dz  }n|dt        |       dz  }||dt        |       dz  }|rt        }nt        }t	        j
                   ||      |       y )	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+   5   s     !OJ9'
CC%%
7+,H55N5)*!,,!'=*MM-$<r   )r   r    c               $     d fd}|S )Nc                    t               d
 fd       }||j                  a|j                  }|j                         }|dz  }|d dz  }|dt               dz  }|d dt	               d	z  }|dz  }||_        |S )Nc                 4    t                | i |S )N)r(   r   r    )r+   )argskwargsfnr(   r   r   r    r'   s     r   wrapperz,deprecated.<locals>.do_wrap.<locals>.wrapperZ   s,    +E t&v&&r   z

z.. deprecated:: 
z   Use z
 instead.
z   For details, see `issue #z <z>`__.
r/   z
ArgsT.argsr0   zArgsT.kwargsreturnr   )r   r   rstripr   r   )r1   r2   docr(   r   r   r    r'   s   `  r   do_wrapzdeprecated.<locals>.do_wrapW   s     
r	' 	' 
	' =E??&//C**,C6MC%gYb11C"G!4 5[AA 5eWB~e?T>UU\]]4KC!GOr   )r1   Callable[ArgsT, RetT]r5   r9   r   )r'   r   r   r(   r    r8   s   ````` r   
deprecatedr:   O   s       D Nr   c                   t        ||      t        d      dfd              }| |_        | j                  d      d   |_        |S )Nr   r(   )r   __annotations__)assignedc                      | i |S )zDeprecated alias.r   )r/   r0   new_fns     r   r2   z!deprecated_alias.<locals>.wrapper   s     t&v&&r   r   r4   )r:   r   r   
rpartitionr   )old_qualnamer@   r'   r   r2   s    `   r   deprecated_aliasrD   |   sW     uf5
6=>' ? 6' (G#..s3B7GNr   )slotsc                  R    e Zd ZU  e       Zded<   ded<   ded<   ded<   eZded	<   y
)DeprecatedAttributezClassVar[object]_not_setobjectvaluer   r'   
int | Noner   r(   N)r   r   r   rI   rH   r=   r(   r   r   r   rG   rG      s)    !'H)MLGVr   rG   c                F     d fd}|t         j                      _        y )Nc                   | v re|    }|j                   }|t        j                  u r|j                  } d|  }t	        ||j
                  |j                  |       |j                  S d}t        |j                  |             )Nr   r<   z!module '{}' has no attribute '{}')	r(   rG   rH   rJ   r+   r'   r   AttributeErrorformat)nameinfor(   r   r)   deprecated_attributesmodule_names        r   __getattr__z)deprecate_attributes.<locals>.__getattr__   s    (((.DllG-666**"m1TF+EE4<<tzz7S::1SZZT:;;r   )rP   r   r5   rI   )sysmodulesrT   )rS   rR   rT   s   `` r   deprecate_attributesrW      s    < ,7CKK(r   )r   intr5   r   )r   rI   r5   r   )r   rI   r'   r   r   rK   r(   rI   r   rX   r    boolr5   None)r'   r   r   rI   r   rK   r(   rI   r    rY   r5   z8Callable[[Callable[ArgsT, RetT]], Callable[ArgsT, RetT]])
rC   r   r@   r9   r'   r   r   rK   r5   r9   )rS   r   rR   zdict[str, DeprecatedAttribute]r5   rZ   )
__future__r   rU   r%   	functoolsr   typingr   r   r   attrscollections.abcr   typing_extensionsr	   r
   r   FutureWarningr   r   r   r+   r:   rD   frozenrG   rW   r   r   r   <module>rc      sZ   " 
   3 3 (+gEv] $A ',=== 	=
 = = !%= 
=:  (-** * 	*
 * !%* >*Z! 
  $ E  77-K7	7r   