Ë
    Kêj“  ã                  óV  — U d Z ddlmZ ddlZddlZddlZddlmZ ddlm	Z	 ddl
mZ ddlmZmZ ddlmZ dd	lmZ dd
lmZ ddlmZ dZ G d„ de«      Zdaded<    edej:                  ¬«      Ze	dd„«       Z	 	 d	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Z dd„Z!dddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd„Z"y)zN
A module that implements tooling to enable easy warnings about deprecations.
é    )ÚannotationsN)Ú	Generator)Úcontextmanager)Ú
ContextVar)ÚAnyÚTextIO)Úparse)ÚBuildBackendWarning)ÚText)Ú__version__zDEPRECATION: c                  ó   — e Zd ZU dZded<   y)ÚPipDeprecationWarningFÚboolÚinclude_sourceN)Ú__name__Ú
__module__Ú__qualname__r   Ú__annotations__© ó    úd/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/pip/_internal/utils/deprecation.pyr   r      s   … Ø €N�DÔ r   r   r   Ú_original_showwarningÚbuild_backend_warning_level)Údefaultc              #  óž   K  — t         j                  | «      }	 d–— t         j                  |«       y# t         j                  |«       w xY w­w)z@Set the logging level for warnings from this build backend call.N)Ú_build_backend_warning_levelÚsetÚreset)ÚlevelÚtokens     r   Úbuild_backend_warningsr!   "   s=   è ø€ ô )×,Ñ,¨UÓ3€Eð2Ûä$×*Ñ*¨5Õ1øÔ$×*Ñ*¨5Õ1üs   ‚A™3 �A³A
Á
Ac                ó&  — |�t         �t        | |||||«       y y t        |t        «      rXt        j                  d«      }t        | t        «      r!| j                  r|j                  d| ||«       y |j                  | «       y t        |t        «      rot        j                  d«      }t        j                  | ||||«      }|j                  t        j                  «       dt        |j                  «       «      ddi¬«       y t        | |||||«       y )Nzpip._internal.deprecationsz
%s (%s:%s)zpip._internal.build_backendz%sÚrichT)Úextra)r   Ú
issubclassr   ÚloggingÚ	getLoggerÚ
isinstancer   Úwarningr
   ÚwarningsÚformatwarningÚlogr   Úgetr   Úrstrip)ÚmessageÚcategoryÚfilenameÚlinenoÚfileÚlineÚloggerÚ	formatteds           r   Ú_showwarningr7   -   s÷   € ð ÐÜ Ð,Ü! '¨8°X¸vÀtÈTÕRð -ä	�HÔ3Ô	4ô ×"Ñ"Ð#?Ó@ˆÜ�gÔ4Ô5¸'×:PÒ:PØ�N‰N˜<¨°(¸FÕCà�N‰N˜7Õ#Ü	�HÔ1Ô	2Ü×"Ñ"Ð#@ÓAˆÜ×*Ñ*¨7°H¸hÈÐPTÓUˆ	Ø�
‰
Ü(×,Ñ,Ó.ØÜ�×!Ñ!Ó#Ó$Ø˜4�.ð	 	õ 	
ô 	˜g x°¸6À4ÈÕNr   c                 óþ   — t         j                  j                  dd «      rt        j                  dt
        «       nt        j                  dt
        d¬«       t        € t        j                  at        t        _        y y )NÚ_PIP_TEST_ENVÚerrorr   T)Úappend)	ÚosÚenvironr-   r*   Úsimplefilterr   r   Úshowwarningr7   r   r   r   Úinstall_warning_loggerr@   M   s[   € ô 
‡z�z‡~�~�o tÔ,Ü×Ñ˜gÔ'<Õ=ä×Ñ˜iÔ)>ÀtÕLô Ð$Ü (× 4Ñ 4ÐÜ+ŒÕð %r   é   F)Úfeature_flagÚissueÚ
stacklevelr   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	        |	«      }
||
_        t        j                  |
|¬
«       y)a2  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  óL   K  — | ]  \  }}|�|�|j                  |«      –— Œ y ­w)N)Úformat)Ú.0ÚvalueÚ
format_strs      r   ú	<genexpr>zdeprecated.<locals>.<genexpr>Ÿ   s2   è ø€ ò áˆE�:ØÐ! eÐ&7ð 	×Ñ˜%× ñùs   ‚"$)rD   )r	   Úcurrent_versionÚDEPRECATION_MSG_PREFIXÚjoinr   r   r*   Úwarn)ÚreasonÚreplacementÚgone_inrB   rC   rD   r   Úis_goneÚmessage_partsr/   r)   s              r   Ú
deprecatedrV   \   sÐ   € ðJ ˜TÐ!ÒN¤e¬OÓ&<ÄÀgÃÑ&N€Gð 
Ô*Ð+¨4Ð0Ð1àñ ñ =àAð	
ð Ø+ð	
ð
 ñ ñ Xàð	
ð ØNð	
ð-€Mð8 �h‰hñ à!.ôó €Gñ Ü# GÓ,Ð,ä# GÓ,€GØ+€GÔÜ‡M�M�' jÖ1r   )r   ÚintÚreturnzGenerator[None, None, None])NN)r/   zWarning | strr0   ztype[Warning]r1   Ústrr2   rW   r3   zTextIO | Noner4   ú
str | NonerX   ÚNone)rX   r[   )rQ   rY   rR   rZ   rS   rZ   rB   rZ   rC   z
int | NonerD   rW   r   r   rX   r[   )#Ú__doc__Ú
__future__r   r&   r<   r*   Úcollections.abcr   Ú
contextlibr   Úcontextvarsr   Útypingr   r   Úpip._vendor.packaging.versionr	   Úpip._vendor.pyproject_hooksr
   Úpip._vendor.rich.textr   Úpipr   rM   rN   ÚWarningr   r   r   ÚDEBUGr   r!   r7   r@   rV   r   r   r   ú<module>rh      s>  ðòõ #ã Û 	Û Ý %Ý %Ý "ß å /Ý ;Ý &å .à(Ð ô!˜Gô !ð "Ð �sÓ !Ù)Ø!¨7¯=©=ô Ð ð
 ò2ó ð2ð Øð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   