관리-도구
편집 파일: locators.cpython-36.pyc
3 �PfE� � @ s@ d dl Z d dlmZ d dlZd dlZd dlZd dlZd dlZyd dlZW n e k rd d dl ZY nX d dlZddlm Z ddlmZmZmZmZmZmZmZmZmZmZmZmZmZmZmZ ddlm Z m!Z!m"Z" ddl#m$Z$ ddl%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z. dd l/m0Z0m1Z1 dd l2m3Z3m4Z4 ej5e6�Z7ej8d�Z9ej8dej:�Z;ej8d �Z<dZ=d-dd�Z>G dd� de�Z?G dd� de@�ZAG dd� deA�ZBG dd� deA�ZCG dd� de@�ZDG dd� deA�ZEG dd� deA�ZFG dd � d eA�ZGG d!d"� d"eA�ZHG d#d$� d$eA�ZIeIeG� eEd%d&d'�d(d)�ZJeJjKZKej8d*�ZLG d+d,� d,e@�ZMdS ).� N)�BytesIO� )�DistlibException)�urljoin�urlparse� urlunparse�url2pathname�pathname2url�queue�quote�unescape�string_types�build_opener�HTTPRedirectHandler� text_type�Request� HTTPError�URLError)�Distribution�DistributionPath� make_dist)�Metadata) �cached_property�parse_credentials�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.python.org/pypic C s | dkrt } t| dd�}|j� S )z� Return all distribution names known by an index. :param url: The URL of the index. :return: A list of all known distribution names. Ng @)�timeout)� DEFAULT_INDEXr � list_packages)�url�client� r* �/usr/lib/python3.6/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 }xdD ]}||kr || }P q W |d kr0d S t |�}|jdkrpt|j� |�}t|d�rh|j||� n|||<