File "parse.cpython-39.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python39/lib64/python3.9/urllib/__pycache__/parse.cpython-39.pyc
File size: 35.14 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

a

XC?h@sdZddlZddlZddlZddlZddlZddlZgdZgdZgdZ	gdZ
gdZgdZgd	Z
d
ZdZgdZd
ZiZddZdZdZddZeefddZeefddZddZGdddeZGdddeZGdddeZGd d!d!eeZGd"d#d#eeZdd$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!eZ,Gd7d'd'e"eZ-Gd8d)d)e#eZ.Gd9d:d:e!eZ/Gd;d<d<e"eZ0Gd=d>d>e#eZ1d?d@Z2e2[2ddCdDZ3dEdFZ4ddGdHZ5dIdJZ6dKdLZ7dMdNZ8ddOdPZ9dQdRZ:dSdTZ;ddUdVZ<dWdXZ=dYZ>da?dZd[Z@eAd\ZBdd_d`ZCddcddZDddedfZEddgdhZFeGdiZHeIeHZJiZKGdjdkdkejLZMddmdnZNddodpZOddqdrZPdadAddeOfdsdtZQdudvZRdwdxZSdydzZTd{d|ZUdaVd}d~ZWddZXdaYddZZddZ[ddZ\ddZ]ddZ^ddZ_da`ddZadddZbdddZcddZdddZeddZfddZgddZhddZiddZjddZkdS)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
urlunparseurljoin	urldefragurlsplit
urlunsplit	urlencodeparse_qs	parse_qslquote
quote_plusquote_from_bytesunquoteunquote_plusunquote_to_bytesDefragResultParseResultSplitResultDefragResultBytesParseResultBytesSplitResultBytes)ftphttpgophernntpimapwaisfilehttpsshttpmmsprosperortsprtspusftpsvnsvn+sshwswss)rrrrrtelnetrrrr!rr snewsr"r#r$Zrsyncr&r'r%ZnfsZgitzgit+sshr(r))rrhdlr"rrrr r#r$sipsipsr!r%Ztel)
rr,Zmailtonewsr*rrr+r-r.)rrrrrr r!rr#r$r-r.)
rrr,rrr/rrrr r+rr"zAabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.z!	

 )	

cCsttdS)z,Clear the parse cache and the quoters cache.N)_parse_cacheclear
_safe_quotersr7r71/opt/alt/python39/lib64/python3.9/urllib/parse.pyclear_cacheasr9asciistrictcCs|SNr7)objr7r7r8_nooppsr>cCs|||Sr<encode)r=encodingerrorsr7r7r8_encode_resultssrCcstfdd|DS)Nc3s"|]}|r|ndVqdS)rNdecode.0xrArBr7r8	<genexpr>yz_decode_args.<locals>.<genexpr>)tuple)argsrArBr7rIr8_decode_argswsrNcGsVt|dt}|ddD]}|rt|t|krtdq|rH|tfSt|tfS)Nrz$Cannot mix str and non-str arguments)
isinstancestr	TypeErrorr>rNrC)rMZ	str_inputargr7r7r8_coerce_args{s

rTc@seZdZdZdZdddZdS)	_ResultMixinStrz>Standard approach to encoding parsed results from str to bytesr7r:r;cs|jfdd|DS)Nc3s|]}|VqdSr<r?rFrIr7r8rJrKz)_ResultMixinStr.encode.<locals>.<genexpr>)_encoded_counterpartselfrArBr7rIr8r@sz_ResultMixinStr.encodeN)r:r;)__name__
__module____qualname____doc__	__slots__r@r7r7r7r8rUsrUc@seZdZdZdZdddZdS)	_ResultMixinBytesz>Standard approach to decoding parsed results from bytes to strr7r:r;cs|jfdd|DS)Nc3s|]}|VqdSr<rDrFrIr7r8rJrKz+_ResultMixinBytes.decode.<locals>.<genexpr>)_decoded_counterpartrWr7rIr8rEsz_ResultMixinBytes.decodeN)r:r;)rYrZr[r\r]rEr7r7r7r8r^sr^c@sNeZdZdZdZeddZeddZeddZed	d
Z	e
ejZ
dS)_NetlocResultMixinBasezHShared methods for the parsed result objects containing a netloc elementr7cCs
|jdS)Nr	_userinforXr7r7r8usernamesz_NetlocResultMixinBase.usernamecCs
|jdS)NrOrarcr7r7r8passwordsz_NetlocResultMixinBase.passwordcCsD|jd}|sdSt|tr dnd}||\}}}|||S)Nr%%)	_hostinforPrQ	partitionlower)rXhostname	separatorZpercentZzoner7r7r8rks
z_NetlocResultMixinBase.hostnamecCsj|jd}|durfzt|d}Wn&tyFd|}t|dYn0d|kr\dksfntd|S)NrO
z+Port could not be cast to integer value as rizPort out of range 0-65535)rhint
ValueError)rXportmessager7r7r8rps

