
    Eqg	                         U d dl Zd dlZd dlZd dlmZmZmZ dedefdZ	dede
fdZi Zeee
f         ed<   d	ede
fd
Zd	ede
ddfdZdgg ddgdgdgdgdZeeee         f         ed<   dS )    N)DictListTupleversionreturnc                    |                      d          }g }|D ]_}d                    t          j        d |                    }	 |                    t          |                     O# t          $ r Y  nw xY wt          |          S )N. c                     | t           j        v S )N)stringdigits)xs    ?/var/www/html/env/lib/python3.11/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  	ww < <iHH
 
	S..//// 	 	 	EE	s   "A))
A76A7requirementc                     |                      d          \  }}	 t          j                            |          }|dS n# t          $ r Y dS w xY wt          |          }t          |          }||k     rdS dS )zeIs the requirement fulfilled?

    The requirement must be of the form

        package>=version
    z>=NFT)r   	importlibmetadatar   r   r   )r   packageminimumr   	t_version	t_minimums         r   _version_checkr'      s     #((..GW$,,W55?5    uu ))I ))I9u4s   !> 
AA_cachefeaturec                     t                               |           }||S t                              |           }|dt           | <   dS d}|D ]}t          |          sd} n|t           | <   |S )zIs *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.
    NFT)r(   get_requirementsr'   )r)   valuerequirementsokr   s        r   haver0   2   s     JJwE $$W--Lwu	B#  k** 	BE	 F7OIr   enabledc                     |t           | <   dS )zForce 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)   r1   s     r   forcer3   M   s     F7OOOr   zcryptography>=43)zhttpcore>=1.0.0zhttpx>=0.26.0z	h2>=4.1.0zaioquic>=1.0.0z	idna>=3.7z
trio>=0.23z
wmi>=1.5.1)dnssecdohdoqidnatriowmir,   )importlib.metadatar!   r   r   typingr   r   r   strr   boolr'   r(   __annotations__r0   r3   r,    r   r   <module>r@      sN             $ $ $ $ $ $ $ $ $ $c e    	   0 S$Y   # $    63  $     ""<<<MN>	' 	'tCcN# 	 	 	 	 	r   