MMCT TEAM
Server IP : 111.118.215.189  /  Your IP : 13.59.226.183
Web Server : Apache
System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : a1673wkz ( 2475)
PHP Version : 8.2.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : //lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyc
�
>�P_c@@s�ddlmZddlmZddlZddlmZyddlmZWn!e	k
rsddl
mZnXejd�Zdd	d
ddd
dgZ
dede
�fd��YZd�Zd�Zd�ZdS(i(tabsolute_import(t
namedtupleNi(tLocationParseError(tquotes[- ]tschemetauththosttporttpathtquerytfragmenttUrlcB@sweZdZdZdddddddd�Zed��Zed��Zed��Z	ed��Z
d�ZRS(	sg
    Datastructure for representing an HTTP URL. Used as a return value for
    :func:`parse_url`.
    c
C@sN|r#|jd�r#d|}ntt|�j||||||||�S(Nt/(t
startswithtsuperRt__new__(tclsRRRRRR	R
((sR/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyRs
!cC@s|jS(s@For backwards-compatibility with urlparse. We're nice like that.(R(tself((sR/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pythostnamescC@s6|jpd}|jdk	r2|d|j7}n|S(s)Absolute path including the query string.Rt?N(RR	tNone(Rturi((sR/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pytrequest_uri#scC@s$|jrd|j|jfS|jS(s(Network location including host and ports%s:%d(RR(R((sR/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/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'
        ts://t@t:Rt#N(Rtstr(	RRRRRRR	R
turl((sR/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyR4s"

cC@s|jS(N(R(R((sR/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyt__str__\s(N(t__name__t
__module__t__doc__tslotsRRtpropertyRRRRR(((sR/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyRs
(cC@s�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.
    iRiN(Rtfind(tstdelimstmin_idxt	min_delimtdtidx((sR/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pytsplit_first`s


c
C@s|s
t�Stjd�|�}d}d}d}d}d}d}d}d|krs|jdd�\}}nt|dddg�\}}}	|	r�|	|}nd|kr�|jdd�\}}n|r	|dd	kr	|jd
d�\}}|d
7}nd|kru|jdd�\}
}|s<|
}n|rl|j�s]t|��nt	|�}q�d}n|r�|r�|}n|s�t|||||||�Sd|kr�|jdd�\}}nd|kr�|jdd�\}}nt|||||||�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.

    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', ...)
    cS@st|j��S(N(Rtgroup(tmatch((sR/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyt<lambda>�ss://iRRRRit[t]RN(
Rt!_contains_disallowed_url_pchar_retsubRtsplitR+trsplittisdigitRtint(RRRRRRR
R	tpath_tdelimt_host((sR/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyt	parse_url�sL!

		
	cC@s(t|�}|jpd|j|jfS(s5
    Deprecated. Use :func:`.parse_url` instead.
    thttp(R:RRR(Rtp((sR/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pytget_host�s(t
__future__RtcollectionsRtret
exceptionsRturllib.parseRtImportErrorturllibtcompileR1t	url_attrsRR+R:R=(((sR/usr/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/url.pyt<module>s
P	!	]

MMCT - 2023