<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

Re.                 @   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 Gd d   d e  Z d S)    N)parse)WHEEL_EXTENSION)redact_auth_from_urlsplit_auth_from_netlocsplitext)KeyBasedCompareMixin)MYPY_CHECK_RUNNING)path_to_urlurl_to_path)OptionalTextTupleUnion)HTMLPage)Hashesc                   s  e  Z d  Z d Z d d d d d d g Z d d d d	   f d
 d  Z d d   Z d d   Z e d d    Z	 e d d    Z
 e d d    Z e d d    Z e d d    Z e d d    Z d d   Z e d d    Z e d  d!    Z e j d"  Z e d# d$    Z e j d%  Z e d& d'    Z e j d(  Z e d) d*    Z e d+ d,    Z e d- d.    Z e d/ d0    Z d1 d2   Z e d3 d4    Z e d5 d6    Z e d7 d8    Z  e d9 d:    Z! d; d<   Z"   S)=Linkz?Represents a parsed link from a Package Index's simple URL
    _parsed_url_url
comes_fromrequires_pythonyanked_reasoncache_link_parsingNTc                s   | j  d  r t |  } t j |  |  _ | |  _ | |  _ | rK | n d |  _ | |  _ t	 t
 |   j d | d t
  | |  _ d S)a  
        :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.
        z\\Nkeydefining_class)
startswithr	   urllib_parseurlsplitr   r   r   r   r   superr   __init__r   )selfurlr   r   r   r   )	__class__ /builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/models/link.pyr   $   s    			zLink.__init__c             C   sc   |  j  r d j |  j   } n d } |  j rL d j t |  j  |  j |  St t |  j   Sd  S)Nz (requires-python:{}) z{} (from {}){})r   formatr   r   r   str)r   rpr"   r"   r#   __str__S   s    		zLink.__str__c             C   s   d j  |   S)Nz	<Link {}>)r%   )r   r"   r"   r#   __repr___   s    zLink.__repr__c             C   s   |  j  S)N)r   )r   r"   r"   r#   r    c   s    zLink.urlc             C   sq   |  j  j d  } t j |  } | s@ t |  j  \ } } | St j |  } | sm t d j	 t
       | S)N/z&URL {self._url!r} produced no filename)pathrstrip	posixpathbasenamer   netlocr   unquoteAssertionErrorr%   locals)r   r+   namer/   	user_passr"   r"   r#   filenameh   s    	zLink.filenamec             C   s   t  |  j  S)N)r
   r    )r   r"   r"   r#   	file_pathx   s    zLink.file_pathc             C   s
   |  j  j S)N)r   scheme)r   r"   r"   r#   r7   }   s    zLink.schemec             C   s
   |  j  j S)z4
        This can contain auth information.
        )r   r/   )r   r"   r"   r#   r/      s    zLink.netlocc             C   s   t  j |  j j  S)N)r   r0   r   r+   )r   r"   r"   r#   r+      s    z	Link.pathc             C   s   t  t j |  j j d    S)Nr*   )r   r-   r.   r+   r,   )r   r"   r"   r#   r      s    zLink.splitextc             C   s   |  j    d S)N   )r   )r   r"   r"   r#   ext   s    zLink.extc             C   s4   |  j  \ } } } } } t j | | | | d  f  S)N)r   r   
urlunsplit)r   r7   r/   r+   queryfragmentr"   r"   r#   url_without_fragment   s    zLink.url_without_fragmentz[#&]egg=([^&]*)c             C   s,   |  j  j |  j  } | s d  S| j d  S)Nr8   )_egg_fragment_researchr   group)r   matchr"   r"   r#   egg_fragment   s    zLink.egg_fragmentz[#&]subdirectory=([^&]*)c             C   s,   |  j  j |  j  } | s d  S| j d  S)Nr8   )_subdirectory_fragment_rer?   r   r@   )r   rA   r"   r"   r#   subdirectory_fragment   s    zLink.subdirectory_fragmentz2(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)c             C   s,   |  j  j |  j  } | r( | j d  Sd  S)N   )_hash_rer?   r   r@   )r   rA   r"   r"   r#   hash   s    z	Link.hashc             C   s,   |  j  j |  j  } | r( | j d  Sd  S)Nr8   )rF   r?   r   r@   )r   rA   r"   r"   r#   	hash_name   s    zLink.hash_namec             C   s0   t  j |  j j d d  d j d d  d  S)N#r8   r   ?)r-   r.   r   split)r   r"   r"   r#   show_url   s    zLink.show_urlc             C   s   |  j  d k S)Nfile)r7   )r   r"   r"   r#   is_file   s    zLink.is_filec             C   s   |  j  o t j j |  j  S)N)rN   osr+   isdirr6   )r   r"   r"   r#   is_existing_dir   s    zLink.is_existing_dirc             C   s   |  j  t k S)N)r9   r   )r   r"   r"   r#   is_wheel   s    zLink.is_wheelc             C   s    d d l  m } |  j | j k S)Nr   )vcs)pip._internal.vcsrS   r7   all_schemes)r   rS   r"   r"   r#   is_vcs   s    zLink.is_vcsc             C   s   |  j  d  k	 S)N)r   )r   r"   r"   r#   	is_yanked   s    zLink.is_yankedc             C   s   |  j  d  k	 S)N)rH   )r   r"   r"   r#   has_hash   s    zLink.has_hashc             C   s]   | d k s |  j  r d S|  j d k	 s/ t  |  j d k	 sD t  | j |  j d |  j S)zG
        Return True if the link has a hash and it is allowed.
        NF
hex_digest)rX   rH   r1   rG   is_hash_allowed)r   hashesr"   r"   r#   rZ      s
    zLink.is_hash_allowed)#__name__
__module____qualname____doc__	__slots__r   r(   r)   propertyr    r5   r6   r7   r/   r+   r   r9   r=   recompiler>   rB   rC   rD   rF   rG   rH   rL   rN   rQ   rR   rV   rW   rX   rZ   r"   r"   )r!   r#   r      sL   	)	r   )rO   r-   rb   Zpip._vendor.six.moves.urllibr   r   pip._internal.utils.filetypesr   pip._internal.utils.miscr   r   r   pip._internal.utils.modelsr   pip._internal.utils.typingr   pip._internal.utils.urlsr	   r
   typingr   r   r   r   pip._internal.index.collectorr   pip._internal.utils.hashesr   r   r"   r"   r"   r#   <module>   s   "