File: //usr/lib/python3.9/site-packages/pip/_internal/index/__pycache__/collector.cpython-39.pyc
a
?�f@W � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z ddl
mZmZ ddl
mZ ddlmZmZ ddlmZ ddlmZ dd lmZ dd
lmZ ddlmZ ddlmZ dd
lm Z ddl!m"Z" ddl#m$Z$m%Z% ddl&m'Z' ddl(m)Z)m*Z* ddl+m,Z,m-Z- e'�r�ddl.m/Z/ ddl0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8 ddl9Z:ddl;m<Z< ddl=m>Z> e:j?j@jAZBe4eCeCf ZDe�EeF�ZGdd� ZHdd� ZIG dd� deJ�ZKdd� ZLG dd � d eJ�ZMd!d"� ZNd#d$� ZOd%d&� ZPd'd(� ZQd)d*� ZRd+d,� ZSe�Td-ejU�ZVd.d/� ZWd0d1� ZXd2d3� ZYG d4d5� d5eZ�Z[d6d7� Z\e\d8d9� �Z]G d:d;� d;eZ�Z^dLd<d=�Z_dMd?d@�Z`dNdAdB�ZadCdD� ZbdOdFdG�ZcG dHdI� dIeZ�ZdG dJdK� dKeZ�ZedS )PzM
The main purpose of this module is to expose LinkCollector.collect_links().
� N)�OrderedDict)�html5lib�requests)�unescape)�
RetryError�SSLError)�parse)�request)�NetworkConnectionError��Link)�SearchScope)�raise_for_status)� lru_cache)�ARCHIVE_EXTENSIONS)�pairwise�redact_auth_from_url)�MYPY_CHECK_RUNNING)�path_to_url�url_to_path)�is_url�vcs)�Values)�Callable�Iterable�List�MutableMapping�Optional�Sequence�Tuple�Union)�Response)�
PipSessionc C s6 t jD ]*}| �� �|�r| t|� dv r| S qdS )zgLook for VCS schemes in the URL.
Returns the matched VCS scheme, or None if there's no match.
z+:N)r Zschemes�lower�
startswith�len)�url�scheme� r( �A/usr/lib/python3.9/site-packages/pip/_internal/index/collector.py�_match_vcs_scheme8 s
r* c C s( t | �j}tD ]}|�|�r dS qdS )z2Return whether the URL looks like an archive.
TF)r �filenamer �endswith)r&