o
    -˜Žj:  ã                   @   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© úV/var/www/kodo/Anonymous/send/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    				