| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/site-packages/pip/_internal/network/__pycache__/ |
Upload File : |
�
�k�f� � � � d Z ddlZddlZddlZddlZddlmZmZm Z ddl
mZ ddlm
Z
ddlmZ ddlmZ ddlmZ dd lmZ dd
lmZ ddlmZmZmZ ddlmZmZmZ ej@ e!� Z"d
edee# fd�Z$d
edede%dee& fd�Z'de%de%fd�Z(de%de%de%fd�Z)d
edede%fd�Z*dededefd�Z+ G d� d� Z, G d� d� Z-y)z)Download files with progress indicators.
� N)�Iterable�Optional�Tuple)�Response)�get_download_progress_renderer)�NetworkConnectionError)�PyPI)�Link)�
is_from_cache)�
PipSession)�HEADERS�raise_for_status�response_chunks)�format_size�redact_auth_from_url�splitext�resp�returnc �h � t | j d � S # t t t f$ r Y y w xY w)Nzcontent-length)�int�headers�
ValueError�KeyError� TypeError)r s �@C:\Python312\Lib\site-packages\pip/_internal/network/download.py�_get_http_response_sizer s5 � ���4�<�<� 0�1�2�2����)�,� ���s � �1�1�link�progress_barc � � t | � }|j t j k( r
|j }n|j
}t
|� }|r|� dt |� � d�}t | � rt j d|� nt j d|� t j � t j kD rd}nt | � rd}n|sd}n
|dkD rd}nd}t | � }|s|S t ||�� } ||� S ) Nz (�)zUsing cached %szDownloading %sFTi )�bar_type�size)r �netlocr �file_storage_domain�show_url�url_without_fragmentr r r �logger�info�getEffectiveLevel�logging�INFOr r ) r r r �total_length�url�
logged_url�
show_progress�chunks�renderers r �_prepare_downloadr2 s� � �
+�4�0�L��{�{�d�.�.�.��m�m���'�'��%�c�*�J��"�|�2�k�,�&?�%@��B�
��T�����%�z�2����$�j�1�
���!�G�L�L�0��
� �t� ��
�
��
� �� $��
��
�
�T�
"�F���
�-�|�,�W�H��F��� �filenamec �@ � t j j | � S )zJ
Sanitize the "filename" value from a Content-Disposition header.
)�os�path�basename)r4 s r �sanitize_content_filenamer9 I s � � �7�7���H�%�%r3 �content_disposition�default_filenamec � � t j j � }| |d<