ó ďRec @ sű d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m Z m Z m Z d d l m Z d d l m Z d d l m Z m Z e rá d d l m Z m Z m Z m Z d d l m Z d d l m Z n d e f d YZ d S( i˙˙˙˙N( t parse( t WHEEL_EXTENSION( t redact_auth_from_urlt split_auth_from_netloct splitext( t KeyBasedCompareMixin( t MYPY_CHECK_RUNNING( t path_to_urlt url_to_path( t Optionalt Textt Tuplet Union( t HTMLPage( t Hashest Linkc B sŁ e Z d Z d d d d d d g Z d" d" d" e d Z d Z d Z e d Z e d Z e d Z e d Z e d Z e d Z d Z e d Z e d Z e j d Z e d Z e j d Z e d Z e j d Z e d Z e d Z e d Z e d Z d Z e d Z e d Z e d Z! e d Z" d! Z# RS(# s? Represents a parsed link from a Package Index's simple URL t _parsed_urlt _urlt comes_fromt requires_pythont yanked_reasont cache_link_parsingc C s | j d r t | } n t j | | _ | | _ | | _ | rN | n d | _ | | _ t t | j d | d t | | _ d S( s˝ :param url: url of the resource pointed to (href of the link) :param comes_from: instance of HTMLPage where the link was found, or string. :param requires_python: String containing the `Requires-Python` metadata field, specified in PEP 345. This may be specified by a data-requires-python attribute in the HTML link tag, as described in PEP 503. :param yanked_reason: the reason the file has been yanked, if the file has been yanked, or None if the file hasn't been yanked. This is the value of the "data-yanked" attribute, if present, in a simple repository HTML link. If the file has been yanked but no reason was provided, this should be the empty string. See PEP 592 for more information and the specification. :param cache_link_parsing: A flag that is used elsewhere to determine whether resources retrieved from this link should be cached. PyPI index urls should generally have this set to False, for example. s \\t keyt defining_classN( t startswithR t urllib_parset urlsplitR R R t NoneR R t superR t __init__R ( t selft urlR R R R ( ( s /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pyR $ s c C sc | j r d j | j } n d } | j rL d j t | j | j | St t | j Sd S( Ns (requires-python:{})t s {} (from {}){}( R t formatR R R t str( R t rp( ( s /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pyt __str__S s c C s d j | S( Ns ( R! ( R ( ( s /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pyt __repr___ s c C s | j S( N( R ( R ( ( s /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/models/link.pyR c s c C sq | j j d } t j | } | s@ t | j \ } } | St j | } | sm t d j t | S( Nt /s&