Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
pip
/
_internal
/
network
/
__pycache__
[ HOME ]
Exec
Submit
File Name : lazy_wheel.cpython-312.pyc
� p�/i� � � � d Z ddlmZ ddgZddlmZmZ ddlmZ ddl m Z ddlmZ dd l mZ dd lmZmZ ddlmZ ddlmZmZ dd lmZmZmZ ddlmZ ddlmZmZm Z G d� de!� Z" dd�Z# G d� d� Z$y)zLazy ZIP over HTTP� )�annotations�HTTPRangeRequestUnsupported�dist_from_wheel_url)�bisect_left�bisect_right)� Generator)�contextmanager)�NamedTemporaryFile)�Any)� BadZipFile�ZipFile)�NormalizedName)�CONTENT_CHUNK_SIZE�Response)�BaseDistribution�MemoryWheel�get_wheel_distribution)� PipSession)�HEADERS�raise_for_status�response_chunksc � � e Zd Zy)r N)�__name__� __module__�__qualname__� � �O/opt/hc_python/lib/python3.12/site-packages/pip/_internal/network/lazy_wheel.pyr r s � �r c � � t ||� 5 }t |j |� }t || � cddd� S # 1 sw Y yxY w)a Return a distribution object from the given wheel URL. This uses HTTP range requests to only fetch the portion of the wheel containing metadata, just enough for the object to be constructed. If such requests are not supported, HTTPRangeRequestUnsupported is raised. N)�LazyZipOverHTTPr �namer )r! �url�session�zf�wheels r r r s: � � ��g� &�"� �B�G�G�R�(�� &�e�T�2� '� &� &�s �"9�Ac � � e Zd ZdZef dd�Zedd�� Zedd�� Zdd�Z dd�Z edd�� Zddd�Zdd �Z ddd �Zdd�Zdd d �Zdd�Zd!d�Zd"d�Zed#d�� Zdd�Zef d$d�Z d%d�Zd&d�Zy)'r a File-like object mapped to a ZIP file over HTTP. This uses HTTP range requests to lazily fetch the file's content, which is supposed to be fed to ZipFile. If such requests are not supported by the server, raise HTTPRangeRequestUnsupported during initialization. c � � |j |t �� }t |� |j dk( sJ �|||c| _ | _ | _ t |j d � | _ t � | _ | j | j � g | _ g | _ d|j j dd� vrt! d� �| j# � y )N)�headers�� zContent-Length�bytesz Accept-Ranges�nonezrange request is not supported)�headr r �status_code�_session�_url�_chunk_size�intr( �_lengthr �_file�truncate�_left�_right�getr � _check_zip)�selfr"