python (3.12.0)

(root)/
lib/
python3.12/
lib2to3/
fixes/
__pycache__/
fix_urllib.cpython-312.pyc

̑e dZddlmZmZddlmZmZmZmZm	Z	m
Z
mZdgdfdgdfdd	gfgdgd
fdddgfgd
ZedjedddZGddeZy)zFix changes imports of urllib which are now incompatible.
   This is rather similar to fix_imports, but because of the more
   complex nature of the fixing for urllib, it has its own fixer.
)
alternates
FixImports)NameComma
FromImportNewlinefind_indentationNodesymszurllib.request)		URLopenerFancyURLopenerurlretrieve
_urlopenerurlopen
urlcleanuppathname2urlurl2pathname
getproxieszurllib.parse)quote
quote_plusunquoteunquote_plus	urlencode	splitattr	splithost
splitnportsplitpasswd	splitport
splitquerysplittag	splittype	splituser
splitvaluezurllib.errorContentTooShortError)rinstall_openerbuild_openerRequestOpenerDirectorBaseHandlerHTTPDefaultErrorHandlerHTTPRedirectHandlerHTTPCookieProcessorProxyHandlerHTTPPasswordMgrHTTPPasswordMgrWithDefaultRealmAbstractBasicAuthHandlerHTTPBasicAuthHandlerProxyBasicAuthHandlerAbstractDigestAuthHandlerHTTPDigestAuthHandlerProxyDigestAuthHandlerHTTPHandlerHTTPSHandlerFileHandler
FTPHandlerCacheFTPHandlerUnknownHandlerURLError	HTTPError)urlliburllib2r?r>c	#Kt}tjD]N\}}|D]D}|\}}t|}d|d|dd|d|d|dd|zd	|zd
|d|dFPyw)
Nzimport_name< 'import' (module=zB
                                  | dotted_as_names< any* module=z any* >) >
                  zimport_from< 'from' mod_member=z* 'import'
                       ( member=z | import_as_name< member=z] 'as' any > |
                         import_as_names< members=any*  >) >
                  zIimport_from< 'from' module_star=%r 'import' star='*' >
                  ztimport_name< 'import'
                                  dotted_as_name< module_as=%r 'as' any > >
                  zpower< bare_with_attr=z trailer< '.' member=z > any* >
                  )setMAPPINGitemsr)bare
old_modulechangeschange
new_modulememberss      L/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/lib2to3/fixes/fix_urllib.py
build_patternrL0s5D&}}.
G	.F"(J )G$Z1
1$Wg7
7"#
#"#
#
$W.
.!	..sA1A3c*eZdZdZdZdZdZdZy)	FixUrllibc4djtS)N|)joinrL)selfs rKrLzFixUrllib.build_patternIsxx
((cR|jd}|j}g}t|jddD]+}|j	t|d|t
g-|jtt|jdd||j|y)zTransform for the basic import case. Replaces the old
           import name with a comma separated list of its
           replacements.
        moduleNrprefix)	getrXrCvalueextendrrappendreplace)rRnoderesults
import_modprefnamesnames       rKtransform_importzFixUrllib.transform_importLs
[[*
  J,,-cr2	@DLL$tAwt4eg>?	@
T'*"2"23B7:4HI5!rScD|jd}|j}|jd}|ryt|tr|d}d}t|j
D]}|j
|dvs|d}n|r|j
t||y|j|dyg}i}	|d}
|
D]}|jtjk(r3|jd	j
}|jdj
}n|j
}d}|d
k7sgt|j
D]I}||dvs|d|	vr|j|d|	j|dgj|Kg}
t|}d}d}|D]}|	|}g}|dd
D]3}|j!||||jt#5|j!||d
|t%||}|r%|j&jj)|r||_|
j|d}|
rMg}|
dd
D]}|j!|t+g|j|
d
|j
|y|j|dy)zTransform for imports of specific module elements. Replaces
           the module to be imported from with the appropriate new
           module.
        
mod_membermemberrNr@rW!This is an invalid module elementrJ,Tc\|jtjk(rxt|jdj
||jdj
|jdj
g}ttj|gSt|j
|gS)NrrWr@ri)typerimport_as_namerchildrenrZcloner
)rcrXkidss   rKhandle_namez/FixUrllib.transform_member.<locals>.handle_names99 3 33 q!1!7!7G MM!,224 MM!,2246D!!4!4d;<<TZZ788rSrVFzAll module elements are invalid)rYrX
isinstancelistrCrZr]rcannot_convertrlrrmrnr\
setdefaultr	r[rrparentendswithr)rRr^r_rfrargnew_namerHmodulesmod_dictrJas_namemember_name	new_nodesindentationfirstrqrUeltsrbeltnewnodesnew_nodes                        rKtransform_memberzFixUrllib.transform_member\s
[[.
  X&&$'H!*"2"23
<<6!9,%ayH
""4#>?##D*MN
GHi(G!

N;;$"5"55$ooa066G"(//!"4":":K"(,,K"G#%")**:*:";N&&)3%ay8 'vay 9$//q	2>EEfM	N

NI*40KE
9"
'9*CLLS$!78LL)*[b489 / 2 2 ; ;K H!,CJ  %
 )#28HLL(GI!678Yr]+U###D*KLrScL|jd}|jd}d}t|tr|d}t|jD]}|j|dvs|d}n|r'|jt
||jy|j|dy)z.Transform for calls to module members in code.bare_with_attrrgNrr@rWrh)	rYrrrsrCrZr]rrXrt)rRr^r_
module_dotrgrxrHs       rK
transform_dotzFixUrllib.transform_dots[[!12
X&fd#AYFj../	F||vay(!!9	tH+5+<+< >
?
&IJrScl|jdr|j||y|jdr|j||y|jdr|j||y|jdr|j	|dy|jdr|j	|dyy)NrUrfrmodule_starzCannot handle star imports.	module_asz#This module is now multiple modules)rYrdrrrt)rRr^r_s   rK	transformzFixUrllib.transforms;;x !!$0
[[
&!!$0
[[)
*tW-
[[
'&CD
[[
%&KL&rSN)__name__
__module____qualname__rLrdrrrrSrKrNrNGs )" JMXK"MrSrNN)__doc__lib2to3.fixes.fix_importsrrlib2to3.fixer_utilrrrrr	r
rrCr\rLrNrrSrK<module>rs=>>>"CD ?@
 +,./"'
( -/
B	'(+A./..}M
}MrS