<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
U
    .e=                     @   s  d Z ddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZmZmZ ddlmZ ddlmZmZ ddlmZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddl m!Z! ddl"m#Z#m$Z$m%Z% ddl&m'Z' ddl(m)Z) ddl*m+Z+m,Z,m-Z- ddl.m/Z/ ddl0m1Z1 e/rhddl2m3Z3m4Z4m5Z5m6Z6m7Z7 ddl8m9Z9 e6e:e:e5e7e;e:f  f Z<e=e>Z?e	j@ded ddddddgZAdZBdd ZCd d! ZDG d"d# d#eZEG d$d% d%eZFG d&d' d'ejGZHdS )(zhPipSession and supporting code, containing all pip-specific
network request configuration and behavior.
    N)requestssixurllib3)CacheControlAdapter)BaseAdapterHTTPAdapter)Response)CaseInsensitiveDict)parse)InsecureRequestWarning)__version__)MultiDomainBasicAuth)SafeFileCache)HAS_TLS	ipaddressssl)check_path_owner)libc_ver)build_url_from_netlocget_installed_versionparse_netloc)MYPY_CHECK_RUNNING)url_to_path)IteratorListOptionalTupleUnion)Linkignore)category)Zhttps*r!   )r!   Z	localhostr!   )r!   z127.0.0.0/8r!   )r!   z::1/128r!   )filer!   N)Zsshr!   r!   )ZBUILD_BUILDIDZBUILD_IDZCIZ	PIP_IS_CIc                   C   s   t dd tD S )z?
    Return whether it looks like pip is running under CI.
    c                 s   s   | ]}|t jkV  qd S N)osenviron).0name r(   A/usr/lib/python3.8/site-packages/pip/_internal/network/session.py	<genexpr>a   s     z looks_like_ci.<locals>.<genexpr>)anyCI_ENVIRONMENT_VARIABLESr(   r(   r(   r)   looks_like_ciY   s    r-   c                  C   sB  dt dt dt id} | d d dkr@t | d d< n| d d dkrtjjd	krltjd
d }ntj}ddd |D | d d< nB| d d dkrt | d d< n | d d dkrt | d d< tjdrHddl	m
} ttdd tdddg| }ttdd tddgt }|r:||d< |rH|| d< tjdrzt d rzdt d d| d< t rt | di d< t rt | di d< t rt | d< trtj| d < td!}|d
k	r|| d"< t rd#nd
| d$< tjd%}|d
k	r(|| d&< d'j| tj| d(d#d)d*S )+z6
    Return a string representing the user agent.
    pip)r'   versionr'   )Z	installerpythonimplementationr1   ZCPythonr/   ZPyPyfinalN   .c                 S   s   g | ]}t |qS r(   )str)r&   xr(   r(   r)   
<listcomp>x   s     zuser_agent.<locals>.<listcomp>ZJythonZ
IronPythonZlinuxr   )distroc                 S   s   | d S N   r(   r6   r(   r(   r)   <lambda>       zuser_agent.<locals>.<lambda>idc                 S   s   | d S r9   r(   r;   r(   r(   r)   r<      r=   liblibcr8   darwinZmacOSsystemreleaseZcpuZopenssl_versionZ
setuptoolssetuptools_versionTZciZPIP_USER_AGENT_USER_DATA	user_dataz9{data[installer][name]}/{data[installer][version]} {json}),:)Z
separatorsZ	sort_keys)datajson) r   platformZpython_versionZpython_implementationsyspypy_version_inforeleaseleveljoin
startswithpip._vendorr8   dictfilterzipZlinux_distributionr   Zmac_verrB   
setdefaultrC   machiner   r   ZOPENSSL_VERSIONr   r-   r$   r%   getformatrI   dumps)rH   rL   r8   Zdistro_infosr@   rD   rE   r(   r(   r)   
user_agentd   sl     





rY   c                   @   s   e Zd ZdddZdd ZdS )LocalFSAdapterNc              
   C   s   t |j}t }d|_|j|_zt|}	W n. tk
rZ }
 zd|_|
