o
    [h                     @   sH   d dl Z d dlmZ dd Zdd Zdd Zd	d
 Zdd Zdd ZdS )    N	coroutinec                         fdd}|S )Nc                        D ]
}t | |t| q| S N)setattr_make_delegate_methodcls	attr_nameattrs /home/ubuntu/experiments/live_experiments/Pythonexperiments/Otree/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                    s   t  fdd}|S )Nc                 ?   s8    t jt| j g|R i |}| j| j|E d H S r   )	functoolspartialgetattr_file_loopZrun_in_executorZ	_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#   *   s   z"_make_proxy_method.<locals>.methodr   r$   r   r"   r   r   )   s   r   c                    s    fdd}t |S )Nc                    s   t | j S r   r%   )r   r"   r   r   proxy_property1   s   z,_make_proxy_property.<locals>.proxy_property)property)r   r&   r   r"   r   r   0   s   r   )	r   typesr   r   r   r   r   r   r   r   r   r   r   <module>   s    				