z_NetlocResultMixinBase.portN)rYrZr[r\r]propertyrdrerkrpclassmethodtypesGenericAlias__class_getitem__r7r7r7r8r`s




r`c@s(eZdZdZeddZeddZdS)_NetlocResultMixinStrr7cCsD|j}|d\}}}|r4|d\}}}|s<d}nd}}||fS)N@:netloc
rpartitionrirXr{ZuserinfoZ	have_infohostinfordZ
have_passwordrer7r7r8rbsz_NetlocResultMixinStr._userinfocCsl|j}|d\}}}|d\}}}|rL|d\}}}|d\}}}n|d\}}}|sdd}||fS)Nrx[]ryrzrXr{_r~have_open_br	bracketedrkrpr7r7r8rhsz_NetlocResultMixinStr._hostinfoNrYrZr[r]rrrbrhr7r7r7r8rws

rwc@s(eZdZdZeddZeddZdS)_NetlocResultMixinBytesr7cCsD|j}|d\}}}|r4|d\}}}|s<d}nd}}||fS)N@:rzr}r7r7r8rbsz!_NetlocResultMixinBytes._userinfocCsl|j}|d\}}}|d\}}}|rL|d\}}}|d\}}}n|d\}}}|sdd}||fS)Nr[]rrzrr7r7r8rhsz!_NetlocResultMixinBytes._hostinfoNrr7r7r7r8rs

r)
namedtuplerzurl fragmentrz!scheme netloc path query fragmentrz(scheme netloc path params query fragmentz
DefragResult(url, fragment)

A 2-tuple that contains the url without fragment identifier and the fragment
identifier as a separate argument.
z$The URL with no fragment identifier.z
Fragment identifier separated from URL, that allows indirect identification of a
secondary resource by reference to a primary resource and additional identifying
information.
z
SplitResult(scheme, netloc, path, query, fragment)

A 5-tuple that contains the different components of a URL. Similar to
ParseResult, but does not split params.
z%Specifies URL scheme for the request.z0
Network location where the request is made to.
z@
The hierarchical path, such as the path to a file to download.
z
The query component, that contains non-hierarchical data, that along with data
in path component, identifies a resource in the scope of URI's scheme and
network location.
z
Fragment identifier, that allows indirect identification of a secondary resource
by reference to a primary resource and additional identifying information.
zq
ParseResult(scheme, netloc, path, params, query, fragment)

A 6-tuple that contains components of a parsed URL.
z
Parameters for last path element used to dereference the URI in order to provide
access to perform some operation on the resource.
c@seZdZdZddZdS)rr7cCs |jr|jd|jS|jSdS)N#fragmenturlrcr7r7r8geturlLszDefragResult.geturlNrYrZr[r]rr7r7r7r8rJsc@seZdZdZddZdS)rr7cCst|Sr<rrcr7r7r8rTszSplitResult.geturlNrr7r7r7r8rRsc@seZdZdZddZdS)rr7cCst|Sr<rrcr7r7r8rYszParseResult.geturlNrr7r7r7r8rWsc@seZdZdZddZdS)rr7cCs |jr|jd|jS|jSdS)N#rrcr7r7r8r_szDefragResultBytes.geturlNrr7r7r7r8r]src@seZdZdZddZdS)rr7cCst|Sr<rrcr7r7r8rgszSplitResultBytes.geturlNrr7r7r7r8resrc@seZdZdZddZdS)rr7cCst|Sr<rrcr7r7r8rlszParseResultBytes.geturlNrr7r7r7r8rjsrcCs4ttfttfttff}|D]\}}||_||_qdSr<)rrrrrrrVr_)Z
_result_pairsZ_decodedZ_encodedr7r7r8_fix_result_transcodingpsrrTc
Csft||\}}}t|||}|\}}}}}|tvrHd|vrHt|\}}nd}t||||||}	||	S)aParse a URL into 6 components:
    <scheme>://<netloc>/<path>;<params>?<query>#<fragment>

    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)rTruses_params_splitparamsr)
