+
     h~   c                   s   ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 ^ RIHtHtHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt ^ RI H!t! ^ RI"H#t# ^ RI$H%t% ^ RI&H't'H(t( ^ RI)H*t*H+t+H,t, ^ RI-H.t.H/t/H0t0 ] Pb                  ! ^R7      t2]Pf                  ! ]44      t5R R lt6R R lt7 ! R R4      t8]
 ! R R4      4       t9R R lt:R R lt;R R  lt<R! R" lt=R# )#i    N)	dataclass)AnyCallableDictOptional)Version)parseGroup)escape)Text)LinkCollector)PackageFinder)get_default_environment)SelectionPreferences)
PipSession)WINDOWS) get_best_invocation_for_this_pip#get_best_invocation_for_this_python)adjacent_tmp_filecheck_path_ownerreplace)ExternallyManagedEnvironmentcheck_externally_managed
ensure_dir)Zdaysc                s0    V ^8  d   QhR\         R\         /# )   keyreturnstrformat   "F/usr/lib/python3.14/site-packages/pip/_internal/self_outdated_check.py__annotate__r"   (   s      S S     c                 sn    V P                  4       p\        P                  ! V4      P                  4       pV# N)encodehashlibZsha224Z	hexdigest)r   Z	key_bytesname   &  r!   _get_statefile_namer)   (   s)    

I>>)$..0DKr#   c                sD    V ^8  d   QhR\         R\        P                  /# )r   isodater   r   datetimer   r    r!   r"   r"   .   s$     K K3 K8#4#4 Kr#   c                s`    \         P                   P                  V P                  RR4      4      # )zConvert an ISO format string to a date.

Handles the format 2020-01-22T14:24:01Z (trailing Z)
which is not supported by older versions of fromisoformat.
ZZz+00:00)r,   Zfromisoformatr   )r*      &r!   _convert_dater.   .   s&     **7??3+IJJr#   c                   sr   a  ] tR t^7t o V 3R lR lt]V 3R lR l4       tV 3R lR ltV 3R lR ltR	t	V t
R
# )SelfCheckStatec                s$   < V ^8  d   QhRS[ RR/# )r   	cache_dirr   Nr   r   __classdict__   "r!   r"   SelfCheckState.__annotate__8   s      # $ r#   c                s   / V n         R V n        V'       d   \        P                  P	                  VR\        V P                  4      4      V n         \        V P                  RR7      ;_uu_ 4       p\        P                  ! V4      V n         R R R 4       R # R #   + '       g   i     R # ; i  \        \        \        3 d     R # i ; i)NZ	selfcheckzutf-8)Zencoding)_state_statefile_pathospathZjoinr)   r   ZopenjsonZloadOSErrorZ
ValueErrorZKeyError)selfr0   Z	statefiles   && r!   __init__ZSelfCheckState.__init__8   s    &(# #%77<<;(;DHH(E$D $..AAY"&))I"6DK BA 
 BAAZ2  s0   B, 0BB, B)	#B, )B, ,CCc                    < V ^8  d   QhRS[ /# r   r   r   r1   r3   r!   r"   r4   J   s      S r#   c                s"    \         P                  # r$   )sysZprefix)r;   r-   r!   r   ZSelfCheckState.keyI   s    zzr#   c                sJ   < V ^8  d   QhRS[ P                   RS[S[,          /# )r   current_timer   )r,   r   r   r1   r3   r!   r"   r4   M   s%     + + 1 1 +hsm +r#   c                s    V P                   '       g   R# RV P                   9  d   R# RV P                   9  d   R# \        V P                   R,          4      pW,
          pV\        8  d   R# V P                   R,          # )z7Check if we have a not-outdated version loaded already.N
