ó
    �RjX  ã                   ó  • S 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	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5       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)Ú	lru_cache)Ú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      ÚKD:\diplom_project\venv\Lib\site-packages\pip/_internal/cli/index_command.pyÚ_create_truststore_ssl_contextr       s¢   € ä
×Ñ˜'Ó!Ü�‰ÐNÔOØðÛð
Ý*ð
 ×
Ñ
 × 7Ñ 7Ó
8€CØ×ÑœgŸmšm›oÔ.Ø€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$ )ÚSessionCommandMixiné4   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__9   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Ü˜' ;°Ó5ˆCÞØ×!Ñ! #Ô&Ü�wÐ 2°DÓ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_sessionK   sE   € à�=‰=Ñ Ø ×.Ñ.¨t×/BÑ/BÀ7Ó/KÓLˆDŒMð —=‘=Ñ,Ð,Ð,Ø�}‰}Ð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_hostsr5   Ússl_context)ÚhttpÚhttpsF)Úpip._internal.network.sessionr   Ú	cache_dirÚosÚpathÚisabsÚdeprecated_features_enabledr    Újoinr?   rC   r8   ÚcertÚverifyÚclient_certr@   ÚproxyÚproxiesÚ	trust_envÚ	pip_proxyÚno_inputÚauthÚ	promptingÚkeyring_provider)r(   r,   r?   r@   r   rH   rD   Úsessions           r   r<   Ú"SessionCommandMixin._build_sessionU   s=  € õ 	=à×%Ñ%ˆ	Þ¤§¡§¡¨i× 8Ñ 8Ð8Ð8à ×!DÑ!DÓDÜ8Ó:‰KàˆKáÞ8A”"—'‘'—,‘,˜y¨)Ô4ÀtØ&Ñ2‘G¸¿¹Ø!×/Ñ/Ø×+Ñ+¨GÓ4Ø#ñ
ˆð �<�<Ø$Ÿ\™\ˆGŒNð ××Ø"×.Ñ.ˆGŒLð �?�?žgØ)0Ñ)<™gÀ'Ç/Á/ˆGŒOð �=�=àŸ™Ø Ÿ™ñˆGŒOð !&ˆGÔØ '§¡ˆGÔð &-×%5Ñ%5Ô!5ˆ�‰ÔØ(/×(@Ñ(@ˆ�‰Ô%àˆr+   )r'   )r   N)NN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r&   Úclassmethodr   r   r   Ústrr8   r=   Úintr<   Ú__static_attributes__Ú__classcell__)r)   s   @r   r"   r"   4   s‹   ø† ñ÷3ð ð" fð "°¸$¸s¹)Ñ1Dó "ó ð"ð¨6ð °lô ð "&Ø!%ñ	1àð1ð ˜#‘ð1ð ˜#‘ð	1ð
 
÷1ó 1r+   r"   rY   r   r,   c                 ó    • SSK Jn  U" X5        g )Nr   )Úpip_self_version_check)Ú!pip._internal.self_outdated_checkrf   )rY   r,   Úchecks      r   Ú_pip_self_version_checkri   ‰   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@   ri   Ú	Exceptionr   r   r   )r(   r,   rY   s      r   Úhandle_pip_version_checkÚ*IndexGroupCommand.handle_pip_version_check–   sœ   € ô �w 
×+Ñ+Ð+Ð+à×,×,°×0@×0@Øð	?à×)Ñ)ØØÜ˜A˜wŸ™Ó/ð *ð ˆGò
 Ü'¨Ô9÷ —–ûäó 	?Ü�N‰NÐSÔTÜ�L‰LÐ.¸ˆLÓ>ð	?ús/   ¸'B ÁA4Á+B Á4
BÁ>B ÂB Â3B;Â:B;© )r[   r\   r]   r^   r_   r   rt   rc   rv   r+   r   rk   rk   �   s   † ñð?°ð ?¸4÷ ?r+   rk   )r_   ÚloggingrI   r   Ú	functoolsr   Úoptparser   Útypingr   r   r   r   r   Úpip._internal.cli.base_commandr	   Ú!pip._internal.cli.command_contextr
   r   r   rG   r   Ú	getLoggerr[   r   r    r"   ri   rk   rv   r+   r   Ú<module>r~      sœ   ðñó Û 	Û 
Ý Ý ß 0Ñ 0å å 2Ý AæÝå8à	×	Ò	˜8Ó	$€ð ð¨°Ñ(>ó ó ðô,RÐ-ô Rðj \ð ¸Fð Àtô ô?˜Ð!4õ ?r+   