£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>

Re                 @   s  d  Z  d d l Z d d l Z d d l m Z d d l m Z d d l m	 Z	 e	 r d d l
 m Z m Z m Z m Z m Z m Z m Z e d  Z d Z e j d	  Z d
 d d d d g Z Gd d   d e  Z d d d  Z d d d  Z d d   Z d d   Z Gd d   d e  Z Gd d   d e  Z Gd d   d e  Z  e	 ree e e  e f Z! Gd d
   d
 e  Z" d S)z	 PEP 610     N)six)parse)MYPY_CHECK_RUNNING)AnyDictIterableOptionalTypeTypeVarUnionTzdirect_url.jsonz.^\$\{[A-Za-z0-9-_]+\}(:\$\{[A-Za-z0-9-_]+\})?$	DirectUrlDirectUrlValidationErrorDirInfoArchiveInfoVcsInfoc               @   s   e  Z d  Z d S)r   N)__name__
__module____qualname__ r   r   /builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/models/direct_url.pyr      s   c             C   sf   | |  k r | S|  | } t  j r8 | t k r8 t  j } t | |  sb t d j | | |    | S)z3Get value from dictionary and verify expected type.z-{!r} has unexpected type for {} (expected {}))r   PY2strstring_types
isinstancer   format)dexpected_typekeydefaultvaluer   r   r   _get"   s    
	r!   c             C   s:   t  |  | | |  } | d  k r6 t d j |    | S)Nz{} must have a value)r!   r   r   )r   r   r   r   r    r   r   r   _get_required3   s    r"   c             C   sa   d d   |  D }  |  s% t  d   t |   d k rC t  d   |  d d  k	 sY t  |  d S)Nc             S   s"   g  |  ] } | d  k	 r |  q S)Nr   ).0infor   r   r   
<listcomp>=   s   	 z#_exactly_one_of.<locals>.<listcomp>z/missing one of archive_info, dir_info, vcs_info   z1more than one of archive_info, dir_info, vcs_infor   )r   lenAssertionError)infosr   r   r   _exactly_one_of;   s    		r*   c              K   s   d d   |  j    D S)z Make dict excluding None values.c             S   s+   i  |  ]! \ } } | d  k	 r | |  q S)Nr   )r#   kvr   r   r   
<dictcomp>M   s   	 z _filter_none.<locals>.<dictcomp>)items)kwargsr   r   r   _filter_noneJ   s    r0   c               @   sI   e  Z d  Z d Z d d d d d  Z e d d    Z d d   Z d S)	r   vcs_infoNc             C   s1   | |  _  | |  _ | |  _ | |  _ | |  _ d  S)N)vcsrequested_revision	commit_idresolved_revisionresolved_revision_type)selfr2   r4   r3   r5   r6   r   r   r   __init__S   s
    				zVcsInfo.__init__c             C   sq   | d  k r d  S|  d t  | t d  d t  | t d  d t | t d  d t | t d  d t | t d   S)Nr2   r4   r3   r5   r6   )r"   r   r!   )clsr   r   r   r   
_from_dicta   s    zVcsInfo._from_dictc             C   s4   t  d |  j d |  j d |  j d |  j d |  j  S)Nr2   r3   r4   r5   r6   )r0   r2   r3   r4   r5   r6   )r7   r   r   r   _to_dictn   s    				zVcsInfo._to_dict)r   r   r   namer8   classmethodr:   r;   r   r   r   r   r   P   s   c               @   sC   e  Z d  Z d Z d d d  Z e d d    Z d d   Z d S)	r   archive_infoNc             C   s   | |  _  d  S)N)hash)r7   r?   r   r   r   r8   |   s    zArchiveInfo.__init__c             C   s)   | d  k r d  S|  d t  | t d   S)Nr?   )r!   r   )r9   r   r   r   r   r:      s    zArchiveInfo._from_dictc             C   s   t  d |  j  S)Nr?   )r0   r?   )r7   r   r   r   r;      s    zArchiveInfo._to_dict)r   r   r   r<   r8   r=   r:   r;   r   r   r   r   r   y   s   c               @   sC   e  Z d  Z d Z d d d  Z e d d    Z d d   Z d	 S)
r   dir_infoFc             C   s   | |  _  d  S)N)editable)r7   rA   r   r   r   r8      s    zDirInfo.__init__c             C   s/   | d  k r d  S|  d t  | t d d d  S)NrA   r   F)r"   bool)r9   r   r   r   r   r:      s    zDirInfo._from_dictc             C   s   t  d |  j p d   S)NrA   )r0   rA   )r7   r   r   r   r;      s    zDirInfo._to_dictN)r   r   r   r<   r8   r=   r:   r;   r   r   r   r   r      s   	c               @   s   e  Z d  Z d d d  Z d d   Z e d d    Z d d	   Z e d
 d    Z	 d d   Z
 e d d    Z d d   Z d S)r   Nc             C   s   | |  _  | |  _ | |  _ d  S)N)urlr$   subdirectory)r7   rC   r$   rD   r   r   r   r8      s    		zDirectUrl.__init__c             C   ss   d | k r | S| j  d d  \ } } t |  j t  r\ |  j j d k r\ | d k r\ | St j |  ro | S| S)N@r&   git)splitr   r$   r   r2   
ENV_VAR_REmatch)r7   netloc	user_passnetloc_no_user_passr   r   r   _remove_auth_from_netloc   s    z"DirectUrl._remove_auth_from_netlocc             C   sR   t  j |  j  } |  j | j  } t  j | j | | j | j | j	 f  } | S)zurl with user:password part removed unless it is formed with
        environment variables as specified in PEP 610, or it is ``git``
        in the case of a git URL.
        )
urllib_parseurlsplitrC   rM   rJ   
urlunsplitschemepathqueryfragment)r7   purlrJ   surlr   r   r   redacted_url   s
    $zDirectUrl.redacted_urlc             C   s   |  j  |  j    d  S)N)	from_dictto_dict)r7   r   r   r   validate   s    zDirectUrl.validatec             C   s   t  d t | t d  d t | t d  d t t j t | t d   t j t | t d   t	 j t | t d   g   S)NrC   rD   r$   r>   r@   r1   )
r   r"   r   r!   r*   r   r:   dictr   r   )r9   r   r   r   r   rX      s    zDirectUrl.from_dictc             C   s8   t  d |  j d |  j  } |  j j   | |  j j <| S)NrC   rD   )r0   rW   rD   r$   r;   r<   )r7   resr   r   r   rY      s
    	zDirectUrl.to_dictc             C   s   |  j  t j |   S)N)rX   jsonloads)r9   sr   r   r   	from_json   s    zDirectUrl.from_jsonc             C   s   t  j |  j   d d S)N	sort_keysT)r]   dumpsrY   )r7   r   r   r   to_json   s    zDirectUrl.to_json)r   r   r   r8   rM   propertyrW   rZ   r=   rX   rY   r`   rc   r   r   r   r   r      s   	)#__doc__r]   repip._vendorr   Zpip._vendor.six.moves.urllibr   rN   pip._internal.utils.typingr   typingr   r   r   r   r	   r
   r   r   DIRECT_URL_METADATA_NAMEcompilerH   __all__	Exceptionr   r!   r"   r*   r0   objectr   r   r   ZInfoTyper   r   r   r   r   <module>   s4   4	)