관리-도구
편집 파일: lazy_wheel.cpython-310.pyc
o ƚRe� � @ s� d Z ddgZddlmZmZ ddlmZ ddlmZ ddl m Z mZmZm Z mZmZ ddlmZmZ dd lmZ dd lmZmZ ddlmZmZmZ ddlmZ dd lmZm Z m!Z! G dd� de"�Z#de$de$dedefdd�Z%G dd� d�Z&dS )zLazy ZIP over HTTP�HTTPRangeRequestUnsupported�dist_from_wheel_url� )�bisect_left�bisect_right)�contextmanager)�NamedTemporaryFile)�Any�Dict�Iterator�List�Optional�Tuple)� BadZipfile�ZipFile)�canonicalize_name)�CONTENT_CHUNK_SIZE�Response)�BaseDistribution�MemoryWheel�get_wheel_distribution)� PipSession)�HEADERS�raise_for_status�response_chunksc @ s e Zd ZdS )r N)�__name__� __module__�__qualname__� r r ��/builddir/build/BUILDROOT/alt-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_internal/network/lazy_wheel.pyr s �name�url�session�returnc C sH t ||��}t|j|�}t|t| ��W d � S 1 sw Y dS )a Return a distribution object from the given wheel URL. This uses HTTP range requests to only fetch the potion of the wheel containing metadata, just enough for the object to be constructed. If such requests are not supported, HTTPRangeRequestUnsupported is raised. N)�LazyZipOverHTTPr r r r )r r r! �zf�wheelr r r r s $�c @ s� e Zd ZdZefdedededdfdd�Ze defd d ��Z e defdd��Zdefd d�Z d8dd�Ze defdd��Zd9dedefdd�Zdefdd�Zd:dededefdd�Zdefdd�Zd;dee defd d!�Zdefd"d#�Zd<d$d%�Zd&edee fd'd(�Zeded fd)d*��Zd8d+d,�Zefd-ed.ed/e eef de!fd0d1�Z"d-ed.ed2ed3edee#eef f d4d5�Z$d-ed.eddfd6d7�Z%dS )=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. r r! � chunk_sizer"