HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/urllib/__pycache__/parse.cpython-35.pyc


FaԊ@sdZddlZddlZddlZddddddd	d
ddd
ddddddddddgZddddddddd d!d"d#d$d%d&d'd(d)d*gZddddd+dddd!dd d,d"d#d$d-d%d'd(d&d.d/d0d)d*gZdd1d"dddd d#d$d2d3d!d%d&d4gZdd1d5d6d+ddd,d2d3g
Zddddd d!dd#d$d2d3d%gZ	dd1ddd6dddd d,dd"d%g
Z
d7Zd8ZiZ
d9d:Zd;Zd<Zd=d>Zeed?d@ZeedAdBZdCdDZGdEdFdFeZGdGdHdHeZGdIdJdJeZGdKdLdLeeZGdMdNdNeeZddOlmZeddPZeddQZeddRZeZGdSddeeZ GdTddeeZ!GdUddeeZ"GdVddeeZ#GdWddeeZ$GdXddeeZ%dYdZZ&e&[&d%d[d\dZ'd]d^Z(dd_d`Z)dadbZ*d%d[dcdZ+dddZ,dedZ-d[dfdZ.dgdZ/dhZ0da1didZ2ej3djZ4dkdldmdZ5dndndkdldodpd
Z6dndndkdldodqdZ7dkdldrdZ8e9dsZ:e;e:Z<iZ=Gdtduduej>Z?dvdddwdZ@d%dddxd
ZAdvdydZBdnd%ddeAdzd	ZCd{d|ZDd}d~ZEdaFddZGdaHddZIddZJddZKdaLddZMdddZNddZOddZPddZQddZRdS)acParse (absolute and relative) URLs.

urlparse module is based upon the following RFC specifications.

RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding
and L.  Masinter, January 2005.

RFC 2732 : "Format for Literal IPv6 Addresses in URL's by R.Hinden, B.Carpenter
and L.Masinter, December 1999.

RFC 2396:  "Uniform Resource Identifiers (URI)": Generic Syntax by T.
Berners-Lee, R. Fielding, and L. Masinter, August 1998.

RFC 2368: "The mailto URL scheme", by P.Hoffman , L Masinter, J. Zawinski, July 1998.

RFC 1808: "Relative Uniform Resource Locators", by R. Fielding, UC Irvine, June
1995.

RFC 1738: "Uniform Resource Locators (URL)" by T. Berners-Lee, L. Masinter, M.
McCahill, December 1994

RFC 3986 is considered the current standard and any future changes to
urlparse module should conform with it.  The urlparse module is
currently not entirely compliant with this RFC due to defacto
scenarios for parsing, and for backward compatibility purposes, some
parsing quirks from older RFCs are retained. The testcases in
test_urlparse.py provides a good indicator of parsing behavior.
Nurlparse
urlunparseurljoin	urldefragurlsplit
urlunsplit	urlencodeparse_qs	parse_qslquote
quote_plusquote_from_bytesunquoteunquote_plusunquote_to_bytesDefragResultParseResultSplitResultDefragResultBytesParseResultBytesSplitResultBytesZftphttpZgopherZnntpZimapZwaisfileZhttpsZshttpZmmsZprosperoZrtspZrtspuZsftpZsvnzsvn+sshZwsZwssZtelnetZsnewsZrsyncZnfsZgitzgit+sshZhdlZsipZsipsZtelZmailtoZnewszAabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.cCstjtjdS)z,Clear the parse cache and the quoters cache.N)_parse_cacheclear
_safe_quotersrr"/usr/lib/python3.5/urllib/parse.pyclear_cacheKs
r asciistrictcCs|S)Nr)objrrr_noopZsr$cCs|j||S)N)encode)r#encodingerrorsrrr_encode_result]sr(cs tfdd|DS)Nc3s-|]#}|r!|jndVqdS)rN)decode).0x)r&r'rr	<genexpr>csz_decode_args.<locals>.<genexpr>)tuple)argsr&r'r)r&r'r_decode_argsasr/cGswt|dt}x?|ddD]-}|r$t|t|kr$tdq$W|rf|tfSt|tfS)Nrz$Cannot mix str and non-str arguments)
isinstancestr	TypeErrorr$r/r()r.Z	str_inputargrrr_coerce_argsesr5c@s.eZdZdZfZddddZdS)_ResultMixinStrz>Standard approach to encoding parsed results from str to bytesr!r"cs#|jfdd|DS)Nc3s!|]}|jVqdS)N)r%)r*r+)r&r'rrr,{sz)_ResultMixinStr.encode.<locals>.<genexpr>)_encoded_counterpart)selfr&r'r)r&r'rr%zsz_ResultMixinStr.encodeN)__name__
__module____qualname____doc__	__slots__r%rrrrr6vsr6c@s.eZdZdZfZddddZdS)_ResultMixinBytesz>Standard approach to decoding parsed results from bytes to strr!r"cs#|jfdd|DS)Nc3s!|]}|jVqdS)N)r))r*r+)r&r'rrr,sz+_ResultMixinBytes.decode.<locals>.<genexpr>)_decoded_counterpart)r8r&r'r)r&r'rr)sz_ResultMixinBytes.decodeN)r9r:r;r<r=r)rrrrr>~sr>c@sdeZdZdZfZeddZeddZeddZedd	Z	d
S)_NetlocResultMixinBasezHShared methods for the parsed result objects containing a netloc elementcCs|jdS)Nr)	_userinfo)r8rrrusernamesz_NetlocResultMixinBase.usernamecCs|jdS)Nr0)rA)r8rrrpasswordsz_NetlocResultMixinBase.passwordcCs8|jd}|sd}n|dk	r4|j}|S)Nr)	_hostinfolower)r8hostnamerrrrFs
	z_NetlocResultMixinBase.hostnamecCsL|jd}|dk	rHt|d}d|ko?dknsHdS|S)Nr0
