관리-도구
편집 파일: locators.cpython-38.pyc
U )�e7� � @ s. d dl Z d dlmZ d dlZd dlZd dlZd dlZd dlZzd dlZW n e k rd d dl ZY nX d dlZddlm Z ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZ ddlmZm Z m!Z! ddl"m#Z#m$Z$ ddl%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z- dd l.m/Z/m0Z0 dd l1m2Z2m3Z3 e�4e5�Z6e�7d�Z8e�7dej9�Z:e�7d �Z;dZ<d,dd�Z=G dd� de�Z>G dd� de?�Z@G dd� de@�ZAG dd� de@�ZBG dd� de?�ZCG dd� de@�ZDG dd� de@�ZEG dd � d e@�ZFG d!d"� d"e@�ZGG d#d$� d$e@�ZHeHeDd%d&d'�d(d)�ZIeIjJZJG d*d+� d+e?�ZKdS )-� N)�BytesIO� )�DistlibException)�urljoin�urlparse� urlunparse�url2pathname�pathname2url�queue�quote�unescape�build_opener�HTTPRedirectHandler� text_type�Request� HTTPError�URLError)�Distribution�DistributionPath� make_dist)�Metadata�MetadataInvalidError)�cached_property�ensure_slash�split_filename�get_project_data�parse_requirement�parse_name_and_version�ServerProxy�normalize_name)� get_scheme�UnsupportedVersionError)�Wheel� is_compatiblez^(\w+)=([a-f0-9]+)z;\s*charset\s*=\s*(.*)\s*$ztext/html|application/x(ht)?mlzhttps://pypi.org/pypic C s6 | dkrt } t| dd�}z|�� W �S |d�� X dS )z� Return all distribution names known by an index. :param url: The URL of the index. :return: A list of all known distribution names. N� @��timeout�close)� DEFAULT_INDEXr � list_packages)�url�client� r, �>/opt/hc_python/lib/python3.8/site-packages/distlib/locators.py�get_all_distribution_names* s r. c @ s$ e Zd ZdZdd� Ze Z ZZdS )�RedirectHandlerzE A class to work around a bug in some Python 3.2.x releases. c C s� d }dD ]}||kr|| } q"q|d kr.d S t |�}|jdkrnt|�� |�}t|d�rf|�||� n|||<