Viewing File: /opt/hc_python/lib/python3.12/site-packages/dns/__pycache__/_features.cpython-312.pyc

�

`��g�	����UddlZddlZddlZddlmZmZmZdedefd�Z	dede
fd�ZiZeee
fe
d<d	ede
fd
�Zd	ede
ddfd�Zd
ggd�dgdgdgdgd�Zeeeefe
d<y)�N)�Dict�List�Tuple�version�returnc��|jd�}g}|D]C}djtjd�|��}	|j	t|���Et|�S#t$rYt|�SwxYw)N�.�c�&�|tjvS)N)�string�digits)�xs �</opt/hc_python/lib/python3.12/site-packages/dns/_features.py�<lambda>z"_tuple_from_text.<locals>.<lambda>s
��!�v�}�}�*<�)�split�join�	itertools�	takewhile�append�int�	Exception�tuple)r�
text_parts�	int_parts�	text_part�digit_prefixs     r�_tuple_from_textr	s������s�#�J��I��	��w�w���� <�i�H�
��	����S��.�/� �������	������	�s�A'�'	A>�=A>�requirementc���|jd�\}}	tjj|�}|�y	t|�}t|�}||kryy#t$rYywxYw)zeIs the requirement fulfilled?

    The requirement must be of the form

        package>=version
    z>=FT)r�	importlib�metadatarrr)r�package�minimumr�	t_version�	t_minimums      r�_version_checkr'sy��#�(�(��.��G�W���$�$�,�,�W�5���?���!��)�I� ��)�I��9�����
����s�!A�	A"�!A"�_cache�featurec��tj|�}|�|Stj|�}|�
dt|<yd}|D]}t|�r�d}n|t|<|S)z�Is *feature* available?

    This tests if all optional packages needed for the
    feature are available and recent enough.

    Returns ``True`` if the feature is available,
    and ``False`` if it is not or if metadata is
    missing.
    FT)r(�get�
_requirementsr')r)�value�requirements�okrs     r�haver02sn��
�J�J�w��E����� �$�$�W�-�L�����w���	
�B�#���k�*��B��$��F�7�O�
�Ir�enabledc��|t|<y)z�Force the status of *feature* to be *enabled*.

    This method is provided as a workaround for any cases
    where importlib.metadata is ineffective, or for testing.
    N)r()r)r1s  r�forcer3Ms
���F�7�Orzcryptography>=43)zhttpcore>=1.0.0z
httpx>=0.26.0z	h2>=4.1.0zaioquic>=1.0.0z	idna>=3.7z
trio>=0.23z
wmi>=1.5.1)�dnssec�doh�doq�idna�trio�wmir,)�importlib.metadatar!rr�typingrrr�strr�boolr'r(�__annotations__r0r3r,�rr�<module>r@s�����
�$�$��c��e�����	��0���S�$�Y����#��$��6�3����$��"�"�<���
�M�
�N��>�	'�
�t�C��c��N�#�	r
Back to Directory File Manager