Vc4csRdZddlmZddlmZmZiddddddd d d d d ddddddddddddddddddddd d!d"id#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdDdEdFdGdHdIdJdJdJdKdLdLdMdNdOZdPZefdQZGdRdSej Z dTS)Uz/Fix incompatible imports and module references.i) fixer_base)Name attr_chainZStringIOZioZ cStringIOZcPickleZpickleZ __builtin__ZbuiltinsZcopy_regZcopyregZQueueZqueueZ SocketServerZ socketserverZ ConfigParserZ configparserreprZreprlibZ FileDialogztkinter.filedialogZ tkFileDialogZ SimpleDialogztkinter.simpledialogZtkSimpleDialogZtkColorChooserztkinter.colorchooserZtkCommonDialogztkinter.commondialogZDialogztkinter.dialogZTkdndz tkinter.dndZtkFontz tkinter.fontZ tkMessageBoxztkinter.messageboxZ ScrolledTextztkinter.scrolledtextZ Tkconstantsztkinter.constantsZTixz tkinter.tixZttkz tkinter.ttkZTkinterZtkinterZ markupbaseZ _markupbaseZ_winregZwinregZthreadZ_threadZ dummy_threadZ _dummy_threadZdbhashzdbm.bsdZdumbdbmzdbm.dumbZdbmzdbm.ndbmZgdbmzdbm.gnuZ xmlrpclibz xmlrpc.clientZDocXMLRPCServerz xmlrpc.serverz http.clientz html.entitiesz html.parserz http.cookieszhttp.cookiejarz http.serverZ subprocessZ collectionsz urllib.parsezurllib.robotparser)ZSimpleXMLRPCServerZhttplibZhtmlentitydefsZ HTMLParserZCookieZ cookielibZBaseHTTPServerZSimpleHTTPServerZ CGIHTTPServerZcommandsZ UserStringZUserListZurlparseZ robotparsercs^ddtt|zdzS)Nz(|z))joinZmapr)Zmembers 2/usr/lib64/python3.11/lib2to3/fixes/fix_imports.py alternatesr=s( #dG,,-- - 33c#sKdd|D}t|}d|d|dVd|zVd|d|d Vd |zVdS) Nz | csg|]}d|zS)zmodule_name='%s').0Zkeys rz z!build_pattern..BsGGG-3GGGr z$name_import=import_name< 'import' ((z;) | multiple_imports=dotted_as_names< any* (z) any* >) > zimport_from< 'from' (%s) 'import' ['('] ( any | import_as_name< any 'as' any > | import_as_names< any* >) [')'] > z(import_name< 'import' (dotted_as_name< (zg) 'as' any > | multiple_imports=dotted_as_names< any* dotted_as_name< (z!) 'as' any > any* >) > z3power< bare_with_attr=(%s) trailer<'.' any > any* >)rrZkeys)mappingZmod_listZ bare_namess r build_patternr AszzGGwGGGHHHGLLNN++JJ888 %%%%  888 %%%% @* LLLLLLr csNeZdZdZdZeZdZdZfdZ fdZ fdZ dZ xZ S) FixImportsTicsPdt|jS)Nr)rr r )selfrrr zFixImports.build_pattern`sxx dl33444r cs||_tt|dSN)r ZPATTERNsuperrcompile_pattern)r __class__s rrzFixImports.compile_patterncs:))++  j$//11111r cstt|j|}|r1d|vr+tfdt |dDrdS|SdS)Nbare_with_attrc3s.K|]}|VdSrr )r Zobjmatchs rz z#FixImports.match..qs+IIsc IIIIIIr ZparentF)rrrZanyr)rnoderesultsrrs @rrzFixImports.matchjsxj$''-%++   w. IIIIjx.H.HIIIII uNur cshtt|||i|_dSr)rr start_treereplace)rZtreeZfilenamers rrzFixImports.start_treevs. j$**4::: r cs|d}|r|j}|j|}|t ||jd|vr ||j|<d|vr/||}|r|||dSdSdS|dd}|j|j}|r+|t ||jdSdS)NZ module_name)prefixZ name_importZmultiple_importsri)ZgetZvaluer rrrr transform)rrrZ import_modZmod_nameZnew_nameZ bare_names rrzFixImports.transformzs-[[//  K!'H|H-H   tHZ5FGGG H H H' 2*2 X&!W, 2 **T**2NN411111 2 2 22 01!4I|'' 88H K!!$x 8H"I"I"IJJJJJ K Kr )Z__name__Z __module__Z __qualname__Z BM_compatibleZkeep_line_orderMAPPINGr Z run_orderr rrrrZ __classcell__)rs@rrrUsMOGI55522222     KKKKKKKr rN) Z__doc__ZrZ fixer_utilrrrrr ZBaseFixrr r rrs55))))))))2 :2  2  h2  :2  y 2  G 2  > 2  >2  92  -2  /2  12  32  32  32  %2  M!2 2 " ^#2 $ /%2 & 1'2 ( -)2 * -+2 , --2 . i/2 0 12 2 h32 4 Y52 6 ?72 : Y;2 < j=2 > *?2 @ 9A2 B C2 D oE2 2 F"1#-'#(*,)#'%&/c2 2 2 j444"MMMM(<K<K<K<K<K#<K<K<K<K<Kr