rschemeallow_fragments_coerce_resultZsplitresultr{queryrparamsresultr7r7r8r}srcCsRd|vr,|d|d}|dkr6|dfSn
|d}|d|||ddfS)N/rrrrO)findrfind)rir7r7r8rs

rcCsHt|}dD]"}|||}|dkrt||}q|||||dfS)Nz/?#r)lenrmin)rstartdelimcZwdelimr7r7r8_splitnetlocsrcCs|r|rdSddl}|dd}|dd}|dd}|dd}|d|}||kr`dSdD] }||vrdtd	|d
dqddS)Nrrxrryr?ZNFKCz/?#@:znetloc 'z' contains invalid z#characters under NFKC normalization)isasciiunicodedatareplaceZ	normalizero)r{rnZnetloc2rr7r7r8_checknetlocsrcCsr|dd}|d\}}}|rV|r.td|d\}}}|rf|dsftdn|d\}}}t|dS)NrxrInvalid IPv6 URLrry)r|riro
startswith_check_bracketed_host)r{Zhostname_and_portZbefore_bracketrrrkrrpr7r7r8_check_bracketed_netlocs
rcCsB|dr td|s>tdnt|}t|tjr>tddS)Nvz\Av[a-fA-F0-9]+\..+\ZzIPvFuture address is invalidz%An IPv4 address cannot be in brackets)rrematchro	ipaddressZ
ip_addressrPZIPv4Address)rkZipr7r7r8rs


rc
Cst||\}}}|t}|t}tD]}||d}||d}q(t|}|||t|t|f}t	|d}|r|||St
ttkrtd}}}	|
d}
|
dkr|d|
D]}|tvrqq|d|
||
dd}}|dddkrXt|d\}}d|vr d	|vs4d	|vr<d|vr<td
d|vrXd	|vrXt||rxd|vrx|dd\}}	d|vr|dd\}}t|t|||||	}|t|<||S)
aParse a URL into 5 components:
    <scheme>://<netloc>/<path>?<query>#<fragment>

    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.
    rNryrrOr//rrrrr)rTlstrip_WHATWG_C0_CONTROL_OR_SPACEstrip_UNSAFE_URL_BYTES_TO_REMOVErbooltyper4getrMAX_CACHE_SIZEr9rscheme_charsrjrrorsplitrr)
