
    hO!                       S r SSKJr  SSKrSSKr\R
                  (       a  SSKJrJr  / SQr	 " S S\
5      r " S	 S
\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S \5      r " S! S"\5      r " S# S$\5      r " S% S&\5      r " S' S(\5      r " S) S*\5      r " S+ S,\5      r " S- S.\5      r " S/ S0\5      r " S1 S2\
5      r  " S3 S4\
5      r! " S5 S6\"5      r# " S7 S8\#5      r$ " S9 S:\#5      r% " S; S<\#5      r& " S= S>\#5      r'\RP                   S@   SAS? jj5       r)g)Bul  
Our exception hierarchy:

* HTTPError
  x RequestError
    + TransportError
      - TimeoutException
        · ConnectTimeout
        · ReadTimeout
        · WriteTimeout
        · PoolTimeout
      - NetworkError
        · ConnectError
        · ReadError
        · WriteError
        · CloseError
      - ProtocolError
        · LocalProtocolError
        · RemoteProtocolError
      - ProxyError
      - UnsupportedProtocol
    + DecodingError
    + TooManyRedirects
  x HTTPStatusError
* InvalidURL
* CookieConflict
* StreamError
  x StreamConsumed
  x StreamClosed
  x ResponseNotRead
  x RequestNotRead
    )annotationsN   )RequestResponse)
CloseErrorConnectErrorConnectTimeoutCookieConflictDecodingError	HTTPErrorHTTPStatusError
InvalidURLLocalProtocolErrorNetworkErrorPoolTimeoutProtocolError
ProxyError	ReadErrorReadTimeoutRemoteProtocolErrorRequestErrorRequestNotReadResponseNotReadStreamClosedStreamConsumedStreamErrorTimeoutExceptionTooManyRedirectsTransportErrorUnsupportedProtocol
WriteErrorWriteTimeoutc                  l   ^  \ rS rSrSrSU 4S jjr\SS j5       r\R                  S	S j5       rSr	U =r
$ )
r   J   ab  
Base class for `RequestError` and `HTTPStatusError`.

Useful for `try...except` blocks when issuing a request,
and then calling `.raise_for_status()`.

For example:

```
try:
    response = httpx.get("https://www.example.com")
    response.raise_for_status()
except httpx.HTTPError as exc:
    print(f"HTTP Exception for {exc.request.url} - {exc}")
```
c                2   > [         TU ]  U5        S U l        g Nsuper__init___requestselfmessage	__class__s     C/var/www/html/env/lib/python3.13/site-packages/httpx/_exceptions.pyr)   HTTPError.__init__\   s    !(,    c                J    U R                   c  [        S5      eU R                   $ )Nz'The .request property has not been set.)r*   RuntimeError)r,   s    r/   requestHTTPError.request`   s"    == HII}}r1   c                    Xl         g r&   r*   )r,   r4   s     r/   r4   r5   f   s    r1   r7   r-   strreturnNone)r:   r   )r4   r   r:   r;   )__name__
__module____qualname____firstlineno____doc__r)   propertyr4   setter__static_attributes____classcell__r.   s   @r/   r   r   J   s9    "-  
 ^^   r1   r   c                  8   ^  \ rS rSrSrSS.SU 4S jjjrSrU =r$ )r   k   zK
Base class for all exceptions that may occur when issuing a `.request()`.
N)r4   c               0   > [         TU ]  U5        X l        g r&   r'   )r,   r-   r4   r.   s      r/   r)   RequestError.__init__p   s    !  r1   r7   )r-   r9   r4   Request | Noner:   r;   r<   r=   r>   r?   r@   r)   rC   rD   rE   s   @r/   r   r   k   s     CG      r1   r   c                      \ rS rSrSrSrg)r   {   zM
Base class for all exceptions that occur at the level of the Transport API.
 Nr<   r=   r>   r?   r@   rC   rN   r1   r/   r   r   {       r1   r   c                      \ rS rSrSrSrg)r      zA
The base class for timeout errors.

An operation has timed out.
rN   NrO   rN   r1   r/   r   r          r1   r   c                      \ rS rSrSrSrg)r	      z)
Timed out while connecting to the host.
rN   NrO   rN   r1   r/   r	   r	      rP   r1   r	   c                      \ rS rSrSrSrg)r      z/
Timed out while receiving data from the host.
rN   NrO   rN   r1   r/   r   r      rP   r1   r   c                      \ rS rSrSrSrg)r"      z+
Timed out while sending data to the host.
rN   NrO   rN   r1   r/   r"   r"      rP   r1   r"   c                      \ rS rSrSrSrg)r      z:
Timed out waiting to acquire a connection from the pool.
rN   NrO   rN   r1   r/   r   r      rP   r1   r   c                      \ rS rSrSrSrg)r      zc
The base class for network-related errors.

An error occurred while interacting with the network.
rN   NrO   rN   r1   r/   r   r      rS   r1   r   c                      \ rS rSrSrSrg)r      z*
Failed to receive data from the network.
rN   NrO   rN   r1   r/   r   r      rP   r1   r   c                      \ rS rSrSrSrg)r!      z*
Failed to send data through the network.
rN   NrO   rN   r1   r/   r!   r!      rP   r1   r!   c                      \ rS rSrSrSrg)r      z#
Failed to establish a connection.
rN   NrO   rN   r1   r/   r   r      rP   r1   r   c                      \ rS rSrSrSrg)r      z
Failed to close a connection.
rN   NrO   rN   r1   r/   r   r      rP   r1   r   c                      \ rS rSrSrSrg)r      z:
An error occurred while establishing a proxy connection.
rN   NrO   rN   r1   r/   r   r      rP   r1   r   c                      \ rS rSrSrSrg)r       zt
Attempted to make a request to an unsupported protocol.

