Hacked By AnonymousFox

Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pyc

�
�Rec	@@s�ddlmZddlZddlmZddlmZddlmZddd	d
ddd
gZ	dCZejd�Z
ejd�ZejdejejB�ZdZdZdjdede�Zied6ed6Zdddddddd d!g	Zd"Zd#d$jgeD]Zee^q�d%Zd&ed'Zd(ed#ed)Zd*Zejd+�Zejd,ed-�Z ejd,ed-�Z!ejd,ed-�Z"ejd,edd.!d-�Z#ejd/ed0�Z$d1eeefZ%eje%ejejB�Z&e'd2�Z(e'd3�Z)e(e)Bd4hBZ*e*d5d6hBZ+e+d7hBZ,Z-d8ed8e	�fd9��YZ.d:�Z/d;d<�Z0d=�Z1d>�Z2d?�Z3d@�Z4dA�Z5dB�Z6dS(Di(tabsolute_importN(t
namedtuplei(tLocationParseError(tsixtschemetauththosttporttpathtquerytfragmentthttpthttpss%[a-fA-F0-9]{2}s^(?:[a-zA-Z][a-zA-Z0-9+-]*:|/)sS^(?:([a-zA-Z][a-zA-Z0-9+.-]*):)?(?://([^\\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$s(?:[0-9]{1,3}\.){3}[0-9]{1,3}s[0-9A-Fa-f]{1,4}s(?:{hex}:{hex}|{ipv4})thextipv4tls32s(?:%(hex)s:){6}%(ls32)ss::(?:%(hex)s:){5}%(ls32)ss%(?:%(hex)s)?::(?:%(hex)s:){4}%(ls32)ss2(?:(?:%(hex)s:)?%(hex)s)?::(?:%(hex)s:){3}%(ls32)ss6(?:(?:%(hex)s:){0,2}%(hex)s)?::(?:%(hex)s:){2}%(ls32)ss/(?:(?:%(hex)s:){0,3}%(hex)s)?::%(hex)s:%(ls32)ss'(?:(?:%(hex)s:){0,4}%(hex)s)?::%(ls32)ss&(?:(?:%(hex)s:){0,5}%(hex)s)?::%(hex)ss(?:(?:%(hex)s:){0,6}%(hex)s)?::sDABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._!\-~s(?:t|t)s
(?:%25|%)(?:[s]|%[a-fA-F0-9]{2})+s\[s)?\]s!(?:[^\[\]%:/?#]|%[a-fA-F0-9]{2})*s!^(/[^?#]*)(?:\?([^#]*))?(?:#.*)?$t^t$i����t(s)\]$u(^(?:(.*)@)?(%s|%s|%s)(?::([0-9]{0,5}))?$sBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~s!$&'()*+,;=t:t@t/t?tUrlcB@sweZdZdZdddddddd�Zed��Zed��Zed��Z	ed��Z
d�ZRS(	s�
    Data structure for representing an HTTP URL. Used as a return value for
    :func:`parse_url`. Both the scheme and host are normalized as they are
    both case-insensitive according to RFC 3986.
    c	C@si|r#|jd�r#d|}n|dk	r>|j�}ntt|�j||||||||�S(NR(t
startswithtNonetlowertsuperRt__new__(tclsRRRRRR	R
((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pyR[s

cC@s|jS(s@For backwards-compatibility with urlparse. We're nice like that.(R(tself((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pythostnamemscC@s6|jpd}|jdk	r2|d|j7}n|S(s)Absolute path including the query string.RRN(RR	R(R turi((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pytrequest_urirscC@s$|jrd|j|jfS|jS(s(Network location including host and ports%s:%d(RR(R ((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pytnetloc|s	c	C@s�|\}}}}}}}d}|dk	r>||d7}n|dk	r[||d7}n|dk	rt||7}n|dk	r�|dt|�7}n|dk	r�||7}n|dk	r�|d|7}n|dk	r�|d|7}n|S(s�
        Convert self into a url

        This function should more or less round-trip with :func:`.parse_url`. The
        returned url may not be exactly the same as the url inputted to
        :func:`.parse_url`, but it should be equivalent by the RFC (e.g., urls
        with a blank port will have : removed).

        Example: ::

            >>> U = parse_url('http://google.com/mail/')
            >>> U.url
            'http://google.com/mail/'
            >>> Url('http', 'username:password', 'host.com', 80,
            ... '/path', 'query', 'fragment').url
            'http://username:password@host.com:80/path?query#fragment'
        uu://u@u:u?u#N(Rtstr(	R RRRRRR	R
turl((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pyR&�s"

cC@s|jS(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/_vendor/urllib3/util/url.pyt__str__�s(N(t__name__t
__module__t__doc__t	__slots__RRtpropertyR!R#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/_vendor/urllib3/util/url.pyRRs

(cC@s�d}d}xV|D]N}|j|�}|dkr:qn|dksR||kr|}|}qqW|dks}|dkr�|ddfS|| ||d|fS(s�
    .. deprecated:: 1.25

    Given a string and an iterable of delimiters, split on the first found
    delimiter. Return two split parts and the matched delimiter.

    If not found, then the first part is the full input string.

    Example::

        >>> split_first('foo/bar?baz', '?/=')
        ('foo', 'bar?baz', '/')
        >>> split_first('foo/bar?baz', '123')
        ('foo/bar?baz', '', None)

    Scales linearly with number of delims. Not ideal for large number of delims.
    itiN(Rtfind(tstdelimstmin_idxt	min_delimtdtidx((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pytsplit_first�s


sutf-8c
C@s$|d	kr|Stj|�}tjd�|�\}}|jdd�}||jd�k}t�}x�tdt	|��D]�}|||d!}t
|�}	|r�|dks�|	dkr�|j�|kr�||7}q�n|jdt
|	�dj�jd�j��q�W|j|�S(
sfPercent-encodes a URI component without reapplying
    onto an already percent-encoded component.
    cS@s|jd�j�S(Ni(tgrouptupper(tmatch((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pyt<lambda>�R-sutf-8t
surrogatepasst%iii�iN(RRtensure_textt
PERCENT_REtsubntencodetcountt	bytearraytrangetlentordtdecodetextendR
tzfillR7(
t	componentt
allowed_charstencodingtpercent_encodingst	uri_bytestis_percent_encodedtencoded_componenttitbytetbyte_ord((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pyt_encode_invalid_chars�s"	
4cC@s�|jd�}g}xO|D]G}|dkr4qq|dkrP|j|�q|r|j�qqW|jd�r�|s�|dr�|jdd�n|jd�r�|jd�ndj|�S(	NRt.s..iR-s/.s/..(s/.s/..(tsplittappendtpopRtinserttendswithtjoin(Rtsegmentstoutputtsegment((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pyt_remove_path_dot_segments�s
 cC@s?|r;t|tj�r*tj|�}n|tkr;tj|�}|r�tj|�}|r�|j	d�\}}|||!}|j
d�r�|dkr�|d}n
|d}dt|t�}|| j
�|||S|j
�Sq8tj|�s8tjdjg|jd�D]}t|�^q��Sq;n|S(Nis%25iR;RS(t
isinstanceRtbinary_typet
ensure_strtNORMALIZABLE_SCHEMESt
IPV6_ADDRZ_RER8t
ZONE_ID_REtsearchtspanRRRtUNRESERVED_CHARSRtIPV4_RERYRTt_idna_encode(RRtis_ipv6R8tstarttendtzone_idtlabel((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pyt_normalize_hosts(



8cC@s�|r�tg|D]}t|�dk^q�r�yddlm}Wn'tk
rntjtd�d�nXy#|j	|j
�dtdt�SWq�|jk
r�tjtd|�d�q�Xn|j
�j	d�S(	Ni�i(tidnas-Unable to parse URL without the 'idna' moduletstrictt
std3_rulesu#Name '%s' is not a valid IDNA labeltascii(
tanyRDtpip._vendorRotImportErrorRt
raise_fromRRR?RtTruet	IDNAError(tnametxRo((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pyRh.s1
	#cC@sZtj|�j�\}}t|t�}t|t�}|dk	rV|d|7}n|S(sHPercent-encodes a request target so that there are no invalid charactersRN(t	TARGET_RER8tgroupsRRt
PATH_CHARStQUERY_CHARSR(ttargetRR	((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pyt_encode_target@sc@s�|s
t�S|}tj|�s/d|}nytj|�j�\}}}}}|d
kpq|j�tk}|r�|j�}n|r�t	j|�j�\}}	}
|r�|r�t
|t�}n|
dkr�d
}
q�nd\}}	}
|
d
k	r8t|
�}
d|
ko!dkns8t
|��q8nt|	|�}	|rq|rqt|�}t
|t�}n|r�|r�t
|t�}n|r�|r�t
|t�}nWn*ttfk
r�tjt
|�d
�SX|s|d
k	s�|d
k	rd}qd
}nt|tj�r)tj�n	tj��fd�}td||�d||�d||	�d	|
d
||�d||�d||��S(s

    Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
    performed to parse incomplete urls. Fields not provided will be None.
    This parser is RFC 3986 compliant.

    The parser logic and helper functions are based heavily on
    work done in the ``rfc3986`` module.

    :param str url: URL to parse into a :class:`.Url` namedtuple.

    Partly backwards-compatible with :mod:`urlparse`.

    Example::

        >>> parse_url('http://google.com/mail/')
        Url(scheme='http', host='google.com', port=None, path='/mail/', ...)
        >>> parse_url('google.com:80')
        Url(scheme=None, host='google.com', port=80, path=None, ...)
        >>> parse_url('/foo?bar')
        Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
    s//R-ii��c@s|dkr|S�|�S(N(R(Rz(tensure_func(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pytensure_type�sRRRRRR	R
N(NNN(Rt	SCHEME_RERdtURI_RER8R|RRRatSUBAUTHORITY_RERRtUSERINFO_CHARStintRRnR]R}R~tFRAGMENT_CHARSt
ValueErrortAttributeErrorRRvR^t	text_typeR<R`(R&t
source_urlRt	authorityRR	R
t
normalize_uriRRRR�((R�s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pyt	parse_urlJs^
$			cC@s(t|�}|jpd|j|jfS(s4
    Deprecated. Use :func:`parse_url` instead.
    R(R�RR!R(R&tp((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/urllib3/util/url.pytget_host�s(RRN(7t
__future__RtretcollectionsRt
exceptionsRtpackagesRt	url_attrsRRatcompileR=R�tUNICODEtDOTALLR�tIPV4_PATtHEX_PATtformattLS32_PATt_subst_variationstUNRESERVED_PATRYRztIPV6_PATtZONE_ID_PATtIPV6_ADDRZ_PATtREG_NAME_PATR{RgtIPV6_RERbtBRACELESS_IPV6_ADDRZ_RERctSUBAUTHORITY_PATR�tsetRftSUB_DELIM_CHARSR�R}R~R�RR5RRR]RnRhR�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/_vendor/urllib3/util/url.pyt<module>sn	.
	]	#"				
	_

Hacked By AnonymousFox1.0, Coded By AnonymousFox