rrrrbkeycachedr{rrrrrr7r7r8rsL


"
rcCs<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)rTr)
componentsrr{rrrrrr7r7r8rs
rcCst|\}}}}}}|s4|r$|tvs4|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).NrrrOrrryrr)rTuses_netloc)rrr{rrrrr7r7r8r#s rc	Cs|s|S|s|St||\}}}t|d|\}}}}}}	t|||\}
}}}
}}|
|ks`|
tvrh||S|
tvr|r|t|
|||
||fS|}|s|
s|}|}
|s|}|t|
|||
||fS|d}|ddkr|d=|dddkr|d}n(||d}td|dd|dd<g}|D]N}|dkrZz|WntyVYn0n|dkrjq(n
|	|q(|ddvr|	d|t|
|d
|pd|
||fS)	zaJoin a base URL and a possibly relative URL to form an absolute
    interpretation of the latter.rrNrO...)rr)rTr
uses_relativerrrfilterpop
IndexErrorappendjoin)baserrrZbschemeZbnetlocZbpathZbparamsZbqueryZ	bfragmentrr{pathrrrZ
base_partsZsegmentsZ
resolved_pathZsegr7r7r8r6sb







rc	CsTt|\}}d|vr>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.
    rr)rTrrr)	rrsrpaqZfragZdefragr7r7r8r{srZ0123456789ABCDEFabcdefc	Cs|s|jdSt|tr"|d}|d}t|dkr<|S|dg}|j}tdurbddtDa|ddD]P}z(|t|dd	||d	dWqnty|d||Yqn0qnd	|S)
z,unquote_to_bytes('abc%20def') -> b'abc def'.rKutf-8rgrOrNcSs.i|]&}tD]}||t||qqSr7)_hexdigr@bytesfromhex)rGrrr7r7r8
<dictcomp>s
z$unquote_to_bytes.<locals>.<dictcomp>r)
rrPrQr@rr
_hextobyterKeyErrorr)stringbitsresritemr7r7r8rs,



rz([-]+)rrcCst|trt|||Sd|vr,|j|S|dur8d}|durDd}t|}|dg}|j}tdt|dD],}|t|||||||dqnd	|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'.
    rfNrrrrOrr)
rPrrrEr_asciirerrangerr)rrArBrrrrr7r7r8rs 



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.
    )rArBmax_num_fieldsrl)r
r)qskeep_blank_valuesstrict_parsingrArBrrlZ
parsed_resultpairsnamevaluer7r7r8r	sr	cCs.t|\}}t|\}}|r*t|ttfs2td|durXd||}	||	krXtddd||D}
g}|
D]}|s|sqt|dd}
t|
dkr|rtd	|f|rt|
d
nqtt|
ds|rt|
d	dd
}t
|||d}||}|
d	dd
}t
|||d}||}|||fqt|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.NrOzMax number of fields exceededcSsg|]}|qSr7r7)rGs1r7r7r8
<listcomp>rKzparse_qsl.<locals>.<listcomp>=rzbad query field: %rrr+ rI)rTrPrQrrocountrrrrr)rrrrArBrrlrr
num_fieldsrrZ
name_valueZnvrrr7r7r8r
s:r
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)rrArBr7r7r8r7srsBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-~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)rXrr7r7r8__init__OszQuoter.__init__cCsd|jjt|fS)Nz<%s %r>)	__class__rYdictrcr7r7r8__repr__SszQuoter.__repr__cCs(||jvrt|nd|}|||<|S)Nz%{:02X})rchrformat)rXrrr7r7r8__missing__WszQuoter.__missing__N)rYrZr[r\rrrr7r7r7r8rGsrrcCsbt|tr8|s|S|durd}|dur*d}|||}n |durHtd|durXtdt||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)rPrQr@rRr
)rrrArBr7r7r8r]s'
rcCsdt|trd|vs$t|tr2d|vr2t||||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)rPrQrrr)rrrArBZspacer7r7r8rs
rcst|ttfstd|sdSt|tr6|dd}ntdd|D}|t|s^|Szt	|Wn$t
yt|jt	|<Yn0d
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)r7)rGrr7r7r8rrKz$quote_from_bytes.<locals>.<listcomp>csg|]}|qSr7r7)rGcharZquoterr7r8rrK)rPr	bytearrayrRrQr@rstrip_ALWAYS_SAFE_BYTESrEr6rr__getitem__r)Zbsrr7rr8r
s
r
c	Cst|dr|}nNzt|r0t|dts0tWn.ty`t\}}}td|Yn0g}	|s|D]j\}
}t|
t	r||
|}
n|t
|
|||}
t|t	r|||}n|t
||||}|	|
d|qnn |D]\}
}t|
t	r||
|}
n|t
|
|||}
t|t	r@|||}|	|
d|qt|t
rn|||||}|	|
d|qzt|}Wn8ty|t
||||}|	|
d|Yq0|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)
hasattrrrrPrLrRsysexc_infowith_tracebackrrQrr)rZdoseqrrArBZ	quote_viaZtyZvatblkrrHeltr7r7r8rsR





