
    g-                        S r SSKrSSKrSSKrSSKJr  SSKJrJr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   4S jr " S S\5      rSSS\S
S4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.
    N)Values)TYPE_CHECKINGListOptional)certifi)Command)CommandContextMixIn)
SSLContext
PipSessionreturnr
   c                     [         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      g/Users/Alptekin/Desktop/izin_takip/venv/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            	          ^  \ rS rSrSrSU 4S jjr\S\S\\	\
      4S j5       rS\SS4S jr  SS\S	\\   S
\\   SS4S jjrSrU =r$ )SessionCommandMixin2   z=
A class mixin for command classes needing _build_session().
r   c                 0   > [         TU ]  5         S U l        g )N)super__init___session)self	__class__s    r   r%   SessionCommandMixin.__init__7   s    .2    optionsc                     / 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)clsr+   
index_urlsurlurlss        r   _get_index_urls#SessionCommandMixin._get_index_urls;   sb     
w
E22';5C!!#&w 2D9d#!T!r*   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'   r+   s     r   get_default_session'SessionCommandMixin.get_default_sessionI   sE    ==  ..t/B/B7/KLDM ==,,,}}r*   retriestimeoutc                 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)cacher>   trusted_hostsr4   ssl_context)httphttpsF)pip._internal.network.sessionr   	cache_dirospathisabsdeprecated_features_enabledr   joinr>   rB   r7   certverifyclient_certr?   proxyproxies	trust_env	pip_proxyno_inputauth	promptingkeyring_provider)r'   r+   r>   r?   r   rG   rC   sessions           r   r;   "SessionCommandMixin._build_sessionS   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&   )r   N)NN)__name__
__module____qualname____firstlineno____doc__r%   classmethodr   r   r   strr7   r<   intr;   __static_attributes____classcell__)r(   s   @r   r!   r!   2   s    3 "f "$s)1D " "6 l  "&!%	11 #1 #	1
 
1 1r*   r!   rX   r   r+   c                      SSK Jn  U" X5        g )Nr   )pip_self_version_check)!pip._internal.self_outdated_checkre   )rX   r+   checks      r   _pip_self_version_checkrh      s    Q	'r*   c                   *    \ rS rSrSrS\SS4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.
r+   r   Nc                 |   [        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>   r?   z6There was an error checking the latest version of pip.zSee below for errorT)exc_info)hasattrdisable_pip_version_checkr-   r;   minr?   rh   	Exceptionr   r   r   )r'   r+   rX   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; )rZ   r[   r\   r]   r^   r   rs   rb   ru   r*   r   rj   rj      s    ? ?4 ?r*   rj   )r^   loggingrH   r   optparser   typingr   r   r   r   r   pip._internal.cli.base_commandr   !pip._internal.cli.command_contextr	   r   r
   rF   r   	getLoggerrZ   r   r   r!   rh   rj   ru   r*   r   <module>r|      s     	 
  0 0  2 A8			8	$(> ,R- Rj\ F t ?!4 ?r*   