ri)rDint)r8portrrrrIs
z_NetlocResultMixinBase.portN)
r9r:r;r<r=propertyrBrCrFrIrrrrr@s	r@c@s:eZdZfZeddZeddZdS)_NetlocResultMixinStrcCsb|j}|jd\}}}|rN|jd\}}}|sXd}n
d}}||fS)N@:)netloc
rpartition	partition)r8rNuserinfo	have_infohostinforB
have_passwordrCrrrrAs		
z_NetlocResultMixinStr._userinfocCs|j}|jd\}}}|jd\}}}|rr|jd\}}}|jd\}}}n|jd\}}}|sd}||fS)NrL[]rM)rNrOrP)r8rN_rShave_open_br	bracketedrFrIrrrrDs	z_NetlocResultMixinStr._hostinfoN)r9r:r;r=rJrArDrrrrrKsrKc@s:eZdZfZeddZeddZdS)_NetlocResultMixinBytescCsb|j}|jd\}}}|rN|jd\}}}|sXd}n
d}}||fS)N@:)rNrOrP)r8rNrQrRrSrBrTrCrrrrAs		
z!_NetlocResultMixinBytes._userinfocCs|j}|jd\}}}|jd\}}}|rr|jd\}}}|jd\}}}n|jd\}}}|sd}||fS)Nr[[]r\)rNrOrP)r8rNrWrSrXrYrFrIrrrrDs	z!_NetlocResultMixinBytes._hostinfoN)r9r:r;r=rJrArDrrrrrZsrZ)
namedtuplezurl fragmentz!scheme netloc path query fragmentz(scheme netloc path params query fragmentc@s"eZdZfZddZdS)rcCs&|jr|jd|jS|jSdS)N#)fragmenturl)r8rrrgeturls	zDefragResult.geturlN)r9r:r;r=rcrrrrrsc@s"eZdZfZddZdS)rcCs
t|S)N)r)r8rrrrcszSplitResult.geturlN)r9r:r;r=rcrrrrrsc@s"eZdZfZddZdS)rcCs
t|S)N)r)r8rrrrcszParseResult.geturlN)r9r:r;r=rcrrrrrsc@s"eZdZfZddZdS)rcCs&|jr|jd|jS|jSdS)N#)rarb)r8rrrrcs	zDefragResultBytes.geturlN)r9r:r;r=rcrrrrrsc@s"eZdZfZddZdS)rcCs
t|S)N)r)r8rrrrcszSplitResultBytes.geturlN)r9r:r;r=rcrrrrr	sc@s"eZdZfZddZdS)rcCs
t|S)N)r)r8rrrrcszParseResultBytes.geturlN)r9r:r;r=rcrrrrrscCsNttfttfttff}x&|D]\}}||_||_q(WdS)N)rrrrrrr7r?)Z
_result_pairsZ_decodedZ_encodedrrr_fix_result_transcodings			reTc
Cst||\}}}t|||}|\}}}}}|tkrld|krlt|\}}nd}t||||||}	||	S)a#Parse a URL into 6 components:
    <scheme>://<netloc>/<path>;<params>?<query>#<fragment>
    Return a 6-tuple: (scheme, netloc, path, params, query, fragment).
    Note that we don't break the components up in smaller bits
    (e.g. netloc is a single string) and we don't expand % escapes.;r)r5ruses_params_splitparamsr)
