관리-도구
편집 파일: fix_features.cpython-311.pyc
� �܋fs � �T � d Z ddlmZmZ ddlmZ g d�Z G 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)�numbersz�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 )� formattingz<power< any trailer< '.' 'format' > trailer< '(' any* ')' > >r )�nonlocalzglobal_stmt< 'nonlocal' any* >�3.0)�with_tracebackztrailer< '.' 'with_traceback' >r c �t � � e Zd ZdZ e� � Z ed� eD � � � � Zej Z � fd�Z d� Z� xZS )�FixFeatures� c �8 � g | ]\ }}}t |||� � ��S � )r )�.0�name�pattern�versions �q/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/libpasteurize/fixes/fix_features.py� <listcomp>zFixFeatures.<listcomp>; s@ � � D� D� D� 6��g�w� !��w��8�8� D� D� D� c � �� t t | � � � |� � } |d= n# t $ r Y nw xY w|S )N�node)�superr �match� Exception)�selfr �to_ret� __class__s �r r zFixFeatures.match@ sW �� ��{�D�)�)�/�/��5�5�� ��w����� � � � �D� ���� � s �/ � <�<c �� � |D ]l}|| j v r�| j | }|j dk r| j }n| j } |||� � � �� � | j � |� � �md S )N�3)�reason)�features_warned�featuresr �cannot_convert�warning�message_text�add)r"