
    y/Yh{                        U d Z ddlZddlZddlmZmZmZmZmZ ddl	m
Z
 ddlmZ dZ G d de      Zdaeed	<   	 	 dd
eeef   dee   dededee   dee   ddfdZddZddddedee   dee   dee   dee   ddfdZy)zN
A module that implements tooling to enable easy warnings about deprecations.
    N)AnyOptionalTextIOTypeUnion)parse)__version__zDEPRECATION: c                       e Zd Zy)PipDeprecationWarningN)__name__
__module____qualname__     `/var/www/html/profi_bot/bot/venv/lib/python3.12/site-packages/pip/_internal/utils/deprecation.pyr   r      s    r   r   _original_showwarningmessagecategoryfilenamelinenofilelinereturnc                     |t         t        | |||||       y y t        |t              r't        j                  d      }|j                  |        y t        | |||||       y )Nzpip._internal.deprecations)r   
issubclassr   logging	getLoggerwarning)r   r   r   r   r   r   loggers          r   _showwarningr       sc      ,!'8XvtTR -	H3	4 ""#?@wgx64Nr   c                      t        j                  dt        d       t         t         j                  at
        t         _        y y )NdefaultT)append)warningssimplefilterr   r   showwarningr    r   r   r   install_warning_loggerr'   ,   s6    )%:4H $ ( 4 4+ %r   )feature_flagissuereasonreplacementgone_inr(   r)   c                    |duxr t        t              t        |      k\  }| t         df||sdndf|df||sdndf|dfg}dj                  d	 |D              }|rt	        |      t        j                  |t        d
       y)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.
    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   L   K   | ]  \  }}|||j                  |        y w)N)format).0value
format_strs      r   	<genexpr>zdeprecated.<locals>.<genexpr>r   s3      !.E:!e&7 	% !.s   "$   )r   
stacklevel)r   current_versionDEPRECATION_MSG_PREFIXjoinr   r$   warn)r*   r+   r,   r(   r)   is_gonemessage_partsr   s           r   
deprecatedr=   7   s    : T!NeO&<g&NG 
*+401  =A	
 +	

   X	
 N	
-M8 hh !. G #G,,MM'$9aHr   )NN)r   N)__doc__r   r$   typingr   r   r   r   r   pip._vendor.packaging.versionr   pipr	   r7   r8   Warningr   r   __annotations__strintr    r'   r=   r   r   r   <module>rF      s     5 5 / .( 	G 	 " s ! "O7C< O7mO O 	O
 6
O 3-O 
O(,  #'EIEI #EI c]	EI
 3-EI C=EI 
EIr   