rbschemeallow_fragments_coerce_resultZsplitresultrNqueryraparamsresultrrrr!scCsqd|kr@|jd|jd}|dkrO|dfSn|jd}|d|||ddfS)N/rfrrr0)findrfind)rbirrrrh1s
rhcCsht|}x;dD]3}|j||}|dkrt||}qW|||||dfS)Nz/?#r)lenrpmin)rbstartdelimcZwdelimrrr_splitnetloc:s
rxcCs|s!tdd|Dr%dSddl}|jdd}|jdd}|jdd}|jdd}|jd	|}||krdSx2d
D]*}||krtd|dd
qWdS)Ncss!|]}t|dkVqdS)N)ord)r*rwrrrr,Csz_checknetloc.<locals>.<genexpr>rrLrrMr`?ZNFKCz/?#@:znetloc 'z' contains invalid z#characters under NFKC normalization)anyunicodedatareplaceZ	normalize
ValueError)rNr}nZnetloc2rwrrr_checknetlocBs!
rc
Cs8t||\}}}t|}|||t|t|f}tj|d}|rg||Stttkrtd}}}|jd}	|	dkrM|d|	dkr|d|	j	}||	dd}|dddkrPt
|d\}}d	|kr,d
|ksDd
|krPd	|krPtd|rzd|krz|jdd\}}d
|kr|jd
d\}}t
|t|||||}
|
t|<||
Sxv|d|	D]}|tkrPqW||	dd}|s0tdd|DrM|d|	j	|}}|dddkrt
|d\}}d	|krd
|ksd
|krd	|krtd|rd|kr|jdd\}}d
|kr|jd
d\}}t
|t|||||}
|
t|<||
S)aParse a URL into 5 components:
    <scheme>://<netloc>/<path>?<query>#<fragment>
    Return a 5-tuple: (scheme, netloc, path, query, fragment).
    Note that we don't break the components up in smaller bits
    (e.g. netloc is a single string) and we don't expand % escapes.NrrMrrr0z//rUrVzInvalid IPv6 URLr`r{css|]}|dkVqdS)
0123456789Nr)r*rwrrrr,|szurlsplit.<locals>.<genexpr>)r5booltypergetrsMAX_CACHE_SIZEr rprErxrsplitrrscheme_charsr|)
rbrirjrkkeycachedrNrlrarrvrwrestrrrrTs\!



 

cCsVt|\}}}}}}}|r7d||f}|t|||||fS)zPut a parsed URL back together again.  This may result in a
    slightly different, but equivalent URL, if the URL that was parsed
    originally had redundant delimiters, e.g. a ? with an empty query
    (the draft states that these are equivalent).z%s;%s)r5r)
componentsrirNrbrmrlrarkrrrrs!cCst|\}}}}}}|sL|r|tkr|dddkr|rr|dddkrrd|}d|p~d|}|r|d|}|r|d|}|r|d	|}||S)
akCombine the elements of a tuple as returned by urlsplit() into a
    complete URL as a string. The data argument can be any five-item iterable.
    This may result in a slightly different, but equivalent URL, if the URL that
    was parsed originally had unnecessary delimiters (for example, a ? with an
    empty query; the RFC states that these are equivalent).Nrz//r0rorrMr{r`)r5uses_netloc)rrirNrbrlrarkrrrrs.
