o
    MK&hL                     @   sL   d dl Z dd Zdd Zdd Zdd	 Zd
d Zdd Zdd Zdd ZdS )    Nc                         fdd}|S )Nc                        D ]
}t | |t| q| S N)setattr_make_delegate_methodcls	attr_nameattrs L/var/www/html/venv/lib/python3.10/site-packages/aiofiles/threadpool/utils.pycls_builder      z)delegate_to_executor.<locals>.cls_builderr   r   r   r   r
   r   delegate_to_executor      r   c                     r   )Nc                    r   r   )r   _make_proxy_methodr   r
   r   r   r      r   z*proxy_method_directly.<locals>.cls_builderr   r   r   r
   r   proxy_method_directly   r   r   c                     r   )Nc                    r   r   )r   _make_proxy_propertyr   r
   r   r   r      r   z,proxy_property_directly.<locals>.cls_builderr   r   r   r
   r   proxy_property_directly   r   r   c                     r   )Nc                    r   r   )r   _make_cond_delegate_methodr   r
   r   r   r       r   z.cond_delegate_to_executor.<locals>.cls_builderr   r   r   r
   r   cond_delegate_to_executor   r   r   c                    r   )Nc                    s8   t jt| j g|R i |}| j| j|I d H S r   )	functoolspartialgetattr_file_looprun_in_executor	_executorselfargskwargscbr	   r   r   method)   s    z%_make_delegate_method.<locals>.methodr   r	   r&   r   r%   r   r   (   s   r   c                    r   )Nc                    s   t | j |i |S r   r   r   )r!   r"   r#   r%   r   r   r&   1   s   z"_make_proxy_method.<locals>.methodr   r'   r   r%   r   r   0   s   r   c                    s    fdd}t |S )Nc                    s   t | j S r   r(   )r!   r%   r   r   proxy_property8   s   z,_make_proxy_property.<locals>.proxy_property)property)r	   r)   r   r%   r   r   7   s   r   c                    r   )z>For spooled temp files, delegate only if rolled to file objectc                    sV   | j jr tjt| j  g|R i |}| j| j|I d H S t| j  |i |S r   )r   _rolledr   r   r   r   r   r   r    r%   r   r   r&   A   s
    z*_make_cond_delegate_method.<locals>.methodr   r'   r   r%   r   r   >   s   r   )	r   r   r   r   r   r   r   r   r   r   r   r   r   <module>   s    				