a
     d)                     @   s8   d dl mZ d dlZddlmZmZ G dd deZdS )    )OptionalN   )AsyncNetworkBackendAsyncNetworkStreamc                   @   sb   e Zd ZddddZdeeee ee edddZ	deee edd	d
Z
eddddZdS )AutoBackendN)returnc                    sH   t | dsDt }|dkr0ddlm} | | _nddlm} | | _d S )N_backendtrior   )TrioBackend)AsyncIOBackend)hasattrsniffioZcurrent_async_libraryr	   r
   r   Zasyncior   )selfbackendr
   r    r   _/var/www/html/stable-diffusion-webui/venv/lib/python3.9/site-packages/httpcore/backends/auto.py_init_backend	   s    

zAutoBackend._init_backend)hostporttimeoutlocal_addressr   c                    s(   |   I d H  | jj||||dI d H S )N)r   r   )r   r   connect_tcp)r   r   r   r   r   r   r   r   r      s    zAutoBackend.connect_tcp)pathr   r   c                    s$   |   I d H  | jj||dI d H S )N)r   )r   r   connect_unix_socket)r   r   r   r   r   r   r   !   s    zAutoBackend.connect_unix_socket)secondsr   c                    s    |   I d H  | j|I d H S )N)r   r   sleep)r   r   r   r   r   r   '   s    zAutoBackend.sleep)NN)N)__name__
__module____qualname__r   strintr   floatr   r   r   r   r   r   r   r   r      s       r   )typingr   r   baser   r   r   r   r   r   r   <module>   s   