For example issuing a request to `ftp://www.example.com`.
rN   NrO   rN   r1   r/   r    r       rS   r1   r    c                      \ rS rSrSrSrg)r      z
The protocol was violated.
rN   NrO   rN   r1   r/   r   r      rP   r1   r   c                      \ rS rSrSrSrg)r      z
A protocol was violated by the client.

For example if the user instantiated a `Request` instance explicitly,
failed to include the mandatory `Host:` header, and then issued it directly
using `client.send()`.
rN   NrO   rN   r1   r/   r   r      s    r1   r   c                      \ rS rSrSrSrg)r      zR
The protocol was violated by the server.

For example, returning malformed HTTP.
rN   NrO   rN   r1   r/   r   r      rS   r1   r   c                      \ rS rSrSrSrg)r      z?
Decoding of the response failed, due to a malformed encoding.
rN   NrO   rN   r1   r/   r   r      rP   r1   r   c                      \ rS rSrSrSrg)r      z
Too many redirects.
rN   NrO   rN   r1   r/   r   r      rP   r1   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r   i  zp
The response had an error HTTP status of 4xx or 5xx.

May be raised when calling `response.raise_for_status()`
c               <   > [         TU ]  U5        X l        X0l        g r&   )r(   r)   r4   response)r,   r-   r4   rv   r.   s       r/   r)   HTTPStatusError.__init__	  s    ! r1   )r4   rv   )r-   r9   r4   r   rv   r   r:   r;   rK   rE   s   @r/   r   r     s    ! !r1   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r   i  z/
URL is improperly formed or cannot be parsed.
c                $   > [         TU ]  U5        g r&   r(   r)   r+   s     r/   r)   InvalidURL.__init__      !r1   rN   r8   rK   rE   s   @r/   r   r     s    " "r1   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r
   i  zz
Attempted to lookup a cookie by name, but multiple cookies existed.

Can occur when calling `response.cookies.get(...)`.
c                $   > [         TU ]  U5        g r&   rz   r+   s     r/   r)   CookieConflict.__init__  r|   r1   rN   r8   rK   rE   s   @r/   r
   r
     s    " "r1   r
   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r   i)  zw
The base class for stream exceptions.

The developer made an error in accessing the request stream in
an invalid way.
c                $   > [         TU ]  U5        g r&   rz   r+   s     r/   r)   StreamError.__init__1  r|   r1   rN   r8   rK   rE   s   @r/   r   r   )  s    " "r1   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r   i5  zQ
Attempted to read or stream content, but the content has already
been streamed.
c                (   > Sn[         TU ]  U5        g )Na]  Attempted to read or stream some content, but the content has already been streamed. For requests, this could be due to passing a generator as request content, and then receiving a redirect response or a secondary request as part of an authentication flow.For responses, this could be due to attempting to stream the response content more than once.rz   r+   s     r/   r)   StreamConsumed.__init__;  s    & 	 	!r1   rN   r:   r;   rK   rE   s   @r/   r   r   5  s    
	" 	"r1   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r   iG  zP
Attempted to read or stream response content, but the request has been
closed.
c                (   > Sn[         TU ]  U5        g )NzDAttempted to read or stream content, but the stream has been closed.rz   r+   s     r/   r)   StreamClosed.__init__M  s    U 	 	!r1   rN   r   rK   rE   s   @r/   r   r   G  s    
" "r1   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r   iT  zQ
Attempted to access streaming response content, without having called `read()`.
c                (   > Sn[         TU ]  U5        g )NzOAttempted to access streaming response content, without having called `read()`.rz   r+   s     r/   r)   ResponseNotRead.__init__Y      / 	 	!r1   rN   r   rK   rE   s   @r/   r   r   T      " "r1   r   c                  0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r   ia  zP
Attempted to access streaming request content, without having called `read()`.
c                (   > Sn[         TU ]  U5        g )NzNAttempted to access streaming request content, without having called `read()`.rz   r+   s     r/   r)   RequestNotRead.__init__f  r   r1   rN   r   rK   rE   s   @r/   r   r   a  r   r1   r   c              #  P   #     Sv   g! [          a  nU b  Xl        UeSnAff = f7f)z
A context manager that can be used to attach the given request context
to any `RequestError` exceptions that are raised within the block.
N)r   r4   )r4   excs     r/   request_contextr   n  s,      !K	s   &	 &
##&r&   )r4   rJ   r:   ztyping.Iterator[None])*r@   
__future__r   
contextlibtypingTYPE_CHECKING_modelsr   r   __all__	Exceptionr   r   r   r   r	   r   r"   r   r   r   r!   r   r   r   r    r   r   r   r   r   r   r   r
   r3   r   r   r   r   r   contextmanagerr   rN   r1   r/   <module>r      s  B #  	*@ 	  B 9   \ ~ % " # " >   <   . N  - L | 
!i 
!" ""Y ""	", 	""[ "$
"; 
"
"k 
"
"[ 
" " r1   