U &.e@sdZddlZddlZddlZddlZddlZddddddd d d d d ddddddddddgZddddddddd d!d"d#d$d%d&d'd(d)d*gZdddddd+dddd"d d!d,d#d$d%d-d'd(d&d.d/d0d)d*gZddd1d#ddd d!d$d%d2d3d"d&d4gZ dd1d5d6d+ddd,d2d3g Z ddddd d!d"dd$d%d2d3g Z ddd1ddd6ddd d!d,dd#g Z d7Z d8Zd9d:d;gZdZd?Zd@ZdAdBZeefdCdDZeefdEdFZdGdHZGdIdJdJeZGdKdLdLeZGdMdNdNeZGdOdPdPeeZGdQdRdReeZddSlmZeddTZ eddUZ!eddVZ"dWe _dXe j#_dYe j$_dZe!_d[e!j%_d\e!j&_d]e!j'_d^e!j(_d_e!j$_d`e"_e!j%je"j%_e!j&je"j&_e!j'je"j'_dae"j)_e!j(je"j(_e!j$je"j$_eZ*Gdbdde eZ+Gdcdde!eZ,Gdddde"eZ-Gdedde eZ.Gdfdde!eZ/Gdgdde"eZ0dhdiZ1e1[1ddkdZ2dldmZ3ddndoZ4dpdqZ5drdsZ6ddtdZ7dudZ8dvdZ9ddwdZ:dxdZ;dyZe?d{Z@dd~dZAddd ZBGdddeCZDdZEdaFddd ZGdddZHeIdZJeKeJZLiZMGdddejNZOddd ZPddd ZQdddZRddddeQfdd ZSddZTddZUddZVddZWdaXddZYddZZda[ddZ\ddZ]ddZ^ddZ_ddZ`ddZadabddZcdddZddddZeddZfddZgddZhddZiddZjddZkddZlddZmdS)a3Parse (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. The WHATWG URL Parser spec should also be considered. We are not compliant with it either due to existing user code API behavior expectations (Hyrum's Law). It serves as a useful guide when making changes. Nurlparse urlunparseurljoin urldefragurlsplit urlunsplit urlencodeparse_qs parse_qslquote quote_plusquote_from_bytesunquote unquote_plusunquote_to_bytes DefragResult ParseResult SplitResultDefragResultBytesParseResultBytesSplitResultBytesZftphttpZgopherZnntpZimapZwaisfileZhttpsZshttpZmmsZprosperoZrtspZrtspuZsftpZsvnzsvn+sshZwsZwssZtelnetZsnewsZrsyncZnfsZgitzgit+sshZhdlZsipZsipsZtelZmailtoZnewszAabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.z!     cCsttdS)z,Clear the parse cache and the quoters cache.N) _parse_cacheclear _safe_quotersr!r!$/usr/lib64/python3.8/urllib/parse.py clear_cache`sr#asciistrictcCs|SNr!)objr!r!r"_nooposr(cCs |||Sr&encode)r'encodingerrorsr!r!r"_encode_resultrsr-cstfdd|DS)Nc3s"|]}|r|ndVqdS)rNdecode.0xr+r,r!r" xsz_decode_args..)tuple)argsr+r,r!r3r" _decode_argsvsr7cGsVt|dt}|ddD]}|rt|t|krtdq|rH|tfSt|tfS)Nrz$Cannot mix str and non-str arguments) isinstancestr TypeErrorr(r7r-)r6Z str_inputargr!r!r" _coerce_argszs  r=c@seZdZdZdZdddZdS) _ResultMixinStrz>Standard approach to encoding parsed results from str to bytesr!r$r%cs|jfdd|DS)Nc3s|]}|VqdSr&r)r0r3r!r"r4sz)_ResultMixinStr.encode..)_encoded_counterpartselfr+r,r!r3r"r*sz_ResultMixinStr.encodeN)r$r%)__name__ __module__ __qualname____doc__ __slots__r*r!r!r!r"r>sr>c@seZdZdZdZdddZdS) _ResultMixinBytesz>Standard approach to decoding parsed results from bytes to strr!r$r%cs|jfdd|DS)Nc3s|]}|VqdSr&r.r0r3r!r"r4sz+_ResultMixinBytes.decode..)_decoded_counterpartr@r!r3r"r/sz_ResultMixinBytes.decodeN)r$r%)rBrCrDrErFr/r!r!r!r"rGsrGc@sDeZdZdZdZeddZeddZeddZed d Z d S) _NetlocResultMixinBasezHShared methods for the parsed result objects containing a netloc elementr!cCs |jdS)Nr _userinforAr!r!r"usernamesz_NetlocResultMixinBase.usernamecCs |jdS)Nr8rJrLr!r!r"passwordsz_NetlocResultMixinBase.passwordcCsD|jd}|sdSt|tr dnd}||\}}}|||S)Nr%%) _hostinfor9r: partitionlower)rAhostname separatorZpercentZzoner!r!r"rTs  z_NetlocResultMixinBase.hostnamecCsl|jd}|dk rhzt|d}Wn(tk rHd|}t|dYnXd|kr^dkshntd|S)Nr8 z+Port could not be cast to integer value as rizPort out of range 0-65535)rQint ValueError)rAportmessager!r!r"rYs  z_NetlocResultMixinBase.portN) rBrCrDrErFpropertyrMrNrTrYr!r!r!r"rIs   rIc@s(eZdZdZeddZeddZdS)_NetlocResultMixinStrr!cCsD|j}|d\}}}|r4|d\}}}|s:///;?# 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)r=r uses_params _splitparamsr) rrschemeallow_fragments_coerce_resultZ splitresultr`queryrqparamsresultr!r!r"rzs cCsRd|kr,|d|d}|dkr6|dfSn |d}|d|||ddfS)N/ryrrr8)findrfind)rrir!r!r"r{s   r{cCsHt|}dD]"}|||}|dkr t||}q |||||dfS)Nz/?#r)lenrmin)rrstartdelimcZwdelimr!r!r" _splitnetlocs   rcCs|r |rdSddl}|dd}|dd}|dd}|dd}|d|}||kr`dSdD] }||krdtd |d d qddS) Nrr]rr^ro?NFKCz/?#@:znetloc 'z' contains invalid z#characters under NFKC normalization)isascii unicodedatareplace normalizerX)r`rnZnetloc2rr!r!r" _checknetlocs       rcCstD]}||d}q|S)Nr)_UNSAFE_URL_BYTES_TO_REMOVEr)rrbr!r!r"_remove_unsafe_bytes_from_urlsrc Cst||\}}}t|}t|}|t}|t}t|}|||t|t|f}t|d}|rj||St tt kr|t d}}}| d} | dkr|d| dkrn|| dd}|dddkr t |d\}}d |krd |ksd |kr d |kr td |r,d |kr,|d d\}}d |krF|d d\}}t|td||||} | t|<|| S|d| D]} | tkrzqҐqz|| dd} | rtdd| Dr|d| | }}|dddkr"t |d\}}d |krd |ksd |kr"d |kr"td |rBd |krB|d d\}}d |kr\|d d\}}t|t|||||} | t|<|| S)aParse a URL into 5 components: :///?# 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.Nrr^rrr8//rdrezInvalid IPv6 URLrorcss|]}|dkVqdS) 0123456789Nr!r1rr!r!r"r4szurlsplit..)r=rlstrip_WHATWG_C0_CONTROL_OR_SPACEstripbooltypergetrMAX_CACHE_SIZEr#rrrXsplitrr scheme_charsanyrS) rrr|r}r~keycachedr`rrqrvrrestr!r!r"rsn           cCs<t|\}}}}}}}|r&d||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)r=r) componentsr|r`rrrrrqr~r!r!r"rs  cCst|\}}}}}}|s4|r`|tkr`|dddkr`|rP|dddkrPd|}d|pXd|}|rp|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).Nrrr8rrr^rro)r= uses_netloc)rr|r`rrrrqr~r!r!r"rs    c Cs|s|S|s|St||\}}}t|d|\}}}}}} t|||\} } } } }}| |ks`| tkrh||S| tkr| r|t| | | | ||fS|} | s| s|} |} |s|}|t| | | | ||fS|d}|ddkr|d=| dddkr| d}n(|| d}td|dd|dd<g}|D]P}|dkr\z |Wntk rXYnXn|dkrlq(n | |q(|ddkr| d|t| | d |pd| ||fS) zaJoin a base URL and a possibly relative URL to form an absolute interpretation of the latter.rrNr8...)rr) r=r uses_relativerrrfilterpop IndexErrorappendjoin)baserrr}r~ZbschemeZbnetlocZbpathZbparamsZbqueryZ bfragmentr|r`pathrrrqZ base_partsZsegmentsZ resolved_pathZsegr!r!r"rsp            c CsTt|\}}d|kr>t|\}}}}}}t|||||df}nd}|}|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. ror)r=rrr) rrr~srpaqZfragZdefragr!r!r"rTs Z0123456789ABCDEFabcdefc Cs|s|jdSt|tr"|d}|d}t|dkr<|S|dg}|j}tdkrbddtDa|ddD]R}z(|t|dd ||d dWqntk r|d||YqnXqnd |S) z,unquote_to_bytes('abc%20def') -> b'abc def'.utf-8rPr8rNcSs.i|]&}tD]}||t||q qSr!)_hexdigr*bytesfromhex)r1rrr!r!r" zs  z$unquote_to_bytes..r) rr9r:r*rr _hextobyterKeyErrorr)stringbitsresritemr!r!r"rgs,     z([-]+)rrcCst|trtdd|kr$|j|S|dkr0d}|dkr 'abc def'. zExpected str, got bytesrONrrrr8rr) r9rr;r_asciirerrangerrr/r)rr+r,rrrrr!r!r"rs   Fc CsNi}t|||||||d}|D]*\} } | |kr>|| | q| g|| <q|S)aXParse 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. max_num_fields: int. If set, then throws a ValueError if there are more than n fields read by parse_qsl(). separator: str. The symbol to use for separating the query arguments. Defaults to &. Returns a dictionary. )r+r,max_num_fieldsrU)r r) qskeep_blank_valuesstrict_parsingr+r,rrUZ parsed_resultpairsnamevaluer!r!r"r s  c@seZdZdZdS)_QueryStringSeparatorWarningz>Warning for using default `separator` in parse_qs or parse_qslN)rBrCrDrEr!r!r!r"rsrz/etc/python/urllib.cfgc Cst|\}}t|tr |d}|r2t|ttfsB|dk rBtdt}|dkrRt}d} |dkrrtj | }d} |dkrz t t } Wnt k rYnJX| :ddl} | jddd} | | | j d | dd }|aW5QRXt } |dkrd |krdd lm}|d tddd}n:|dkr(|}n*t|dkrRt| d| ddd|dk r||krd|d|d }nd||}||krtd||krdd|dD}ndd||D}g}|D]}|s|sq|dd}t|dkr4|rtd|f|r|dnqt|dsH|r|ddd}t|||d }||}|ddd}t|||d }||}|||fq|S)!aXParse 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. max_num_fields: int. If set, then throws a ValueError if there are more than n fields read by parse_qsl(). separator: str. The symbol to use for separating the query arguments. Defaults to &. Returns a list, as G-d intended. r$Nz*Separator must be of type string or bytes.ZPYTHON_URLLIB_QS_SEPARATORzenvironment variabler)ro)Z interpolationZcomment_prefixesr )Zfallbackry)warnaThe default separator of urllib.parse.parse_qsl and parse_qs was changed to '&' to avoid a web cache poisoning issue (CVE-2021-23336). By default, semicolons no longer act as query field separators. See https://access.redhat.com/articles/5860431 for more details.r stacklevel&Zlegacyr8z (from z) must contain z1 character, or "legacy". See z7s zparse_qsl..cSsg|]}|qSr!r!)r1rr!r!r"r9s=zbad query field: %rr+ r3)r=r9rr/r:rXobject_default_qs_separatorosenvironropen_QS_SEPARATOR_CONFIG_FILENAMEFileNotFoundError configparserZ ConfigParserZ read_filewarningsrrrcountrrrr)rrrr+r,rrUr~Z_legacyZ envvar_nameZ config_sourcerrZconfigr num_fieldsrrZ name_valueZnvrrr!r!r"r s                  cCs|dd}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)rr)rr+r,r!r!r"rQs sBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-~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). cCst||_dS)zsafe: bytes object.N) _ALWAYS_SAFEunionsafe)rArr!r!r"__init__iszQuoter.__init__cCsd|jjt|fS)Nz<%s %r>) __class__rBdictrLr!r!r"__repr__mszQuoter.__repr__cCs(||jkrt|nd|}|||<|S)Nz%{:02X})rchrformat)rArrr!r!r" __missing__qszQuoter.__missing__N)rBrCrDrErrrr!r!r!r"rasrrcCsbt|tr8|s|S|dkrd}|dkr*d}|||}n |dk rHtd|dk rXtdt||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. The quote function offers a cautious (not minimal) way to quote a string for most of these parts. RFC 3986 Uniform Resource Identifier (URI): Generic Syntax lists the following (un)reserved characters. unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" reserved = gen-delims / sub-delims gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "=" Each of the reserved characters is reserved in some component of a URL, but not necessarily in all of them. The quote function %-escapes all characters that are neither in the unreserved chars ("always safe") nor the additional chars set via the safe arg. The default for the safe arg is '/'. The character is reserved, but in typical usage the quote function is being called on a path where the existing slash characters are to be preserved. Python 3.7 updates from using RFC 2396 to RFC 3986 to quote URL strings. Now, "~" is included in the set of unreserved 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). Nrr%z,quote() doesn't support 'encoding' for bytesz*quote() doesn't support 'errors' for bytes)r9r:r*r;r )rrr+r,r!r!r"r ws' cCsdt|trd|ks$t|tr2d|kr2t||||St|trBd}nd}t|||||}|ddS)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)r9r:rr r)rrr+r,Zspacer!r!r"r s cst|ttfstd|sdSt|tr6|dd}ntdd|D}|t|s^|Sz t |Wn&t k rt |j t |<YnXd 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$ignorecSsg|]}|dkr|qS)r!rr!r!r"rsz$quote_from_bytes..csg|] }|qSr!r!)r1charZquoterr!r"rs)r9r bytearrayr;r:r*rstrip_ALWAYS_SAFE_BYTESr/r rr __getitem__r)Zbsrr!rr"r s  c Cs t|dr|}nPzt|r0t|dts0tWn0tk rbt\}}}td|YnXg} |s|D]j\} } t| t r|| |} n|t | |||} t| t r|| |} n|t | |||} | | d| qpn"|D]\} } t| t r|| |} n|t | |||} t| t rB|| |} | | d| qt| t rp|| |||} | | d| qz t| } Wn:tk r|t | |||} | | d| YqX| D]B} t| t r|| |} n|t | |||} | | d| qqd | 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) hasattrrrr9r5r;sysexc_infowith_tracebackrr:rr)rZdoseqrr+r,Z quote_viaZtyZvatblkrr2Zeltr!r!r"rsR                cCstjdtddt|S)Nz/urllib.parse.to_bytes() is deprecated as of 3.8rr)rrDeprecationWarning _to_bytesrrr!r!r"to_bytes%s rcCsJt|trFz|d}Wn(tk rDtdt|dYnX|S)zto_bytes(u"URL") --> 'URL'.ASCIIzURL z contains non-ASCII characters)r9r:r*r/ UnicodeErrorreprrr!r!r"r+s   rcCs`t|}|dddkr<|dddkr<|dd}|dddkr\|dd}|S)zTransform a string like '' into 'scheme://host/path'. The string is returned unchanged if it's not a wrapped URL. Nr8zURL:)r:rrr!r!r"unwrap9s   r cCstjdtddt|S)NzUurllib.parse.splittype() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr _splittyperr!r!r" splittypeFs rcCsDtdkrtdtjat|}|r<|\}}||fSd|fS)z:splittype('type:opaquestring') --> 'type', 'opaquestring'.Nz ([^/:]+):(.*)) _typeprogrecompileDOTALLmatchgroupsrS)rrrr|datar!r!r"rNs   rcCstjdtddt|S)NzUurllib.parse.splithost() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr _splithostrr!r!r" splithost[s rcCsXtdkrtdtjat|}|rP|\}}|rH|ddkrHd|}||fSd|fS)z;splithost('//host[:port]/path') --> 'host[:port]', '/path'.Nz//([^/#?]*)(.*)rr) _hostprogrrrrr)rrrZ host_portrr!r!r"rcs  rcCstjdtddt|S)NzUurllib.parse.splituser() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr _splituserhostr!r!r" splituserrs rcCs |d\}}}|r|nd|fS)zJsplituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.r]Nra)ruserrr!r!r"rysrcCstjdtddt|S)NzWurllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr _splitpasswd)rr!r!r" splitpasswds r!cCs |d\}}}||r|ndfS)z/splitpasswd('user:passwd') -> 'user', 'passwd'.r^NrR)rrZpasswdr!r!r"r sr cCstjdtddt|S)NzUurllib.parse.splitport() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr _splitportrr!r!r" splitports r$cCsDtdkrtdtjat|}|r<|\}}|r<||fS|dfS)z*splitport('host:port') --> 'host', 'port'.Nz (.*):([0-9]*)) _portprogrrr fullmatchr)rrrYr!r!r"r#s  r#rcCstjdtddt||S)NzVurllib.parse.splitnport() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr _splitnport)rdefportr!r!r" splitnports r)cCsT|d\}}}|s|}n2|rLz t|}Wntk rBd}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.r^N)rarWrX)rr(rrYZnportr!r!r"r's  r'cCstjdtddt|S)NzVurllib.parse.splitquery() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr _splitqueryrr!r!r" splitquerys r+cCs$|d\}}}|r||fS|dfS)z/splitquery('/path?query') --> '/path', 'query'.rNr)rrrrrr!r!r"r*sr*cCstjdtddt|S)NzTurllib.parse.splittag() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr _splittagrr!r!r"splittags r-cCs$|d\}}}|r||fS|dfS)z)splittag('/path#tag') --> '/path', 'tag'.roNr)rrrrtagr!r!r"r,sr,cCstjdtddt|S)NzUurllib.parse.splitattr() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr _splitattrrr!r!r" splitattrs r0cCs|d}|d|ddfS)zksplitattr('/path;attr1=value1;attr2=value2;...') -> '/path', ['attr1=value1', 'attr2=value2', ...].ryrr8Nr)rrZwordsr!r!r"r/s r/cCstjdtddt|S)NzWurllib.parse.splitvalue() is deprecated as of 3.8, use urllib.parse.parse_qsl() insteadrr)rrr _splitvalue)attrr!r!r" splitvalues r3cCs |d\}}}||r|ndfS)z-splitvalue('attr=value') --> 'attr', 'value'.rNr")r2rrr!r!r"r1sr1)rT)r)rT)T)rr)FFrrNN)FFrrNN)rr)rNN)rNN)r)r)r)nrErrr collectionsr__all__rrrzZnon_hierarchicalZ uses_queryZ uses_fragmentrrrrrr#Z_implicit_encodingZ_implicit_errorsr(r-r7r=rr>rGrIr\rirnZ_DefragResultBaseZ_SplitResultBaseZ_ParseResultBaserrrqr|r`rrrZ ResultBaserrrrrrrxrr{rrrrrrrrrrrrrrr RuntimeWarningrrrr r frozensetrrrr defaultdictrr r r rrrr rrrrrrrrr!r r$r%r#r)r'r+r*r-r,r0r/r3r1r!r!r!r"s!        %           ?  E   ) }  6   Q