HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/pip/_internal/utils/__pycache__/deprecation.cpython-310.pyc
o

@%Ne+�@s�UdZddlZddlZddlmZmZmZmZmZddl	m
Z
ddlmZ
dZGdd�de�Zdaeed	<		dd
eeefdeeded
edeedeeddfdd�Zddd�Zddd�dedeedeedeedeeddfdd�ZdS)zN
A module that implements tooling to enable easy warnings about deprecations.
�N)�Any�Optional�TextIO�Type�Union)�parse)�__version__z
DEPRECATION: c@seZdZdS)�PipDeprecationWarningN)�__name__�
__module__�__qualname__�r
r
�A/usr/lib/python3/dist-packages/pip/_internal/utils/deprecation.pyr	sr	�_original_showwarning�message�category�filename�lineno�file�line�returncCsb|durtdurt||||||�dSdSt|t�r&t�d�}|�|�dSt||||||�dS)Nzpip._internal.deprecations)r�
issubclassr	�logging�	getLogger�warning)rrrrrr�loggerr
r
r�_showwarnings�

rcCs,tjdtdd�tdurtjatt_dSdS)N�defaultT)�append)�warnings�simplefilterr	r�showwarningrr
r
r
r�install_warning_logger,s

�r")�feature_flag�issue�reason�replacement�gone_inr#r$cCs�|duott�t|�k}|t�d�f||sdndf|df||s!dndf|dfg}d�d	d
�|D��}|r8t|��tj|tdd�dS)
aHelper 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.zA 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/{}� css.�|]\}}|dur|dur|�|�VqdS)N)�format)�.0�value�
format_strr
r
r�	<genexpr>ns���zdeprecated.<locals>.<genexpr>�)r�
stacklevel)r�current_version�DEPRECATION_MSG_PREFIX�joinr	r�warn)r%r&r'r#r$�is_gone�
message_partsrr
r
r�
deprecated7s2�������
�r6)NN)rN)�__doc__rr�typingrrrrr�pip._vendor.packaging.versionr�piprr0r1�Warningr	r�__annotations__�str�intrr"r6r
r
r
r�<module>sT	�
������
�
�������