
    4pfs
                     T    d Z ddlmZmZ ddlmZ g dZ G d dej                  ZdS )	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
   )FeatureFeatures    )
fixer_base))
memoryviewz4power < 'memoryview' trailer < '(' any* ')' > any* >z2.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<power< any trailer< '.' 'format' > trailer< '(' any* ')' > >r	   )nonlocalzglobal_stmt< 'nonlocal' any* >3.0)with_tracebackztrailer< '.' 'with_traceback' >r   c                   t     e Zd ZdZ e            Z ed eD                       Zej	        Z	 fdZ
d Z xZS )FixFeatures	   c                 8    g | ]\  }}}t          |||          S  )r   ).0namepatternversions       `/var/www/html/nettyfy-visnx/env/lib/python3.11/site-packages/libpasteurize/fixes/fix_features.py
<listcomp>zFixFeatures.<listcomp>;   s@     D D D 6gw !w88 D D D    c                     t          t          |                               |          }	 |d= n# t          $ r Y nw xY w|S )Nnode)superr   match	Exception)selfr   to_ret	__class__s      r   r    zFixFeatures.match@   sW    {D))//55	w 	 	 	 D	 s   / 
<<c                     |D ]l}|| j         v r| j        |         }|j        dk    r| j        }n| j        } |||                                           | j                             |           md S )N3)reason)features_warnedfeaturesr   cannot_convertwarningmessage_textadd)r"   r   resultsfeature_namecurr_featurefails         r   	transformzFixFeatures.transformK   s    # 
	7 
	7Lt333#}\:'4//.DD<DT,";";"="=>>>>$((6666
	7 
	7r   )__name__
__module____qualname__	run_ordersetr(   r   FEATURESr)   PATTERNr    r2   __classcell__)r$   s   @r   r   r   3   s        I ceeO x D D:BD D D E EH G	 	 	 	 	7 7 7 7 7 7 7r   r   N)	__doc__feature_baser   r   lib2to3r   r8   BaseFixr   r   r   r   <module>r?      s    
 , + + + + + + +      ( ( (T#7 #7 #7 #7 #7*$ #7 #7 #7 #7 #7r   