HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/libpasteurize/fixes/__pycache__/fix_features.cpython-38.pyc
U

,�]s
�@sJdZddlmZmZddlmZddddd	d
ddgZGd
d�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)�
memoryviewz4power < 'memoryview' trailer < '(' any* ')' > any* >z2.7)Znumbersz�import_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)Z
formattingz<power< any trailer< '.' 'format' > trailer< '(' any* ')' > >r)�nonlocalzglobal_stmt< 'nonlocal' any* >�3.0)�with_tracebackztrailer< '.' 'with_traceback' >rcsFeZdZdZe�Zedd�eD��Zej	Z	�fdd�Z
dd�Z�ZS)�FixFeatures�	cCsg|]\}}}t|||��qS�)r)�.0�name�pattern�versionrr�B/usr/lib/python3/dist-packages/libpasteurize/fixes/fix_features.py�
<listcomp>;s�zFixFeatures.<listcomp>cs4tt|��|�}z
|d=Wntk
r.YnX|S)N�node)�superr�match�	Exception)�selfrZto_ret��	__class__rrr@s
zFixFeatures.matchcCsZ|D]P}||jkrqq|j|}|jdkr2|j}n|j}|||��d�|j�|�qdS)N�3)�reason)�features_warned�featuresrZcannot_convertZwarningZmessage_text�add)rrZresultsZfeature_nameZcurr_featureZfailrrr�	transformKs


zFixFeatures.transform)
�__name__�
__module__�__qualname__Z	run_order�setr r�FEATURESr!ZPATTERNrr#�
__classcell__rrrrr3s�rN)	�__doc__Zfeature_baserrZlib2to3rr(ZBaseFixrrrrr�<module>s�*