????

Your IP : 3.137.211.1


Current Path : /usr/lib/python3.6/site-packages/libpasteurize/fixes/__pycache__/
Upload File :
Current File : //usr/lib/python3.6/site-packages/libpasteurize/fixes/__pycache__/fix_features.cpython-36.opt-1.pyc

3

�cs
�
@sJdZddlmZmZddlmZdddddd d!d"gZGdd�dej�ZdS)#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�
memoryview�4power < 'memoryview' trailer < '(' any* ')' > any* >�2.7�numbers��import_from< 'from' 'numbers' 'import' any* > |
           import_name< 'import' ('numbers' dotted_as_names< any* 'numbers' any* >) >�2.6�abc�yimport_name< 'import' ('abc' dotted_as_names< any* 'abc' any* >) > |
           import_from< 'from' 'abc' 'import' any* >�io�vimport_name< 'import' ('io' dotted_as_names< any* 'io' any* >) > |
           import_from< 'from' 'io' 'import' any* >�bin�+power< 'bin' trailer< '(' any* ')' > any* >�
formatting�<power< any trailer< '.' 'format' > trailer< '(' any* ')' > >�nonlocal�global_stmt< 'nonlocal' any* >�3.0�with_traceback�trailer< '.' 'with_traceback' >csFeZdZdZe�Zedd�eD��Zej	Z	�fdd�Z
dd�Z�ZS)�FixFeatures�	cCsg|]\}}}t|||��qS�)r)�.0�name�pattern�versionrr�"/usr/lib/python3.6/fix_features.py�
<listcomp>;szFixFeatures.<listcomp>cs4tt|�j|�}y
|d=Wntk
r.YnX|S)N�node)�superr�match�	Exception)�selfr"Zto_ret)�	__class__rr r$@s
zFixFeatures.matchcCs^xX|D]P}||jkrqq|j|}|jdkr4|j}n|j}|||j�d�|jj|�qWdS)N�3)�reason)�features_warned�featuresrZcannot_convertZwarningZmessage_text�add)r&r"�resultsZfeature_nameZcurr_featureZfailrrr �	transformKs



zFixFeatures.transform)
�__name__�
__module__�__qualname__Z	run_order�setr*r�FEATURESr+ZPATTERNr$r.�
__classcell__rr)r'r r3s
rN)rrr)r	r
r)rr
r)rrr)rrr)rrr)rrr)rrr)	�__doc__Zfeature_baserrZlib2to3rr3ZBaseFixrrrrr �<module>s6