last_checkpypi_version)r5   r.   _WEEK)r;   r@   rA   Ztime_since_last_check   &&  r!   getZSelfCheckState.getM   sd    {{{t{{*, #4;;|#<=
 , 9 5({{>**r#   c                s>   < V ^8  d   QhRS[ RS[P                  RR/# )r   rB   r@   r   Nr+   r1   r3   r!   r"   r4   `   s(          83D3D    r#   c                s   V P                   '       g   R # \        \        P                  P	                  V P                   4      4      '       g   R # \        \        P                  P	                  V P                   4      4       RV P                  RVP                  4       RV/p\        P                  ! VRRR7      p\        V P                   4      ;_uu_ 4       pVP                  VP                  4       4       R R R 4        \        XP                  V P                   4       R #   + '       g   i     L3; i  \         d     R # i ; i)Nr   rA   rB   T)Z	sort_keysZ
separators)Z,Z:)r6   r   r7   r8   Zdirnamer   r   Z	isoformatr9   Zdumpsr   Zwriter%   r   r'   r:   )r;   rB   r@   stateZtextZfs   &&&   r!   setZSelfCheckState.set`   s    ###  0D0D EFF 	277??4#7#789
 488,002L
 zz%4JGt3344GGDKKM" 5	 AFFD001 54  		s    D"  D5 "D2	5EE)r5   r6   N)__name__
__module____qualname____firstlineno__r<   Zpropertyr   rE   rG   __static_attributes____classdictcell__r2      @r!   r/   r/   7   s7      "  + +&   r#   r/   c                   s>   a  ] tR t^t o V 3R lR ltV 3R ltRtV tR# )UpgradePromptc                r=   r>   r   r1   r3   r!   r"   UpgradePrompt.__annotate__   s     
 
% 
r#   c                s    \         '       d   \        4        R 2pM
\        4       pRp\        \	        4       \        P
                  ! V RV P                   RV P                   R24      \        P
                  ! V R\        V4       R24      4      # )z -m pipz/[bold][[reset][blue]notice[reset][bold]][reset]z) A new release of pip is available: [red]z[reset] -> [green]z[reset]z To update, run: [green]z install --upgrade pip)	r   r   r   r   r
   Zfrom_markupoldnewr	   )r;   Zpip_cmdZnoticer(   r!   __rich__ZUpgradePrompt.__rich__   s    7<>?wGG68GBF( z!3DHH:WF (  /**@B

 
	
r#   c                s2   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   # )r   rR   rS   r   r1   r3   r!   r"   rQ      s     	H  
H r#    N)rH   rI   rJ   rK   rT   Z__annotate_func__rL   rM   rN   rO   r!   rP   rP      s     

 
  r#   rP   c                s0    V ^8  d   QhR\         R\        /# )r   pkgr   )r   Zboolr   r    r!   r"   r"      s     8 8c 8d 8r#   c                sj    \        4       P                  V 4      pVRJ;'       d    RVP                  8H  # )zChecks whether pkg was installed by pip

This is used not to display the upgrade message when pip is in fact
installed by system package manager, such as dnf on Fedora.
Npip)r   get_distributionZ	installer)rV   Zdists   & r!   was_installed_by_piprY      s3     #$55c:Dt77 77r#   c                sf    V ^8  d   QhR\         R\        P                  R\        \        ,          /# )r   sessionoptionsr   )r   optparseValuesr   r   r   r    r!   r"   r"      s,     ' ''"*//'c]'r#   c                 s    \         P                  ! V VR R7      p\        RRR7      p\        P                  ! VVR7      pVP	                  R4      P
                  pVf   R# \        VP                  4      # )T)r[   Zsuppress_no_indexF)Zallow_yankedZallow_all_prereleases)link_collectorselection_prefsrW   N)r   Zcreater   r   Zfind_best_candidatebest_candidater   version)rZ   r[   r^   r_   Zfinderr`   s   &&    r!   _get_current_remote_pip_versionrb      sy     #))N +#O
 !!%'F //6EEN~%%&&r#   c                s    V ^8  d   QhR\         R\        P                  R\        R\        . \        \
        ,          3,          R\        \        ,          /# )r   rF   r@   local_versionget_remote_versionr   )r/   r,   r   r   r   r   rP   r   r    r!   r"   r"      sU       ## 	
 !Xc]!23 mr#   c                 s   V P                  V4      pVf4   V! 4       pVf   \        P                  R4       R # V P                  WA4       \	        V4      p\        P                  RV4       \        P                  RV4       \        R4      p\        P                  RV4       V'       g   R # W%8  ;'       d    VP                  VP                  8g  pV'       d   \        \        V4      VR7      # R # )NzNo remote pip version foundzRemote version of pip: %szLocal version of pip:  %srW   zWas pip installed by pip? %s)rR   rS   )	rE   loggerZdebugrG   parse_versionrY   Zbase_versionrP   r   )rF   r@   rc   rd   Zremote_version_strZremote_versionZpip_installed_by_pipZlocal_version_is_olders   $$$$    r!   _self_version_check_logicrg      s     <0!/1%LL67		$3"#56N
LL,n=
LL,m</6
LL/1EF 	& 	F 	F&&.*E*EE  ]!39KLLr#   c                sH    V ^8  d   QhR\         R\        P                  RR/# )r   rZ   r[   r   N)r   r\   r]   r   r    r!   r"   r"      s*     C CJ C CT Cr#   c           
     s   \        4       P                  R4      pV'       g   R#  \        4        \	        \        TP                  R7      \        P                  P                  \        P                  P                  4      TP                  \        P                  ! \        Y4      R7      pTe   \        P!                  RTRR/R7       R# R#   \         d     R# i ; i)	zCheck for an update for pip.

Limit the frequency of checks to once per week. State is stored either in
the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix
of the pip script path.
rW   N)r0   )rF   r@   rc   rd   z%sZrichT)Zextra)r   rX   r   r   rg   r/   r0   r,   ZnowZtimezoneZutcra   	functoolsZpartialrb   re   Zwarning)rZ   r[   Zinstalled_distZupgrade_promptrD   r!   pip_self_version_checkri      s     -.??FN " /w'8'89&&**8+<+<+@+@A$,,$,,+W
	N !t^FD>B " ( s   
C CC)>r,   rh   r&   r9   Zloggingr\   Zos.pathr7   r?   Zdataclassesr    Ztypingr   r   r   r   Zpip._vendor.packaging.versionr   r   rf   Zpip._vendor.rich.consoler   Zpip._vendor.rich.markupr	   Zpip._vendor.rich.textr
   Zpip._internal.index.collectorr   Z"pip._internal.index.package_finderr   Zpip._internal.metadatar   Z$pip._internal.models.selection_prefsr   Zpip._internal.network.sessionr   Zpip._internal.utils.compatr   Zpip._internal.utils.entrypointsr   r   Zpip._internal.utils.filesystemr   r   r   Zpip._internal.utils.miscr   r   r   Z	timedeltarC   Z	getLoggerrH   re   r)   r.   r/   rP   rY   rb   rg   ri   rU   r#   r!   <module>rj      s           
 ! 0 0 1 @ * * & 7 < : E 4 . X W  	"			8	$KI IX 
 
 
08'8DCr#   