
    j                        % S r SSKJr  SSKrSSKrSSKJrJr  SSKJ	r	  SSK
Jr  Sr " S S	\5      rSqS
\S'     S             SS jjrSS jrSSSSS.               SS jjrg)zN
A module that implements tooling to enable easy warnings about deprecations.
    )annotationsN)AnyTextIO)parse)__version__zDEPRECATION: c                  $    \ rS rSr% SrS\S'   Srg)PipDeprecationWarning   Fboolinclude_source N)__name__
__module____qualname____firstlineno__r   __annotations____static_attributes__r       p/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/pip/_internal/utils/deprecation.pyr	   r	      s     ND r   r	   r   _original_showwarningc                >   Ub  [         b  [        XX#XE5        g g [        U[        5      (       ab  [        R                  " S5      n[        U [        5      (       a%  U R                  (       a  UR                  SXU5        g UR                  U 5        g [        XX#XE5        g )Nzpip._internal.deprecationsz
%s (%s:%s))r   
issubclassr	   logging	getLogger
isinstancer   warning)messagecategoryfilenamelinenofilelineloggers          r   _showwarningr$      s      ,!'XtR -	H3	4	4 ""#?@g455':P:PNN<FCNN7#g4Nr   c                     [         R                  " S[        SS9  [        c   [         R                  q[
        [         l        g g )NdefaultT)append)warningssimplefilterr	   r   showwarningr$   r   r   r   install_warning_loggerr+   1   s6    )%:4H $ ( 4 4+ %r      F)feature_flagissue
stacklevelr   c                B   USL=(       a    [        [        5      [        U5      :  nU [         S34UU(       d  SOS4US4UU(       d  SOS4US4/nSR                  S	 U 5       5      n	U(       a  [	        U	5      e[	        U	5      n
Xjl        [        R                  " XS
9  g)a  Helper to deprecate existing functionality.

reason:
    Textual reason shown to the user about why this functionality has
    been deprecated. Should be a complete sentence.
replacement:
    Textual suggestion shown to the user about what alternative
    functionality they can use.
gone_in:
    The version of pip does this functionality should get removed in.
    Raises an error if pip's current version is greater than or equal to
    this.
feature_flag:
    Command-line flag of the form --use-feature={feature_flag} for testing
    upcoming functionality.
issue:
    Issue number on the tracker that would serve as a useful place for
    users to find related discussion and provide feedback.
stacklevel:
    How many frames up the call stack to attribute the warning to.
    Defaults to 2 (the caller of deprecated()).
include_source:
    If True, include the source filename and line number in the warning
    output. Useful when the warning originates from external code.
Nz{}z*pip {} will enforce this behaviour change.z*Since pip {}, this is no longer supported.zA possible replacement is {}.zEYou can use the flag --use-feature={} to test the upcoming behaviour.z@Discussion can be found at https://github.com/pypa/pip/issues/{} c              3  \   #    U  H"  u  pUc  M
  Uc  M  UR                  U5      v   M$     g 7f)N)format).0value
format_strs      r   	<genexpr>deprecated.<locals>.<genexpr>   s5      !.E 	!&+ 	!
%  !.s   	,,,)r/   )r   current_versionDEPRECATION_MSG_PREFIXjoinr	   r   r(   warn)reasonreplacementgone_inr-   r.   r/   r   is_gonemessage_partsr   r   s              r   
deprecatedrB   <   s    J T!NeO&<g&NG 
*+401  =A	
 +	

   X	
 N	
-M8 hh !. G #G,,#G,G+MM'1r   )NN)r   zWarning | strr   ztype[Warning]r   strr    intr!   zTextIO | Noner"   
str | NonereturnNone)rF   rG   )r=   rC   r>   rE   r?   rE   r-   rE   r.   z
int | Noner/   rD   r   r   rF   rG   )__doc__
__future__r   r   r(   typingr   r   pip._vendor.packaging.versionr   pipr   r9   r:   Warningr	   r   r   r$   r+   rB   r   r   r   <module>rN      s   #    / .( !G ! " s ! OOO O 	O
 O O 
O.,   $ O2O2 O2 	O2
 O2 O2 O2 O2 
O2r   