File: //opt/cppython/lib/python3.8/site-packages/pip/_internal/index/__pycache__/collector.cpython-38.pyc
U
>D�g�? � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddl Z
ddlZ
ddlm
Z
ddlmZ ddlmZ ddlmZmZmZmZmZmZmZmZmZmZmZ ddlmZ ddl m!Z! dd l"m#Z#m$Z$ dd
l%m&Z& ddl'm(Z( ddl)m*Z* dd
l+m,Z, ddl-m.Z. ddl/m0Z0 ddl1m2Z2 ddl3m4Z4 ddl5m6Z6m7Z7m8Z8 e�9e:�Z;ee<e<f Z=e<ee< d�dd�Z>G dd� de?�Z@e!dd�dd�ZAG dd� de?�ZBe<e,dd�dd �ZCe<e,e!d�d!d"�ZDe=ee< d#�d$d%�ZEG d&d'� d'�ZFG d(d)� d)e�ZGeGeGd*�d+d,�ZHeHd-ee( d.�d/d0��ZIe
d1d2�G d3d-� d-��ZJG d4d5� d5e�ZKdDe(ee<e?f eed6 dd7�d8d9�ZLdEe!eMeJd:�d;d<�ZNe(e,ed- d=�d>d?�ZOG d@dA� dAe�ZPG dBdC� dC�ZQdS )FzO
The main purpose of this module is to expose LinkCollector.collect_sources().
� N)� dataclass)�
HTMLParser)�Values)�Callable�Dict�Iterable�List�MutableMapping�
NamedTuple�Optional�Protocol�Sequence�Tuple�Union)�requests)�Response)�
RetryError�SSLError)�NetworkConnectionError)�Link)�SearchScope)�
PipSession)�raise_for_status)�is_archive_file��redact_auth_from_url)�vcs� )�CandidatesFromPage�
LinkSource�build_source��url�returnc C s6 t jD ]*}| �� �|�r| t|� dkr| S qdS )zgLook for VCS schemes in the URL.
Returns the matched VCS scheme, or None if there's no match.
z+:N)r �schemes�lower�
startswith�len)r"