%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/
Upload File :
Create Path :
Current File : //opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyo

�
�wMVc
@ssddlmZddlmZdedddddd	d
dg�fd��YZd
�Zd�Zd�ZdS(i����(t
namedtuplei(tLocationParseErrortUrltschemetauththosttporttpathtquerytfragmentcBs_eZdZdZdddddddd�Zed��Zed��Zed��Z	RS(sg
    Datastructure for representing an HTTP URL. Used as a return value for
    :func:`parse_url`.
    c	Cs+tt|�j||||||||�S(N(tsuperRt__new__(tclsRRRRRRR	((s_/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyR
scCs|jS(s@For backwards-compatibility with urlparse. We're nice like that.(R(tself((s_/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pythostnamescCs6|jpd}|jdk	r2|d|j7}n|S(s)Absolute path including the query string.t/t?N(RRtNone(R
turi((s_/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pytrequest_uriscCs$|jrd|j|jfS|jS(s(Network location including host and ports%s:%d(RR(R
((s_/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pytnetlocs	(N(
t__name__t
__module__t__doc__tslotsRRtpropertyRRR(((s_/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyRs
cCs�d}d}xV|D]N}|j|�}|dkr:qn|dksR||kr|}|}qqW|dks}|dkr�|ddfS|| ||d|fS(s�
    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_/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pytsplit_first's


c
Cs�d}d}d}d}d}d}d}d|krQ|jdd�\}}nt|dddg�\}}}	|	r�|	|}nd|kr�|jdd�\}}n|r�|ddkr�|jd	d�\}}|d	7}nd
|krS|jd
d�\}
}|s|
}n|rJ|j�s;t|��nt|�}qid}n|ri|ri|}n|s�t|||||||�Sd|kr�|jdd�\}}nd|kr�|jdd�\}}nt|||||||�S(s7
    Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
    performed to parse incomplete urls. Fields not provided will be None.

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

    Example: ::

        >>> parse_url('http://google.com/mail/')
        Url(scheme='http', host='google.com', port=None, path='/', ...)
        >>> 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://iRRt#t@it[t]t:N(RtsplitR"trsplittisdigitRtintR(turlRRRRRR	Rtpath_tdelimt_host((s_/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyt	parse_urlHsF!

		
	cCs(t|�}|jpd|j|jfS(s5
    Deprecated. Use :func:`.parse_url` instead.
    thttp(R0RRR(R,tp((s_/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pytget_host�sN(tcollectionsRt
exceptionsRRR"R0R3(((s_/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyt<module>s
4!	!	U

Zerion Mini Shell 1.0