cCsR|s
|S|s|St||\}}}t|d|\}}}}}}	t|||\}
}}}
}}|
|ks|
tkr||S|
tkr|r|t|
|||
||fS|}|r|
r|}|}
|s|}|t|
|||
||fS|jd}|ddkr>|d=|dddkrf|jd}n6||jd}td|dd	|dd
<g}x_|D]W}|dkry|jWqtk
rYqXq|dkrqq|j	|qW|ddkr!|j	d|t|
|dj
|p?d|
||fS)
zaJoin a base URL and a possibly relative URL to form an absolute
    interpretation of the latter.rror0N...rrrr)rr)r5r
uses_relativerrrfilterpop
IndexErrorappendjoin)baserbrjrkZbschemeZbnetlocZbpathZbparamsZbqueryZ	bfragmentrirNpathrmrlraZ
base_partsZsegmentsZ
resolved_pathZsegrrrrsT$$
#


c	Cs|t|\}}d|kr]t|\}}}}}}t|||||df}nd}|}|t||S)zRemoves any existing fragment from URL.

    Returns a tuple of the defragmented URL and the fragment.  If
    the URL contained no fragments, the second element is the
    empty string.
    r`r)r5rrr)	rbrksrpaqZfragZdefragrrrrs!Z0123456789ABCDEFabcdefcCs
|s|jdSt|tr/|jd}|jd}t|dkrT|S|dg}|j}tdkrddtDaxq|ddD]_}y0|t|dd	||d	dWqtk
r|d||YqXqWdj	|S)
z,unquote_to_bytes('abc%20def') -> b'abc def'.zutf-8%r0rNcSsFi|]<}tD]/}tt||dg||jqqS))_hexdigbytesrHr%)r*rbrrr
<dictcomp>s	z$unquote_to_bytes.<locals>.<dictcomp>r)
rr1r2r%rsr
_hextobyterKeyErrorr)stringbitsresritemrrrrs*
		


z([-]+)zutf-8r~cCsd|kr|j|S|dkr)d}|dkr;d}tj|}|dg}|j}xRtdt|dD]8}|t||j|||||dqyWdj|S)	aReplace %xx escapes by their single-character equivalent. The optional
    encoding and errors parameters specify how to decode percent-encoded
    sequences into Unicode characters, as accepted by the bytes.decode()
    method.
    By default, percent-encoded sequences are decoded with UTF-8, and invalid
    sequences are replaced by a placeholder character.

    unquote('abc%20def') -> 'abc def'.
    %Nzutf-8r~rr0rr)r_asciirerrangersrr)r)rr&r'rrrrrrrrr$s

	 F&c

Csri}t|||d|d|d|}xA|D]9\}}	||kr]||j|	q1|	g||<q1W|S)aParse a query given as a string argument.

        Arguments:

        qs: percent-encoded query string to be parsed

        keep_blank_values: flag indicating whether blank values in
            percent-encoded queries should be treated as blank strings.
            A true value indicates that blanks should be retained as
            blank strings.  The default false value indicates that
            blank values are to be ignored and treated as if they were
            not included.

        strict_parsing: flag indicating what to do with parsing errors.
            If false (the default), errors are silently ignored.
            If true, errors raise a ValueError exception.

        encoding and errors: specify how to decode percent-encoded sequences
            into Unicode characters, as accepted by the bytes.decode() method.

        separator: str. The symbol to use for separating the query arguments.
            Defaults to &.
    r&r'	separator)r
r)
qskeep_blank_valuesstrict_parsingr&r'rZ
parsed_resultpairsnamevaluerrrr	=sc
Csvt|\}}|s/t|ttfr;tddd|j|D}g}x|D]
}	|	r{|r{qd|	jdd}
t|
dkr|rtd|	f|rd|
jdnqdt|
ds|rd|
d	jd
d}t	|d|d
|}||}|
djd
d}t	|d|d
|}||}|j||fqdW|S)aParse a query given as a string argument.

    Arguments:

    qs: percent-encoded query string to be parsed

    keep_blank_values: flag indicating whether blank values in
        percent-encoded queries should be treated as blank strings.  A
        true value indicates that blanks should be retained as blank
        strings.  The default false value indicates that blank values
        are to be ignored and treated as if they were  not included.

    strict_parsing: flag indicating what to do with parsing errors. If
        false (the default), errors are silently ignored. If true,
        errors raise a ValueError exception.

    encoding and errors: specify how to decode percent-encoded sequences
        into Unicode characters, as accepted by the bytes.decode() method.

    separator: str. The symbol to use for separating the query arguments.
        Defaults to &.

    Returns a list, as G-d intended.
    z*Separator must be of type string or bytes.cSsg|]}|qSrr)r*s1rrr
<listcomp>s	zparse_qsl.<locals>.<listcomp>=r0rzbad query field: %rrr+ r&r')
r5r1r2rrrrsrr~r)
rrrr&r'rrkrrZ
name_valueZnvrrrrrr
`s0
cCs"|jdd}t|||S)zLike unquote(), but also replace plus signs by spaces, as required for
    unquoting HTML form values.

    unquote_plus('%7e/abc+def') -> '~/abc def'
    rr)r~r)rr&r'rrrrssAABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-c@s:eZdZdZddZddZddZdS)	QuoterzA mapping from bytes (in range(0,256)) to strings.

    String values are percent-encoded byte values, unless the key < 128, and
    in the "safe" set (either the specified safe set, or default set).
    cCstj||_dS)zsafe: bytes object.N)_ALWAYS_SAFEunionsafe)r8rrrr__init__szQuoter.__init__cCsd|jjt|fS)Nz<%s %r>)	__class__r9dict)r8rrr__repr__szQuoter.__repr__cCs8||jkrt|ndj|}|||<|S)Nz%{:02X})rchrformat)r8rrrrr__missing__s*
