HEX
Server: LiteSpeed
System: Linux ws4.angoweb.net 5.14.0-611.13.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 11 04:57:59 EST 2025 x86_64
User: tswangoe (2287)
PHP: 8.1.33
Disabled: show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open
Upload Files
File: //usr/local/lib/python3.9/site-packages/libpasteurize/fixes/__pycache__/fix_features.cpython-39.pyc
a

q�dgs
�@s>dZddlmZmZddlmZgd�ZGdd�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�J/usr/local/lib/python3.9/site-packages/libpasteurize/fixes/fix_features.py�
<listcomp>;s�zFixFeatures.<listcomp>cs2tt|��|�}z
|d=Wnty,Yn0|S)N�node)�superr�match�	Exception)�selfrZto_ret��	__class__rrr@s
zFixFeatures.matchcCsZ|D]P}||jvrqq|j|}|jdkr2|j}n|j}|||��d�|j�|�qdS)N�3)�reason)�features_warned�featuresrZcannot_convert�warningZmessage_text�add)rr�resultsZ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*