rcCstjdtddt|S)Nz/urllib.parse.to_bytes() is deprecated as of 3.8r
stacklevel)warningswarnDeprecationWarning	_to_bytesrr7r7r8to_bytessrcCsHt|trDz|d}Wn&tyBtdt|dYn0|S)zto_bytes(u"URL") --> 'URL'.ASCIIzURL z contains non-ASCII characters)rPrQr@rEUnicodeErrorreprrr7r7r8rs
rcCs`t|}|dddkr<|dddkr<|dd}|dddkr\|dd}|S)zTransform a string like '<URL:scheme://host/path>' into 'scheme://host/path'.

    The string is returned unchanged if it's not a wrapped URL.
    NrO<r>zURL:)rQrrr7r7r8unwraps rcCstjdtddt|S)NzUurllib.parse.splittype() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr
_splittyperr7r7r8	splittype,sr!cCsDtdurtdtjat|}|r<|\}}||fSd|fS)z:splittype('type:opaquestring') --> 'type', 'opaquestring'.Nz
([^/:]+):(.*))	_typeprogrcompileDOTALLrgroupsrj)rrrdatar7r7r8r 4s
r cCstjdtddt|S)NzUurllib.parse.splithost() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr
_splithostrr7r7r8	splithostAsr(cCsXtdurtdtjat|}|rP|\}}|rH|ddkrHd|}||fSd|fS)z;splithost('//host[:port]/path') --> 'host[:port]', '/path'.Nz//([^/#?]*)(.*)rr)	_hostprogrr#r$rr%)rrZ	host_portrr7r7r8r'Is
r'cCstjdtddt|S)NzUurllib.parse.splituser() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr
_splituserhostr7r7r8	splituserXsr-cCs |d\}}}|r|nd|fS)zJsplituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.rxNr|)r,userrr7r7r8r*_sr*cCstjdtddt|S)NzWurllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr_splitpasswd)r/r7r7r8splitpasswdesr1cCs |d\}}}||r|ndfS)z/splitpasswd('user:passwd') -> 'user', 'passwd'.ryNri)r/rZpasswdr7r7r8r0lsr0cCstjdtddt|S)NzUurllib.parse.splitport() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr
_splitportr+r7r7r8	splitportrsr4cCsDtdurtdtjat|}|r<|\}}|r<||fS|dfS)z*splitport('host:port') --> 'host', 'port'.Nz
(.*):([0-9]*))	_portprogrr#r$	fullmatchr%)r,rrpr7r7r8r3{s
r3rcCstjdtddt||S)NzVurllib.parse.splitnport() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr_splitnport)r,defportr7r7r8
splitnportsr9cCsR|d\}}}|s|}n0|rJzt|}Wnty@d}Yn0||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.ryN)r|rnro)r,r8rrpZnportr7r7r8r7s
r7cCstjdtddt|S)NzVurllib.parse.splitquery() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr_splitqueryrr7r7r8
splitquerysr;cCs$|d\}}}|r||fS|dfS)z/splitquery('/path?query') --> '/path', 'query'.rNr.)rrrrr7r7r8r:sr:cCstjdtddt|S)NzTurllib.parse.splittag() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr	_splittagrr7r7r8splittagsr=cCs$|d\}}}|r||fS|dfS)z)splittag('/path#tag') --> '/path', 'tag'.rNr.)rrrtagr7r7r8r<sr<cCstjdtddt|S)NzUurllib.parse.splitattr() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrr)rrr
_splitattrrr7r7r8	splitattrsr@cCs|d}|d|ddfS)zksplitattr('/path;attr1=value1;attr2=value2;...') ->
        '/path', ['attr1=value1', 'attr2=value2', ...].rrrON)r)rZwordsr7r7r8r?s
r?cCstjdtddt|S)NzWurllib.parse.splitvalue() is deprecated as of 3.8, use urllib.parse.parse_qsl() insteadrr)rrr_splitvalue)attrr7r7r8
splitvaluesrCcCs |d\}}}||r|ndfS)z-splitvalue('attr=value') --> 'attr', 'value'.rNr2)rBrrr7r7r8rAsrA)rT)r)rT)T)rr)FFrrNr)FFrrNr)rr)rNN)rNN)r)r)r)lr\rr
rtcollectionsrr__all__rrrZnon_hierarchicalZ
uses_queryZ
uses_fragmentrrrrr4r9Z_implicit_encodingZ_implicit_errorsr>rCrNrTobjectrUr^r`rwrrZ_DefragResultBaseZ_SplitResultBaseZ_ParseResultBaserrrr{rrrZ
ResultBaserrrrrrrrrrrrrrrrrrrrrr#rrr	r
r	frozensetrrrr6defaultdictrrrr
rrrrr!r"r r(r)r'r-r*r1r0r4r5r3r9r7r;r:r=r<r@r?rCrAr7r7r7r8<module>s!

'


	
	
>
E


*
C
	
6


Q