bgs TdZddlmZmZddlmZgdZGddejZdS) z Warn about features that are not present in Python 2.5, giving a message that points to the earliest version of Python 2.x (or 3.x, if none) that supports it )FeatureFeatures) fixer_base)) memoryviewz4power < 'memoryview' trailer < '(' any* ')' > any* >z2.7)numberszimport_from< 'from' 'numbers' 'import' any* > | import_name< 'import' ('numbers' dotted_as_names< any* 'numbers' any* >) >2.6)abczyimport_name< 'import' ('abc' dotted_as_names< any* 'abc' any* >) > | import_from< 'from' 'abc' 'import' any* >r )iozvimport_name< 'import' ('io' dotted_as_names< any* 'io' any* >) > | import_from< 'from' 'io' 'import' any* >r )binz+power< 'bin' trailer< '(' any* ')' > any* >r ) formattingz trailer< '(' any* ')' > >r )nonlocalzglobal_stmt< 'nonlocal' any* >3.0)with_tracebackztrailer< '.' 'with_traceback' >rcteZdZdZeZedeDZej Z fdZ dZ xZ S) FixFeatures c8g|]\}}}t|||S)r).0namepatternversions q/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/libpasteurize/fixes/fix_features.py zFixFeatures.;s@DDD 6gw!w88DDDctt||} |d=n#t$rYnwxYw|S)Nnode)superrmatch Exception)selfrto_ret __class__s rr zFixFeatures.match@sW{D))//55 w    D  s / <<c|D]l}||jvr |j|}|jdkr|j}n|j}||||j|mdS)N3)reason)features_warnedfeaturesrcannot_convertwarning message_textadd)r"rresults feature_name curr_featurefails r transformzFixFeatures.transformKs# 7 7Lt333#}\: '4//.DD>>>$((6666 7 7r) __name__ __module__ __qualname__ run_ordersetr(rFEATURESr)PATTERNr r2 __classcell__)r$s@rrr3sIceeOxDD:BDDDEEHG      7 7 7 7 7 7 7rrN) __doc__ feature_baserrlib2to3rr8BaseFixrrrrr?s ,+++++++( ( ( T#7#7#7#7#7*$#7#7#7#7#7r