WccsndZddlmZddlmZmZdddiiZiZdZdZ Gd d ejZ d S) z?Fix incompatible renames Fixes: * sys.maxint -> sys.maxsize i) fixer_base)Name attr_chainZsysZmaxintZmaxsizecsTddjtt|zdzS)Nz(|z))joinZmapZrepr)Zmemberss 2/usr/lib64/python3.12/lib2to3/fixes/fix_renames.py alternatesrs" #dG,- - 33c #sKttjD]M\}}t|jD]*\}}|t||f<d|d|d|dd|d|d,OdS)Nz3 import_from< 'from' module_name=z, 'import' ( attr_name=z | import_as_name< attr_name=z! 'as' any >) > z& power< module_name=z trailer< '.' attr_name=z > any* > )ZlistMAPPINGZitemsLOOKUP)ZmodulereplaceZold_attrnew_attrs r build_patternr s 0++"&w}}"7 + + Hh)1FFH% & & 8885 5 5 5 5  + + + + + +++rcs\eZdZdZdj eZdZfdZdZ xZ S) FixRenamesTrZprecstt|j|}|r'tfdt |dDrdS|SdS)Nc3s,K|] }|dS)N)Z.0Zobjmatchs rz z#FixRenames.match..5s%DD#55:::::DDrZparentF)Zsuperr rZanyr)selfnoderesultsr __class__s @rrzFixRenames.match1sYj$'--%+ 7DDDDD()CDDDDuNurcs|jd}|jd}|rR|rNt|j|jf}|jt ||j dSdSdS)NZ module_name attr_name)prefix)Zgetr Zvaluer rr)rrrZmod_namerr s r transformzFixRenames.transform>sr;;}-KK ,  8 x~~y?@H   d8I4D4DEE F F F F" 88r) Z__name__Z __module__Z __qualname__Z BM_compatiblerr ZPATTERNZorderrrZ __classcell__)rs@rr r *sjMhh}}'G EGGGGGGGrr N) Z__doc__ZrZ fixer_utilrrrr rr ZBaseFixr rrrrs)))))))) Hy)  444+++*GGGGG##GGGGr