
    	5h                    z    d dl mZ d dlZd dlZddlmZmZmZmZm	Z	m
Z
mZmZmZmZ  G d d      Z G d de      Zy)	    )annotationsN   )
URL
ExtensionsHeaderTypesOriginRequestResponseenforce_bytesenforce_headersenforce_urlinclude_request_headersc                      e Zd Zdddd	 	 	 	 	 	 	 	 	 	 	 ddZej
                  dddd	 	 	 	 	 	 	 	 	 	 	 dd       ZddZy)	RequestInterfaceN)headerscontent
extensionsc                  t        |d      }t        |d      }t        |d      }t        |||      }t	        |||||      }| j                  |      }	 |j                          |j                          |S # |j                          w xY wNmethod)nameurlr   )r   r   )r   r   r   r   r   )r   r   r   r   r	   handle_requestreadcloseselfr   r   r   r   r   requestresponses           g/var/www/dev.core.comfenalco.cic-ware.com/crm/lib/python3.12/site-packages/httpcore/_sync/interfaces.pyr   zRequestInterface.request   s     vH5#E*!'	: *'sGL!
 &&w/	MMONN NNs   A: :Bc             #    K   t        |d      }t        |d      }t        |d      }t        |||      }t	        |||||      }| j                  |      }	 | |j                          y # |j                          w xY wwr   )r   r   r   r   r	   r   r   r   s           r    streamzRequestInterface.stream4   s      vH5#E*!'	: *'sGL!
 &&w/	NNNHNNs   ABA/ B/BBc                    t               NNotImplementedError)r   r   s     r    r   zRequestInterface.handle_requestS       !##    )r   bytes | strr   URL | bytes | strr   r   r   %bytes | typing.Iterator[bytes] | Noner   Extensions | Nonereturnr
   )r   r)   r   r*   r   r   r   r+   r   r,   r-   ztyping.Iterator[Response])r   r	   r-   r
   )__name__
__module____qualname__r   
contextlibcontextmanagerr"   r    r(   r    r   r      s      $9=(, 
  7 & 
>   $9=(, 
  7 & 
# <$r(   r   c                  D    e Zd Zd	dZd
dZddZddZddZddZddZ	y)ConnectionInterfacec                    t               r$   r%   r   s    r    r   zConnectionInterface.closeX   r'   r(   c                    t               r$   r%   r7   s    r    infozConnectionInterface.info[   r'   r(   c                    t               r$   r%   )r   origins     r    can_handle_requestz&ConnectionInterface.can_handle_request^   r'   r(   c                    t               )a  
        Return `True` if the connection is currently able to accept an
        outgoing request.

        An HTTP/1.1 connection will only be available if it is currently idle.

        An HTTP/2 connection will be available so long as the stream ID space is
        not yet exhausted, and the connection is not in an error state.

        While the connection is being established we may not yet know if it is going
        to result in an HTTP/1.1 or HTTP/2 connection. The connection should be
        treated as being available, but might ultimately raise `NewConnectionRequired`
        required exceptions if multiple requests are attempted over a connection
        that ends up being established as HTTP/1.1.
        r%   r7   s    r    is_availablez ConnectionInterface.is_availablea   s      "##r(   c                    t               )z
        Return `True` if the connection is in a state where it should be closed.

        This either means that the connection is idle and it has passed the
        expiry time on its keep-alive, or that server has sent an EOF.
        r%   r7   s    r    has_expiredzConnectionInterface.has_expireds        "##r(   c                    t               )zD
        Return `True` if the connection is currently idle.
        r%   r7   s    r    is_idlezConnectionInterface.is_idle|   s     "##r(   c                    t               )z
        Return `True` if the connection has been closed.

        Used when a response is closed to determine if the connection may be
        returned to the connection pool or not.
        r%   r7   s    r    	is_closedzConnectionInterface.is_closed   rA   r(   N)r-   None)r-   str)r;   r   r-   bool)r-   rH   )
r.   r/   r0   r   r9   r<   r>   r@   rC   rE   r3   r(   r    r5   r5   W   s%    $$$$$$$$r(   r5   )
__future__r   r1   typing_modelsr   r   r   r   r	   r
   r   r   r   r   r   r5   r3   r(   r    <module>rL      s7    "    @$ @$F2$* 2$r(   