/usr/lib64/python3.9/urllib/__pycache__
NameSizeModeActions
error.cpython-39.opt-1.pyc28260644editdlrm
error.cpython-39.opt-2.pyc21510644editdlrm
error.cpython-39.pyc28260644editdlrm
parse.cpython-39.opt-1.pyc359730644editdlrm
parse.cpython-39.opt-2.pyc252370644editdlrm
parse.cpython-39.pyc359730644editdlrm
request.cpython-39.opt-1.pyc724840644editdlrm
request.cpython-39.opt-2.pyc602170644editdlrm
request.cpython-39.pyc725770644editdlrm
response.cpython-39.opt-1.pyc34560644editdlrm
response.cpython-39.opt-2.pyc28770644editdlrm
response.cpython-39.pyc34560644editdlrm
robotparser.cpython-39.opt-1.pyc73270644editdlrm
robotparser.cpython-39.opt-2.pyc59590644editdlrm
robotparser.cpython-39.pyc73270644editdlrm
__init__.cpython-39.opt-1.pyc1300644editdlrm
__init__.cpython-39.opt-2.pyc1300644editdlrm
__init__.cpython-39.pyc1300644editdlrm
Edit: /usr/lib64/python3.9/urllib/__pycache__/parse.cpython-39.opt-1.pyc (35973B)
a ´i�­ã@sdZddlZddlZddlZddlZddlZddlZgd¢Zgd¢Zgd¢Z gd¢Z gd¢Z gd¢Z gd ¢Z d Zd Zgd ¢Zd ZiZdd„ZdZdZdd„Zeefdd„Zeefdd„Zdd„ZGdd„deƒZGdd„deƒZGdd„deƒZGd d!„d!eeƒZGd"d#„d#eeƒZdd$lm Z e d%d&ƒZ!e d'd(ƒZ"e d)d*ƒZ#d+e!_d,e!j$_d-e!j%_d.e"_d/e"j&_d0e"j'_d1e"j(_d2e"j)_d3e"j%_d4e#_e"j&je#j&_e"j'je#j'_e"j(je#j(_d5e#j*_e"j)je#j)_e"j%je#j%_eZ+Gd6d%„d%e!eƒZ,Gd7d'„d'e"eƒZ-Gd8d)„d)e#eƒZ.Gd9d:„d:e!eƒZ/Gd;d<„d„d>e#eƒZ1d?d@„Z2e2ƒ[2d¤dCdD„Z3dEdF„Z4d¥dGdH„Z5dIdJ„Z6dKdL„Z7dMdN„Z8d¦dOdP„Z9dQdR„Z:dSdT„Z;d§dUdV„Zda?dZd[„Z@e Ad\¡ZBd¨d_d`„ZCd©dcdd„ZDdªdedf„ZEd«dgdh„ZFeGdiƒZHeIeHƒZJiZKGdjdk„dkejLƒZMd¬dmdn„ZNd­dodp„ZOd®dqdr„ZPdadAddeOfdsdt„ZQdudv„ZRdwdx„ZSdydz„ZTd{d|„ZUdaVd}d~„ZWdd€„ZXdaYd�d‚„ZZdƒd„„Z[d…d†„Z\d‡dˆ„Z]d‰dŠ„Z^d‹dŒ„Z_da`d�dŽ„Zad¯d�d‘„Zbd°d’d“„Zcd”d•„Zdd–d—„Zed˜d™„Zfdšd›„Zgdœd�„ZhdždŸ„Zid d¡„Zjd¢d£„ZkdS)±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. éN)ÚurlparseÚ urlunparseÚurljoinÚ urldefragÚurlsplitÚ urlunsplitÚ urlencodeÚparse_qsÚ parse_qslÚquoteÚ quote_plusÚquote_from_bytesÚunquoteÚ unquote_plusÚunquote_to_bytesÚ DefragResultÚ ParseResultÚ SplitResultÚDefragResultBytesÚParseResultBytesÚSplitResultBytes)ÚÚftpÚhttpÚgopherÚnntpÚimapÚwaisÚfileÚhttpsÚshttpÚmmsÚprosperoÚrtspÚrtspuÚsftpÚsvnúsvn+sshÚwsÚwss)rrrrrÚtelnetrrrr!rr Úsnewsr"r#r$Úrsyncr&r'r%ÚnfsÚgitzgit+sshr(r))rrÚhdlr"rrrr r#r$ÚsipÚsipsr!r%Útel) rr/ÚmailtoÚnewsr*rrr+r0r1) rrrrrr r!rr#r$r0r1) rrr/rrr4rrrr r+rr"zAabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.z!  )ú ú Ú écCst ¡t ¡dS)z,Clear the parse cache and the quoters cache.N)Ú _parse_cacheÚclearÚ _safe_quoters©r<r<ú$/usr/lib64/python3.9/urllib/parse.pyÚ clear_cacheasr>ÚasciiÚstrictcCs|S©Nr<)Úobjr<r<r=Ú_nooppsrCcCs | ||¡SrA©Úencode)rBÚencodingÚerrorsr<r<r=Ú_encode_resultssrHcst‡‡fdd„|DƒƒS)Nc3s"|]}|r| ˆˆ¡ndVqdS)rN©Údecode©Ú.0Úx©rFrGr<r=Ú yóz_decode_args..)Útuple)ÚargsrFrGr<rNr=Ú _decode_argswsrScGsVt|dtƒ}|dd…D]}|rt|tƒ|krtdƒ‚q|rH|tfSt|ƒtfS)Nréz$Cannot mix str and non-str arguments)Ú isinstanceÚstrÚ TypeErrorrCrSrH)rRÚ str_inputÚargr<r<r=Ú _coerce_args{s  rZc@seZdZdZdZddd„ZdS) Ú_ResultMixinStrz>Standard approach to encoding parsed results from str to bytesr<r?r@cs|j‡‡fdd„|DƒŽS)Nc3s|]}| ˆˆ¡VqdSrArDrKrNr<r=rO‘rPz)_ResultMixinStr.encode..)Ú_encoded_counterpart©ÚselfrFrGr<rNr=rE�sz_ResultMixinStr.encodeN)r?r@)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú __slots__rEr<r<r<r=r[Œsr[c@seZdZdZdZddd„ZdS) Ú_ResultMixinBytesz>Standard approach to decoding parsed results from bytes to strr<r?r@cs|j‡‡fdd„|DƒŽS)Nc3s|]}| ˆˆ¡VqdSrArIrKrNr<r=rO™rPz+_ResultMixinBytes.decode..)Ú_decoded_counterpartr]r<rNr=rJ˜sz_ResultMixinBytes.decodeN)r?r@)r_r`rarbrcrJr<r<r<r=rd”srdc@sNeZdZdZdZedd„ƒZedd„ƒZedd„ƒZed d „ƒZ e e j ƒZ d S) Ú_NetlocResultMixinBasezHShared methods for the parsed result objects containing a netloc elementr<cCs |jdS)Nr©Ú _userinfo©r^r<r<r=Úusername sz_NetlocResultMixinBase.usernamecCs |jdS)NrTrgrir<r<r=Úpassword¤sz_NetlocResultMixinBase.passwordcCsD|jd}|sdSt|tƒr dnd}| |¡\}}}| ¡||S)Nrú%ó%)Ú _hostinforUrVÚ partitionÚlower)r^ÚhostnameÚ separatorÚpercentÚzoner<r<r=rq¨s  z_NetlocResultMixinBase.hostnamecCsj|jd}|durfzt|dƒ}Wn&tyFd|›�}t|ƒd‚Yn0d|kr\dksfntdƒ‚|S)NrTé z+Port could not be cast to integer value as riÿÿzPort out of range 0-65535)rnÚintÚ ValueError)r^ÚportÚmessager<r<r=rx³s   z_NetlocResultMixinBase.portN)r_r`rarbrcÚpropertyrjrkrqrxÚ classmethodÚtypesÚ GenericAliasÚ__class_getitem__r<r<r<r=rfœs    rfc@s(eZdZdZedd„ƒZedd„ƒZdS)Ú_NetlocResultMixinStrr<cCsD|j}| d¡\}}}|r4| d¡\}}}|s:///;?# The result is a named 6-tuple with fields corresponding to the above. It is either a ParseResult or ParseResultBytes object, depending on the type of the url parameter. The username, password, hostname, and port sub-components of netloc can also be accessed as attributes of the returned object. The scheme argument provides the default value of the scheme component when no scheme is found in url. If allow_fragments is False, no attempt is made to separate the fragment component from the previous component, which can be either path or query. Note that % escapes are not expanded. ú;r)rZrÚ uses_paramsÚ _splitparamsr) ršÚschemeÚallow_fragmentsÚ_coerce_resultÚ splitresultrƒÚqueryr™ÚparamsÚresultr<r<r=r}s rcCsRd|vr,| d| d¡¡}|dkr6|dfSn | d¡}|d|…||dd…fS)Nú/r¡rrrT)ÚfindÚrfind)ršÚir<r<r=r£›s   r£cCsHt|ƒ}dD]"}| ||¡}|dkr t||ƒ}q |||…||d…fS)Nz/?#r)Úlenr¬Úmin)ršÚstartÚdelimÚcÚwdelimr<r<r=Ú _splitnetloc¤s   rµcCsŠ|r | ¡rdSddl}| dd¡}| dd¡}| dd¡}| dd¡}| d|¡}||kr`dSdD] }||vrdtd |d d ƒ‚qddS) Nrr€rr�r—ú?ÚNFKCz/?#@:znetloc 'z' contains invalid z#characters under NFKC normalization)ÚisasciiÚ unicodedataÚreplaceÚ normalizerw)rƒr¹ÚnÚnetloc2r³r<r<r=Ú _checknetloc¬s       ÿr¾cCsr| d¡d}| d¡\}}}|rV|r.tdƒ‚| d¡\}}}|rf| d¡sftdƒ‚n| d¡\}}}t|ƒdS)Nr€érŠúInvalid IPv6 URLr‹r�)r„rorwÚ startswithÚ_check_bracketed_host)rƒÚhostname_and_portÚbefore_bracketrŽr�rqr�rxr<r<r=Ú_check_bracketed_netloc¾s rÅcCsB| d¡r t d|¡s>tdƒ‚nt |¡}t|tjƒr>tdƒ‚dS)NÚvz\Av[a-fA-F0-9]+\..+\ZzIPvFuture address is invalidz%An IPv4 address cannot be in brackets)rÁÚreÚmatchrwÚ ipaddressÚ ip_addressrUÚ IPv4Address)rqÚipr<r<r=rÂÑs      rÂc Csºt||ƒ\}}}| t¡}| t¡}tD]}| |d¡}| |d¡}q(t|ƒ}|||t|ƒt|ƒf}t  |d¡}|r|||ƒSt tƒt krŽt ƒd}}} |  d¡} | dkrì|d| …D]} | tvr¸qìq¸|d| … ¡|| dd…}}|dd…dk�rXt|dƒ\}}d|v�r d |v�s4d |v�r:///?# The result is a named 5-tuple with fields corresponding to the above. It is either a SplitResult or SplitResultBytes object, depending on the type of the url parameter. The username, password, hostname, and port sub-components of netloc can also be accessed as attributes of the returned object. The scheme argument provides the default value of the scheme component when no scheme is found in url. If allow_fragments is False, no attempt is made to separate the fragment component from the previous component, which can be either path or query. Note that % escapes are not expanded. rNr�rrTr¿ú//rŠr‹rÀr—r¶)rZÚlstripÚ_WHATWG_C0_CONTROL_OR_SPACEÚstripÚ_UNSAFE_URL_BYTES_TO_REMOVErºÚboolÚtyper9Úgetr¯ÚMAX_CACHE_SIZEr>r¬Ú scheme_charsrprµrwrÅÚsplitr¾r) ršr¤r¥r¦ÚbÚkeyÚcachedrƒr¨r™r®r³rÆr<r<r=rÚsL       "ÿÿ rcCs<t|Ž\}}}}}}}|r&d||f}|t|||||fƒƒS)zúPut 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)rZr)Ú componentsr¤rƒršr©r¨r™r¦r<r<r=rs ÿ rcCs˜t|Ž\}}}}}}|s4|r$|tvs4|dd…dkr`|rP|dd…dkrPd|}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).Nr¿rÍrTr«rr�r¶r—)rZÚ uses_netloc)rÛr¤rƒršr¨r™r¦r<r<r=r#sÿ    rc Cs´|s|S|s|St||ƒ\}}}t|d|ƒ\}}}}}} t|||ƒ\} } } } }}| |ks`| tvrh||ƒS| tvr�| rŒ|t| | | | ||fƒƒS|} | sÀ| sÀ|} |} |s¨|}|t| | | | ||fƒƒS| d¡}|ddkrÜ|d=| dd…dkrø|  d¡}n(||  d¡}td|dd…ƒ|dd…<g}|D]N}|dk�rZz | ¡Wnt�yVYn0n|dk�rj�q(n |  |¡�q(|ddv�r�|  d¡|t| | d  |¡�p¦d| ||fƒƒS) zaJoin a base URL and a possibly relative URL to form an absolute interpretation of the latter.rr«éÿÿÿÿNrTú..Ú.)rßrÞ) rZrÚ uses_relativerÜrr×ÚfilterÚpopÚ IndexErrorÚappendÚjoin)Úbaseršr¥r¦ÚbschemeÚbnetlocÚbpathÚbparamsÚbqueryÚ bfragmentr¤rƒÚpathr©r¨r™Ú base_partsÚsegmentsÚ resolved_pathÚsegr<r<r=r6sb ÿ ÿ ÿ ÿ        ÿÿrc CsTt|ƒ\}}d|vr>t|ƒ\}}}}}}t|||||dfƒ}nd}|}|t||ƒƒS)z¿Removes 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)rZrrr) ršr¦Úsr¼ÚpÚaÚqÚfragÚdefragr<r<r=r{s rÚ0123456789ABCDEFabcdefc CsÊ|s|jdSt|tƒr"| d¡}| d¡}t|ƒdkr<|S|dg}|j}tdurbdd„tDƒa|dd…D]P}z(|t|dd …ƒ||d d…ƒWqnty¼|dƒ||ƒYqn0qnd  |¡S) z,unquote_to_bytes('abc%20def') -> b'abc def'.rPúutf-8rmrTrNcSs.i|]&}tD]}|| ¡t ||¡“q qSr<)Ú_hexdigrEÚbytesÚfromhex)rLrôrØr<r<r=Ú ¡s ÿz$unquote_to_bytes..r¿) r×rUrVrEr¯räÚ _hextobyterúÚKeyErrorrå)ÚstringÚbitsÚresräÚitemr<r<r=rŽs,     ÿ rz([-]+)rùrºcCs¦t|tƒrt|ƒ ||¡Sd|vr,|j|S|dur8d}|durDd}t |¡}|dg}|j}tdt|ƒdƒD],}|t||ƒ ||¡ƒ|||dƒqnd  |¡S) a–Replace %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'. rlNrùrºrrTr¿r) rUrûrrJr×Ú_asciireräÚranger¯rå)rrFrGrrrär®r<r<r=r®s   rFú&c CsNi}t|||||||d�}|D]*\} } | |vr>||  | ¡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. )rFrGÚmax_num_fieldsrr)r rä) ÚqsÚkeep_blank_valuesÚstrict_parsingrFrGrrrÚ parsed_resultÚpairsÚnameÚvaluer<r<r=r Êsþ  r cCs.t|ƒ\}}t|ƒ\}}|r*t|ttfƒs2tdƒ‚|durXd| |¡} || krXtdƒ‚dd„| |¡Dƒ} g} | D]´} | s‚|s‚qt|  dd¡} t| ƒdkr¾|r¬td | fƒ‚|rt|  d ¡nqtt| dƒsÎ|rt| d   d d ¡}t |||d�}||ƒ}| d  d d ¡}t |||d�}||ƒ}|  ||f¡qt| 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. z*Separator must be of type string or bytes.NrTzMax number of fields exceededcSsg|]}|‘qSr<r<)rLÚs1r<r<r=Ú rPzparse_qsl..ú=r¿zbad query field: %rrrú+ú rN) rZrUrVrûrwÚcountr×r¯rärºr)rr r rFrGrrrr¦r�Ú num_fieldsr ÚrÚ name_valueÚnvr rr<r<r=r ôs:     r cCs| dd¡}t|||ƒS)z›Like 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)rrFrGr<r<r=r7s rsBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-~c@s(eZdZdZdd„Zdd„Zdd„ZdS) ÚQuoterzÌA 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_SAFEÚunionÚsafe)r^rr<r<r=Ú__init__OszQuoter.__init__cCsd|jjt|ƒfS)Nz<%s %r>)Ú __class__r_Údictrir<r<r=Ú__repr__SszQuoter.__repr__cCs(||jvrt|ƒnd |¡}|||<|S)Nz%{:02X})rÚchrÚformat)r^rØrr<r<r=Ú __missing__WszQuoter.__missing__N)r_r`rarbrr r#r<r<r<r=rGsrr«cCsbt|tƒr8|s|S|durd}|dur*d}| ||¡}n |durHtdƒ‚|durXtdƒ‚t||ƒS)a•quote('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). Nrùr@z,quote() doesn't support 'encoding' for bytesz*quote() doesn't support 'errors' for bytes)rUrVrErWr )rrrFrGr<r<r=r ]s' r cCsdt|tƒrd|vs$t|tƒr2d|vr2t||||ƒSt|tƒrBd}nd}t|||||ƒ}| dd¡S)zÞLike 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)rUrVrûr rº)rrrFrGÚspacer<r<r=r “sÿÿ r cs¨t|ttfƒstdƒ‚|sdSt|tƒr6| dd¡}ntdd„|Dƒƒ}| t|¡s^| ¡Sz t |‰Wn$t yŽt |ƒj t |<‰Yn0d  ‡fdd„|Dƒ¡S)zËLike 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<)rLr³r<r<r=r±rPz$quote_from_bytes..csg|] }ˆ|ƒ‘qSr<r<)rLÚchar©Úquoterr<r=r¸rP)rUrûÚ bytearrayrWrVrEÚrstripÚ_ALWAYS_SAFE_BYTESrJr;rÿrÚ __getitem__rå)Úbsrr<r)r=r ¤s   r c Cst|dƒr| ¡}nNzt|ƒr0t|dtƒs0t‚Wn.ty`t ¡\}}}tdƒ |¡‚Yn0g} |sÞ|D]j\} } t| t ƒrŒ|| |ƒ} n|t | ƒ|||ƒ} t| t ƒr´|| |ƒ} n|t | ƒ|||ƒ} |   | d| ¡qn�n |D�]\} } t| t ƒ�r|| |ƒ} n|t | ƒ|||ƒ} t| t ƒ�r@|| |ƒ} |   | d| ¡qât| t ƒ�rn|| |||ƒ} |   | d| ¡qâz t| ƒ} Wn8t�y²|t | ƒ|||ƒ} |   | d| ¡Yqâ0| D]B} t| t ƒ�rÔ|| |ƒ} n|t | ƒ|||ƒ} |   | d| ¡�q¸qâd  | ¡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) Úhasattrr0r¯rUrQrWÚsysÚexc_infoÚwith_tracebackrûrVrärå)r¨ÚdoseqrrFrGÚ quote_viaÚtyÚvaÚtbÚlÚkrÆrMÚeltr<r<r=rºsR   ÿ              rcCstjdtdd�t|ƒS)Nz/urllib.parse.to_bytes() is deprecated as of 3.8r¿©Ú stacklevel)ÚwarningsÚwarnÚDeprecationWarningÚ _to_bytes©ršr<r<r=Úto_bytes sÿrDcCsHt|tƒrDz| d¡ ¡}Wn&tyBtdt|ƒdƒ‚Yn0|S)zto_bytes(u"URL") --> 'URL'.ÚASCIIzURL z contains non-ASCII characters)rUrVrErJÚ UnicodeErrorÚreprrCr<r<r=rBs   ÿ rBcCs`t|ƒ ¡}|dd…dkr<|dd…dkr<|dd… ¡}|dd…dkr\|dd… ¡}|S)z“Transform a string like '' into 'scheme://host/path'. The string is returned unchanged if it's not a wrapped URL. NrTúézURL:)rVrÐrCr<r<r=Úunwraps   rKcCstjdtdd�t|ƒS)NzUurllib.parse.splittype() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr¿r=)r?r@rAÚ _splittyperCr<r<r=Ú splittype,sþrMcCsDtdurt dtj¡at |¡}|r<| ¡\}}| ¡|fSd|fS)z:splittype('type:opaquestring') --> 'type', 'opaquestring'.Nz ([^/:]+):(.*))Ú _typeprogrÇÚcompileÚDOTALLrÈÚgroupsrp)ršrÈr¤Údatar<r<r=rL4s   rLcCstjdtdd�t|ƒS)NzUurllib.parse.splithost() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr¿r=)r?r@rAÚ _splithostrCr<r<r=Ú splithostAsþrTcCsXtdurt dtj¡at |¡}|rP| ¡\}}|rH|ddkrHd|}||fSd|fS)z;splithost('//host[:port]/path') --> 'host[:port]', '/path'.Nz//([^/#?]*)(.*)rr«)Ú _hostprogrÇrOrPrÈrQ)ršrÈÚ host_portrír<r<r=rSIs  rScCstjdtdd�t|ƒS)NzUurllib.parse.splituser() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr¿r=)r?r@rAÚ _splituser©Úhostr<r<r=Ú splituserXsþrZcCs | d¡\}}}|r|nd|fS)zJsplituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.r€N©r„)rYÚuserr²r<r<r=rW_srWcCstjdtdd�t|ƒS)NzWurllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr¿r=)r?r@rAÚ _splitpasswd)r\r<r<r=Ú splitpasswdesþr^cCs | d¡\}}}||r|ndfS)z/splitpasswd('user:passwd') -> 'user', 'passwd'.r�N©ro)r\r²Úpasswdr<r<r=r]lsr]cCstjdtdd�t|ƒS)NzUurllib.parse.splitport() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr¿r=)r?r@rAÚ _splitportrXr<r<r=Ú splitportrsþrbcCsDtdurt dtj¡at |¡}|r<| ¡\}}|r<||fS|dfS)z*splitport('host:port') --> 'host', 'port'.Nz (.*):([0-9]*))Ú _portprogrÇrOrPÚ fullmatchrQ)rYrÈrxr<r<r=ra{s  rarÝcCstjdtdd�t||ƒS)NzVurllib.parse.splitnport() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr¿r=)r?r@rAÚ _splitnport)rYÚdefportr<r<r=Ú splitnport‰sþrgcCsR| d¡\}}}|s|}n0|rJz t|ƒ}Wnty@d}Yn0||fS||fS)zÛSplit 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)r„rvrw)rYrfr²rxÚnportr<r<r=re�s   recCstjdtdd�t|ƒS)NzVurllib.parse.splitquery() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr¿r=)r?r@rAÚ _splitqueryrCr<r<r=Ú splitquery¡sþrjcCs$| d¡\}}}|r||fS|dfS)z/splitquery('/path?query') --> '/path', 'query'.r¶Nr[)ršrír²r¨r<r<r=ri¨sricCstjdtdd�t|ƒS)NzTurllib.parse.splittag() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr¿r=)r?r@rAÚ _splittagrCr<r<r=Úsplittag°sþrlcCs$| d¡\}}}|r||fS|dfS)z)splittag('/path#tag') --> '/path', 'tag'.r—Nr[)ršrír²Útagr<r<r=rk·srkcCstjdtdd�t|ƒS)NzUurllib.parse.splitattr() is deprecated as of 3.8, use urllib.parse.urlparse() insteadr¿r=)r?r@rAÚ _splitattrrCr<r<r=Ú splitattr¿sþrocCs| d¡}|d|dd…fS)zksplitattr('/path;attr1=value1;attr2=value2;...') -> '/path', ['attr1=value1', 'attr2=value2', ...].r¡rrTN)r×)ršÚwordsr<r<r=rnÆs rncCstjdtdd�t|ƒS)NzWurllib.parse.splitvalue() is deprecated as of 3.8, use urllib.parse.parse_qsl() insteadr¿r=)r?r@rAÚ _splitvalue)Úattrr<r<r=Ú splitvalueÍsþrscCs | d¡\}}}||r|ndfS)z-splitvalue('attr=value') --> 'attr', 'value'.rNr_)rrr²rr<r<r=rqÔsrq)rT)r)rT)T)rùrº)FFrùrºNr)FFrùrºNr)rùrº)r«NN)rNN)r«)rÝ)rÝ)lrbrÇr2r|Ú collectionsr?rÉÚ__all__ràrÜr¢Únon_hierarchicalÚ uses_queryÚ uses_fragmentrÖrÏrÑrÕr9r>Ú_implicit_encodingÚ_implicit_errorsrCrHrSrZÚobjectr[rdrfrr‘r–Ú_DefragResultBaseÚ_SplitResultBaseÚ_ParseResultBaseršr™r¤rƒrír¨r©Ú ResultBaserrrrrrr rr£rµr¾rÅrÂrrrrrrúrþrrOrrr r rÚ frozensetrrûr-r;Ú defaultdictrr r r rrDrBrKrMrNrLrTrUrSrZrWr^r]rbrcrargrerjrirlrkrornrsrqr<r<r<r=Úsþ!  ÿ ÿ '  ÿÿ         >  E  ÿ *ÿ C  6  ÿ Q