+
     hX  c                   s   R t ^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIH	t	H
t
Ht ^ RIHt ^ RIHt ^ RIHt ]	'       d   ^ RIHt ^ R	IHt ]P,                  ! ]4      t]R
 R l4       t ! R R]4      tR R lt ! R R]]4      tR# )a&  
Contains command classes which may interact with an index / the network.

Unlike its sister module, req_command, this module still uses lazy imports
so commands which don't always hit the network (e.g. list w/o --outdated or
--uptodate) don't need waste time importing PipSession and friends.
N)	lru_cacheValues)TYPE_CHECKINGListOptional)certifi)Command)CommandContextMixIn)
SSLContext
PipSessionc                s2    V ^8  d   QhR\         R,          /# )   returnr	   )r   format   "D/usr/lib/python3.14/site-packages/pip/_internal/cli/index_command.py__annotate__r      s      (>     c                  s   \         P                  R8  d   \        P                  R4       R#  ^ RIp  ^ RIHp TP                  T P                  4      pTP                  \        P                  ! 4       4       T#   \
         d    \        P                  R4        R# i ; i  \
         d    \        P                  R4        R# i ; i)   z7Disabling truststore because Python version isn't 3.10+Nz1Disabling truststore since ssl support is missing)
truststorez5Disabling truststore because platform isn't supported)r   i
   )sysZversion_infologgerdebugsslZImportErrorwarningpip._vendorr   r	   ZPROTOCOL_TLS_CLIENTZload_verify_locationsr   Zwhere)r   r   Zctxs      r   _create_truststore_ssl_contextr      s    
'!NO
*
 

 7 7
8Cgmmo.J  JK  NOs"   A: B! : BB! CCc                   s   a a ] tR t^4t oRtV3R lV 3R llt]V3R lR l4       tV3R lR ltRV3R lR	 llt	R
t
VtV ;t# )SessionCommandMixinz=
A class mixin for command classes needing _build_session().
c                s   < V ^8  d   QhRR/# )r   r   N r   __classdict__   "r   r    SessionCommandMixin.__annotate__9   s     3 3$ 3r   c                s2   < \         SV `  4        R V n        R # )N)Zsuper__init___session)self	__class__s   &r   r#   ZSessionCommandMixin.__init__9   s    .2r   c                sF   < V ^8  d   QhRS[ RS[S[S[,          ,          /# )r   optionsr   )r   r   r   Zstrr   r!   r   r   r"   >   s$     " "f "$s)1D "r   c                s    . p\        VRR4      '       g'   \        VRR4      pV'       d   VP                  V4       \        VRR4      pV'       d   VP                  V4       T;'       g    R# )z7Return a list of index urls from user-provided options.no_indexFZ	index_urlNZextra_index_urls)ZgetattrZappendZextend)Zclsr'   
index_urlsZurlZurlss   &&   r   _get_index_urlsZ#SessionCommandMixin._get_index_urls=   se     
w
E22';5C!!#&w 2D9d#!!T!r   c                $   < V ^8  d   QhRS[ RR/# )r   r'   r   r   r   r   r!   r   r   r"   K   s      6 l r   c                s    V P                   f&   V P                  V P                  V4      4      V n         V P                   # )zGet a default-managed session.)r$   Zenter_context_build_session)r%   r'   s   &&r   get_default_sessionZ'SessionCommandMixin.get_default_sessionK   s5    ==  ..t/B/B7/KLDM
 }}r   c                sP   < V ^8  d   QhRS[ RS[S[,          RS[S[,          RR/# )r   r'   retriestimeoutr   r   )r   r   Zintr   r!   r   r   r"   U   s;     1 11 #1 #	1
 
1r   c                s   ^ RI Hp VP                  pRVP                  9  d   \	        4       pMRpT! V'       d!   \
        P                  P                  VR4      MRVe   TMVP                  VP                  V P                  V4      VR7      pVP                  '       d   VP                  Vn        VP                  '       d   VP                  Vn        VP                  '       g	   V'       d   Ve   TMVP                  Vn        VP                  '       d8   RVP                  RVP                  /Vn        RVn        VP                  Vn        VP&                  '       * VP(                  n        VP,                  VP(                  n        V# )	    r
   zlegacy-certsNzhttp-v2)Zcacher.   trusted_hostsr)   ssl_contextZhttpZhttpsF)pip._internal.network.sessionr   	cache_dirZdeprecated_features_enabledr   osZpathZjoinr.   r1   r*   ZcertZverifyZclient_certr/   ZproxyZproxiesZ	trust_envZ	pip_proxyZno_inputZauthZ	promptingZkeyring_provider)r%   r'   r.   r/   r   r4   r2   sessions   &&&&    r   r,   Z"SessionCommandMixin._build_sessionU   s1    	=%%	 !D!DD8:KK8A"'',,y)4t&2G!//++G4#
 <<<$\\GN "..GL ???g)0)<g'//GO ===GO !&G 'G &-%5%5!5(/(@(@%r   )r$   )NN)__name__
__module____qualname____firstlineno____doc__r#   Zclassmethodr*   r-   r,   __static_attributes____classdictcell__Z__classcell__)r&   r    s   @@r   r   r   4   sA     3 3 " " 1 1 1r   r   c                s,    V ^8  d   QhRRR\         RR/# )r   r6   r   r'   r   Nr   r   r   r   r   r      s!      \ F t r   c                 s"    ^ RI Hp V! W4       R# )r0   )pip_self_version_checkN)Z!pip._internal.self_outdated_checkr>   )r6   r'   Zcheck   && r   _pip_self_version_checkr@      s    Q	'r   c                   s6   a  ] tR t^t o RtV 3R lR ltRtV tR# )IndexGroupCommandz
Abstract base class for commands with the index_group options.

This also corresponds to the commands that permit the pip version check.
c                r+   )r   r'   r   Nr   r   r!   r   r   ZIndexGroupCommand.__annotate__   s     ? ? ?4 ?r   c                s   VP                   '       g   VP                  '       d   R#  V P                  V^ \        ^VP                  4      R7      pV;_uu_ 4        \        W!4       RRR4       R#   + '       g   i     R# ; i  \         d1    \        P                  R4       \        P                  RRR7        R# i ; i)zh
Do the pip version check if not disabled.

This overrides the default behavior of not doing the check.
N)r.   r/   z6There was an error checking the latest version of pip.zSee below for errorT)Zexc_info)
Zdisable_pip_version_checkr(   r,   Zminr/   r@   Z	Exceptionr   r   r   )r%   r'   r6   r?   r   handle_pip_version_checkZ*IndexGroupCommand.handle_pip_version_check   s     ,,,0@0@0@	?))Aw/ * G
 '9  	?NNSTLL.L>	?s/   2B A0&B 0B	;B B 7B?>B?r   N)r7   r8   r9   r:   r;   rB   r<   r=   )r    s   @r   rA   rA      s     ? ?r   rA   )r;   Zloggingr5   r   Z	functoolsr    Zoptparser   Ztypingr   r   r   r   r   Zpip._internal.cli.base_commandr   Z!pip._internal.cli.command_contextr   r   r	   r3   r   Z	getLoggerr7   r   r   r   r@   rA   r   r   r   <module>rC      s{     	 
   0 0  2 A8			8	$  ,R- Rj?!4 ?r   