
    4ՔhU                    
   S r SSKJr  SSKrSSKrSSKrSSKJr  SSKJ	r	  SSK
Jr  SSKJr  SSKJr  SS	KJr  \(       a  SS
KJr  SSKJr  \R,                  " \5      r\SS j5       r " S S\5      rSS jr " S S\\5      rg)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.
    )annotationsN)	lru_cache)Values)TYPE_CHECKING)certifi)Command)CommandContextMixIn)
SSLContext
PipSessionc                    [         R                  S:  a  [        R                  S5        g  SS Kn  SSKJn  UR                  U R                  5      nUR                  [        R                  " 5       5        U$ ! [
         a    [        R                  S5         g f = f! [
         a    [        R                  S5         g f = f)N)   
   z7Disabling truststore because Python version isn't 3.10+r   z1Disabling truststore since ssl support is missing)
truststorez5Disabling truststore because platform isn't supported)sysversion_infologgerdebugsslImportErrorwarningpip._vendorr   r
   PROTOCOL_TLS_CLIENTload_verify_locationsr   where)r   r   ctxs      W/var/www/auris/envauris/lib/python3.13/site-packages/pip/_internal/cli/index_command.py_create_truststore_ssl_contextr      s    
'!NO
*
 

 7 7
8Cgmmo.J  JK  NOs"   A8 B 8BBB?>B?c                  n   ^  \ rS rSrSrSU 4S jjr\S	S j5       rS
S jr  S       SS jjr	Sr
U =r$ )SessionCommandMixin6   z=
A class mixin for command classes needing _build_session().
c                0   > [         TU ]  5         S U l        g )N)super__init___session)self	__class__s    r   r$   SessionCommandMixin.__init__;   s    +/    c                    / n[        USS5      (       d%  [        USS5      nU(       a  UR                  U5        [        USS5      nU(       a  UR                  U5        U=(       d    S$ )z7Return a list of index urls from user-provided options.no_indexF	index_urlNextra_index_urls)getattrappendextend)clsoptions
index_urlsurlurlss        r   _get_index_urls#SessionCommandMixin._get_index_urls?   sb     
w
E22';5C!!#&w 2D9d#!T!r)   c                    U R                   c4  U R                  U R                  U5      5      U l         U R                   c   eU R                   $ )zGet a default-managed session.)r%   enter_context_build_session)r&   r2   s     r   get_default_session'SessionCommandMixin.get_default_sessionM   sE    ==  ..t/B/B7/KLDM ==,,,}}r)   c                X   SSK Jn  UR                  nU(       a&  [        R                  R                  U5      (       d   eSUR                  ;  a  [        5       nOS nU" U(       a   [        R                  R                  US5      OS Ub  UOUR                  UR                  U R                  U5      US9nUR                  (       a  UR                  Ul        UR                  (       a  UR                  Ul        UR                  (       d  U(       a  Ub  UOUR                  Ul        UR                   (       a6  UR                   UR                   S.Ul        SUl        UR                   Ul        UR(                  (       + UR*                  l        UR.                  UR*                  l        U$ )Nr   r   zlegacy-certszhttp-v2)cacheretriestrusted_hostsr3   ssl_context)httphttpsF)pip._internal.network.sessionr   	cache_dirospathisabsdeprecated_features_enabledr   joinr?   r@   r6   certverifyclient_certtimeoutproxyproxies	trust_env	pip_proxyno_inputauth	promptingkeyring_provider)r&   r2   r?   rN   r   rE   rA   sessions           r   r:   "SessionCommandMixin._build_sessionW   s=    	=%%	i 8 888!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%   )returnNone)r2   r   rY   zlist[str] | None)r2   r   rY   r   )NN)r2   r   r?   
int | NonerN   r[   rY   r   )__name__
__module____qualname____firstlineno____doc__r$   classmethodr6   r;   r:   __static_attributes____classcell__)r'   s   @r   r    r    6   s^    0 " " #"	11 1 	1
 
1 1r)   r    c                     SSK Jn  U" X5        g )Nr   )pip_self_version_check)!pip._internal.self_outdated_checkre   )rW   r2   checks      r   _pip_self_version_checkrh      s    Q	'r)   c                  "    \ rS rSrSrSS jrSrg)IndexGroupCommand   z
Abstract base class for commands with the index_group options.

This also corresponds to the commands that permit the pip version check.
c                |   [        US5      (       d   eUR                  (       d  UR                  (       a  g U R                  US[	        SUR
                  5      S9nU   [        X!5        SSS5        g! , (       d  f       g= f! [         a,    [        R                  S5        [        R                  SSS	9   gf = f)
zh
Do the pip version check if not disabled.

This overrides the default behavior of not doing the check.
r+   Nr      )r?   rN   z6There was an error checking the latest version of pip.zSee below for errorT)exc_info)hasattrdisable_pip_version_checkr+   r:   minrN   rh   	Exceptionr   r   r   )r&   r2   rW   s      r   handle_pip_version_check*IndexGroupCommand.handle_pip_version_check   s     w
++++,,0@0@	?))Aw/ * G
 '9  	?NNSTLL.L>	?s/   'B A4+B 4
B>B B 3B;:B; N)r2   r   rY   rZ   )r\   r]   r^   r_   r`   rs   rb   ru   r)   r   rj   rj      s    ?r)   rj   )rY   zSSLContext | None)rW   r   r2   r   rY   rZ   )r`   
__future__r   loggingrF   r   	functoolsr   optparser   typingr   r   r   pip._internal.cli.base_commandr   !pip._internal.cli.command_contextr	   r   r
   rD   r   	getLoggerr\   r   r   r    rh   rj   ru   r)   r   <module>r~      s{    #  	 
      2 A8			8	$  ,R- Rj?!4 ?r)   