zQuoter.__missing__N)r9r:r;r<rrrrrrrrsrrocCst|trR|s|S|dkr+d}|dkr=d}|j||}n0|dk	rjtd|dk	rtdt||S)aquote('abc def') -> 'abc%20def'

    Each part of a URL, e.g. the path info, the query, etc., has a
    different set of reserved characters that must be quoted.

    RFC 2396 Uniform Resource Identifiers (URI): Generic Syntax lists
    the following reserved characters.

    reserved    = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" |
                  "$" | ","

    Each of these characters is reserved in some component of a URL,
    but not necessarily in all of them.

    By default, the quote function is intended for quoting the path
    section of a URL.  Thus, it will not encode '/'.  This character
    is reserved, but in typical usage the quote function is being
    called on a path where the existing slash characters are used as
    reserved characters.

    string and safe may be either str or bytes objects. encoding and errors
    must not be specified if string is a bytes object.

    The optional encoding and errors parameters specify how to deal with
    non-ASCII characters, as accepted by the str.encode method.
    By default, encoding='utf-8' (characters are encoded with UTF-8), and
    errors='strict' (unsupported characters raise a UnicodeEncodeError).
    Nzutf-8r"z,quote() doesn't support 'encoding' for bytesz*quote() doesn't support 'errors' for bytes)r1r2r%r3r
)rrr&r'rrrrscCst|trd|ks6t|trId|krIt||||St|trad}nd}t|||||}|jddS)zLike quote(), but also replace ' ' with '+', as required for quoting
    HTML form values. Plus signs in the original string are escaped unless
    they are included in safe. It also does not have safe default to '/'.
    r r)r1r2rrr~)rrr&r'Zspacerrrrs	cst|ttfs!td|s+dSt|trO|jdd}ntdd|D}|jt|s|jSyt	|Wn)t
k
rt|jt	|<YnXdj
fdd|DS)zLike quote(), but accepts a bytes object rather than a str, and does
    not perform string-to-bytes encoding.  It always returns an ASCII string.
    quote_from_bytes(b'abc def?') -> 'abc%20def%3f'
    z!quote_from_bytes() expected bytesrr!ignorecSs"g|]}|dkr|qS)r)r*rwrrrrs	z$quote_from_bytes.<locals>.<listcomp>csg|]}|qSrr)r*char)quoterrrrs	)r1r	bytearrayr3r2r%rstrip_ALWAYS_SAFE_BYTESr)rrr__getitem__r)Zbsrr)rrr
s