|_W 5 d }
~
X Y nPX tj	j
|	jdd}t|d p~d}t||	j|d|_t|d|_|jj|_|S )	N   i  T)Zusegmtr   z
text/plain)zContent-TypezContent-LengthzLast-Modifiedrb)r   urlr   Zstatus_coder$   statOSErrorrawemailZutilsZ
formatdatest_mtime	mimetypesZ
guess_typer	   st_sizeheadersopenclose)selfrequeststreamtimeoutverifycertZproxiespathnameZrespZstatsexcZmodifiedZcontent_typer(   r(   r)   send   s&    


zLocalFSAdapter.sendc                 C   s   d S r#   r(   )rh   r(   r(   r)   rg      s    zLocalFSAdapter.close)NNNNN)__name__
__module____qualname__rp   rg   r(   r(   r(   r)   rZ      s     
rZ   c                   @   s   e Zd Zdd ZdS )InsecureHTTPAdapterc                 C   s   d|_ d |_d S )NZ	CERT_NONE)Z	cert_reqsZca_certs)rh   Zconnr]   rl   rm   r(   r(   r)   cert_verify   s    zInsecureHTTPAdapter.cert_verifyN)rq   rr   rs   ru   r(   r(   r(   r)   rt      s   rt   c                       sF   e Zd ZdZ fddZdddZdd Zd	d
 Z fddZ  Z	S )
PipSessionNc           
         s  | dd}| dd}| dg }| dd}tt| j|| g | _t | jd< t|d| _t	j
|d	d
ddgdd}|rt|std| d}|rtt||d}n
t|d}t|d}|| _| d| | d| | dt  |D ]}	| j|	dd qdS )zj
        :param trusted_hosts: Domains not to emit warnings for when not using
            HTTPS.
        retriesr   cacheNtrusted_hosts
index_urlsz
User-Agent)rz   i  i  i  i  g      ?)ZtotalZstatus_forcelistZbackoff_factorzThe directory '%s' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.)rx   max_retries)r{   zhttps://zhttp://zfile://T)suppress_logging)popsuperrv   __init__pip_trusted_originsrY   re   r   Zauthr   ZRetryr   loggerwarningr   r   r   rt   _insecure_adaptermountrZ   add_trusted_host)
rh   argskwargsrw   rx   ry   rz   Zsecure_adapterZinsecure_adapterhost	__class__r(   r)   r      s@    


zPipSession.__init__Fc                 C   s   |s.d |}|dk	r$|d |7 }t| t|}|| jkrL| j| | t|d | j |d s| t|d | j dS )z
        :param host: It is okay to provide a host that has previously been
            added.
        :param source: An optional source string, for logging where the host
            string came from.
        zadding trusted host: {!r}Nz
 (from {})/r:   rG   )	rW   r   infor   r   appendr   r   r   )rh   r   sourcer|   msgZ	host_portr(   r(   r)   r   3  s    



zPipSession.add_trusted_hostc                 c   s<   t D ]
}|V  q| jD ] \}}d||d kr.dn|fV  qd S )Nr!   )SECURE_ORIGINSr   )rh   secure_originr   portr(   r(   r)   iter_secure_originsM  s    zPipSession.iter_secure_originsc              	   C   s   t t|}|j|j|j  }}}|ddd }|  D ]}|\}}}	||kr\|dkr\q<zLt	t
|tjsv|d krz|n|d}
tt
|tjr|n|d}W n4 tk
r   |r| | kr|dkrY q<Y nX |
|krq<||	kr|	dkr|	d k	rq< dS td|| dS )	N+r:   r!   utf8TzThe repository located at %s is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host %s'.F)urllib_parseZurlparser5   ZschemeZhostnamer   rsplitr   r   Z
ip_address
isinstancer   Z	text_typedecodeZ
ip_network
ValueErrorlowerr   r   )rh   locationZparsedZorigin_protocolZorigin_hostZorigin_portr   Zsecure_protocolZsecure_hostZsecure_portZaddrZnetworkr(   r(   r)   is_secure_originT  s^      




	zPipSession.is_secure_originc                    s(   | d| j tt| j||f||S )Nrk   )rT   rk   r~   rv   ri   )rh   methodr]   r   r   r   r(   r)   ri     s    zPipSession.request)NF)
rq   rr   rs   rk   r   r   r   r   ri   __classcell__r(   r(   r   r)   rv      s   T
Qrv   )I__doc__Zemail.utilsra   rI   Zloggingrc   r$   rJ   rK   warningsrP   r   r   r   Zpip._vendor.cachecontrolr   Zpip._vendor.requests.adaptersr   r   Zpip._vendor.requests.modelsr   Zpip._vendor.requests.structuresr	   Zpip._vendor.six.moves.urllibr
   r   Zpip._vendor.urllib3.exceptionsr   r.   r   Zpip._internal.network.authr   Zpip._internal.network.cacher   Zpip._internal.utils.compatr   r   r   Zpip._internal.utils.filesystemr   Zpip._internal.utils.glibcr   Zpip._internal.utils.miscr   r   r   Zpip._internal.utils.typingr   Zpip._internal.utils.urlsr   typingr   r   r   r   r   Zpip._internal.models.linkr   r5   intZSecureOriginZ	getLoggerrq   r   filterwarningsr   r,   r-   rY   rZ   rt   ZSessionrv   r(   r(   r(   r)   <module>   sV   
O!