
    WwgU                    (   d dl mZ d dlZd dlZd dlZd dlZd dlZ G d de      ZeZ	eZ
eZeZeZeZddZddZdddZ G d d	e      Z G d
 d      Z G d dej*                        Z	 d	 	 	 	 	 	 	 	 	 	 	 ddZddZ G d dej2                        Zy)    )annotationsNc                      e Zd Zy)CryptographyDeprecationWarningN__name__
__module____qualname__     I/var/www/horilla/myenv/lib/python3.12/site-packages/cryptography/utils.pyr   r          r   r   c                @    t        |t              st        |  d      y )Nz must be bytes)
isinstancebytes	TypeErrornamevalues     r   _check_bytesr      s#    eU#4&/00 $r   c                R    	 t        |       y # t        $ r t        |  d      w xY w)Nz must be bytes-like)
memoryviewr   r   s     r   _check_bytesliker   $   s1    65 64& 34556s    &c                ~    |dk(  rt        d      | j                  |xs | j                         dz   dz  xs dd      S )Nr   zlength argument can't be 0         big)
ValueErrorto_bytes
bit_length)integerlengths     r   int_to_bytesr#   +   sJ    {56667%%'!+16Q r   c                      e Zd Zy)InterfaceNotImplementedNr   r
   r   r   r%   r%   3   r   r   r%   c                      e Zd ZddZy)_DeprecatedValuec                .    || _         || _        || _        y N)r   messagewarning_class)selfr   r*   r+   s       r   __init__z_DeprecatedValue.__init__8   s    
*r   N)r   objectr*   str)r   r   r	   r-   r
   r   r   r'   r'   7   s    +r   r'   c                  @     e Zd Zd fdZddZddZd	dZd
dZ xZS )_ModuleWithDeprecationsc                V    t         |   |j                         || j                  d<   y N_module)superr-   r   __dict__)r,   module	__class__s     r   r-   z _ModuleWithDeprecations.__init__?   s"    )#)i r   c                    t        | j                  |      }t        |t              r8t	        j
                  |j                  |j                  d       |j                  }|S N   )
stacklevel)	getattrr4   r   r'   warningswarnr*   r+   r   r,   attrobjs      r   __getattr__z#_ModuleWithDeprecations.__getattr__C   sE    dllD)c+,MM#++s'8'8QG))C
r   c                2    t        | j                  ||       y r)   )setattrr4   )r,   rA   r   s      r   __setattr__z#_ModuleWithDeprecations.__setattr__J   s    dE*r   c                    t        | j                  |      }t        |t              r,t	        j
                  |j                  |j                  d       t        | j                  |       y r:   )	r=   r4   r   r'   r>   r?   r*   r+   delattrr@   s      r   __delattr__z#_ModuleWithDeprecations.__delattr__M   sE    dllD)c+,MM#++s'8'8QGd#r   c                2    dgt        | j                        S r3   )dirr4   r,   s    r   __dir__z_ModuleWithDeprecations.__dir__T   s    .C-..r   )r7   ztypes.ModuleType)rA   r/   returnr.   )rA   r/   r   r.   rN   None)rA   r/   rN   rO   )rN   ztyping.Sequence[str])	r   r   r	   r-   rC   rF   rI   rM   __classcell__)r8   s   @r   r1   r1   >   s    *+$/r   r1   c                    t         j                  |   }t        |t              st        |      xt         j                  |<   }t	        | ||      }|t        |||       |S r)   )sysmodulesr   r1   r'   rE   )r   module_namer*   r+   r   r7   dvs          r   
deprecatedrV   X   sZ     [[%Ff56,CF,KKK 6	%-	8Bb!Ir   c                L     d  t               d fd}t        |      S )N_cached_c                X    t        |       }|ur|S  |       }t        | |       |S r)   )r=   rE   )instancecacheresultcached_namefuncsentinels      r   innerzcached_property.<locals>.innerm   s8    +x8 Lh+v.r   )rZ   r.   )r.   property)r^   r`   r]   r_   s   ` @@r   cached_propertyrb   i   s'    TF#KxH E?r   c                      e Zd ZddZddZy)Enumc                j    d| j                   j                   d| j                   d| j                  dS )N<.z: >)r8   r   _name__value_rL   s    r   __repr__zEnum.__repr__{   s1    4>>**+1T[[MDLL;K1MMr   c                L    | j                   j                   d| j                   S )Nrg   )r8   r   ri   rL   s    r   __str__zEnum.__str__~   s"    ..))*!DKK=99r   N)rN   r/   )r   r   r	   rk   rm   r
   r   r   rd   rd   z   s    N:r   rd   )r   r/   r   r   rN   rO   r)   )r!   intr"   z
int | NonerN   r   )r   r.   rT   r/   r*   r/   r+   ztype[Warning]r   z
str | NonerN   r'   )r^   ztyping.CallablerN   ra   )
__future__r   enumrR   typestypingr>   UserWarningr   DeprecatedIn36DeprecatedIn37DeprecatedIn40DeprecatedIn41DeprecatedIn42DeprecatedIn43r   r   r#   	Exceptionr%   r'   
ModuleTyper1   rV   rb   rd   r
   r   r   <module>r|      s   
 #  
   
	[ 	 0/////1
6	i 	+ +/e.. />   !	
  "":499 :r   