cCst|dr|j}niy*t|rGt|dtrGtWn<tk
rtj\}}}tdj|YnXg}	|s:x |D]\}
}t|
t	r||
|}
n|t
|
|||}
t|t	r|||}n|t
||||}|	j|
d|qWn|xy|D]q\}
}t|
t	rn||
|}
n|t
|
|||}
t|t	r|||}|	j|
d|qAt|t
r|||||}|	j|
d|qAyt|}WnBtk
rO|t
||||}|	j|
d|YqAXx_|D]W}
t|
t	r~||
|}
n|t
|
|||}
|	j|
d|
qWWqAWdj|	S)a^Encode a dict or sequence of two-element tuples into a URL query string.

    If any values in the query arg are sequences and doseq is true, each
    sequence element is converted to a separate parameter.

    If the query arg is a sequence of two-element tuples, the order of the
    parameters in the output will match the order of parameters in the
    input.

    The components of a query arg may each be either a string or a bytes type.

    The safe, encoding, and errors parameters are passed down to the function
    specified by quote_via (encoding and errors only if a component is a str).
    itemsrz1not a valid non-string sequence or mapping objectrr)
hasattrrrsr1r-r3sysexc_infowith_tracebackrr2rr)rlZdoseqrr&r'Z	quote_viaZtyZvatblkrr+ZeltrrrrsP 



cCs[t|trWy|jdj}Wn,tk
rVtdt|dYnX|S)zto_bytes(u"URL") --> 'URL'.ASCIIzURL z contains non-ASCII characters)r1r2r%r)UnicodeErrorrepr)rbrrrto_bytes`s
rcCst|j}|dddkrT|dddkrT|ddj}|dddkr|ddj}|S)	z8unwrap('<URL:type://host/path>') --> 'type://host/path'.Nr0<>zURL:rr)r2strip)rbrrrunwrapms,rcCsbtdkr!tjdtjatj|}|rX|j\}}|j|fSd|fS)z:splittype('type:opaquestring') --> 'type', 'opaquestring'.Nz
([^/:]+):(.*))	_typeprogrecompileDOTALLmatchgroupsrE)rbrridatarrr	splittypevsrcCs|tdkr!tjdtjatj|}|rr|j\}}|rh|ddkrhd|}||fSd|fS)z;splithost('//host[:port]/path') --> 'host[:port]', '/path'.Nz//([^/?]*)(.*)rro)	_hostprogrrrrr)rbrZ	host_portrrrr	splithosts

rcCs.|jd\}}}|r$|nd|fS)zJsplituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.rLN)rO)hostuserrvrrr	splitusersrcCs.|jd\}}}||r'|ndfS)z/splitpasswd('user:passwd') -> 'user', 'passwd'.rMN)rP)rrvZpasswdrrrsplitpasswdsrcCsbtdkr!tjdtjatj|}|rX|j\}}|rX||fS|dfS)z*splitport('host:port') --> 'host', 'port'.Nz(.*):([0-9]*)$)	_portprogrrrrr)rrrIrrr	splitports
rr0cCsl|jd\}}}|s'|}n;|rbyt|}Wntk
rWd}YnX||fS||fS)zSplit host and port, returning numeric port.
    Return given default port if no ':' found; defaults to -1.
    Return numerical port if a valid number are found after ':'.
    Return None if ':' but not a valid number.rMN)rOrHr)rZdefportrvrIZnportrrr
splitnports	

rcCs2|jd\}}}|r(||fS|dfS)z/splitquery('/path?query') --> '/path', 'query'.r{N)rO)rbrrvrlrrr
splitquerys
rcCs2|jd\}}}|r(||fS|dfS)z)splittag('/path#tag') --> '/path', 'tag'.r`N)rO)rbrrvtagrrrsplittags
rcCs'|jd}|d|ddfS)zksplitattr('/path;attr1=value1;attr2=value2;...') ->
        '/path', ['attr1=value1', 'attr2=value2', ...].rfrr0N)r)rbZwordsrrr	splitattrsrcCs.|jd\}}}||r'|ndfS)z-splitvalue('attr=value') --> 'attr', 'value'.rN)rP)attrrvrrrr
splitvaluesrr)Sr<rrcollections__all__rrrgZnon_hierarchicalZ
uses_queryZ
uses_fragmentrrrr Z_implicit_encodingZ_implicit_errorsr$r(r/r5objectr6r>r@rKrZr_Z_DefragResultBaseZ_SplitResultBaseZ_ParseResultBaseZ
ResultBaserrrrrrrerrhrxrrrrrrrrrrrrr	r
r	frozensetrrrrdefaultdictrrrr
rrrrrrrrrrrrrrrrrrrr<module>s		 
	:E"6	,O