
    bCi$                     8   S r SSKrSSKrSSKJrJrJrJrJr  SSK	J
r
  SSKJr   SSKr\R                  r\(       a  SSKJrJrJrJr  OS=r=rrS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$\#\RJ                  5      r& " S% S&\#5      r' " S' S(\5      r( " S) S*\\)5      r* " S+ S,\ 5      r+\b7  \RX                  4r-\+\RX                  4r.\R^                  4r0\+\R^                  4r1O\2" 5       r-\+\)4r.\2" 5       r0\+4r1 " S- S./\1Q76 r3 " S/ S0/\.Q76 r4g! \ a    S=rr GNbf = f)1zHTTP related errors.    N)TYPE_CHECKINGAnyOptionalTupleUnion   )RawResponseMessage)LooseHeaders)ClientResponseConnectionKeyFingerprintRequestInfo)ClientErrorClientConnectionErrorClientOSErrorClientConnectorErrorClientProxyConnectionErrorClientSSLErrorClientConnectorSSLErrorClientConnectorCertificateErrorServerConnectionErrorServerTimeoutErrorServerDisconnectedErrorServerFingerprintMismatchClientResponseErrorClientHttpProxyErrorWSServerHandshakeErrorContentTypeErrorClientPayloadError
InvalidURLc                       \ rS rSrSrSrg)r   -   z(Base class for client connection errors. N__name__
__module____qualname____firstlineno____doc____static_attributes__r#       S/home/james-whalen/.local/lib/python3.13/site-packages/aiohttp/client_exceptions.pyr   r   -   s    2r+   r   c                       \ rS rSrSrSSSSS.S\S\\S4   S	\\	   S
\\	   S\
S\\   SS4S jjrS\
4S jrS\
4S jr\S\	4S j5       r\R"                  S\	SS4S j5       rSrg)r   1   zBase class for exceptions that occur after getting a response.

request_info: An instance of RequestInfo.
history: A sequence of responses, if redirects occurred.
status: HTTP status code.
message: Error message.
headers: Response headers.
N )codestatusmessageheadersrequest_infohistory.r0   r1   r2   r3   returnc                    Xl         Ub(  Ub  [        S5      e[        R                  " S[        SS9  Ub  X@l        OUb  X0l        OSU l        XPl        X`l        X l        X4U l	        g )NzSBoth code and status arguments are provided; code is deprecated, use status insteadz/code argument is deprecated, use status instead   
stacklevelr   )
r4   
ValueErrorwarningswarnDeprecationWarningr1   r2   r3   r5   args)selfr4   r5   r0   r1   r2   r3   s          r,   __init__ClientResponseError.__init__;   sw     )! =  MMA"
  KKDK!+	r+   c                 x    SR                  U R                  U R                  U R                  R                  5      $ )Nz{}, message={!r}, url={!r})formatr1   r2   r4   real_urlr@   s    r,   __str__ClientResponseError.__str__\   s2    +22KKLL&&
 	
r+   c                 >   U R                   < SU R                  < 3nU R                  S:w  a  USU R                  < 3-  nU R                  S:w  a  USU R                  < 3-  nU R                  b  USU R                  < 3-  n[        U 5      R                   SU S3$ )	Nz, r   z	, status=r/   z
, message=z
, headers=())r4   r5   r1   r2   r3   typer%   )r@   r?   s     r,   __repr__ClientResponseError.__repr__c   s    ##&b(89;;!i//D<<2j 011D<<#j 011Dt*%%&avQ//r+   c                 N    [         R                  " S[        SS9  U R                  $ Nz/code property is deprecated, use status insteadr8   r9   r<   r=   r>   r1   rF   s    r,   r0   ClientResponseError.codem   s#    =	

 {{r+   valuec                 D    [         R                  " S[        SS9  Xl        g rP   rQ   )r@   rS   s     r,   r0   rR   v   s    =	

 r+   )r?   r3   r5   r2   r4   r1   )r%   r&   r'   r(   r)   r   r   r   r   intstrr
   rA   rG   rM   propertyr0   setterr*   r#   r+   r,   r   r   1   s     # $*.,!, ~s*+,
 sm, , , ,', 
,B
 
0# 0 c   
[[# $  r+   r   c                       \ rS rSrSrSrg)r      zContentType found is not valid.r#   Nr$   r#   r+   r,   r   r      s    )r+   r   c                       \ rS rSrSrSrg)r      z!websocket server handshake error.r#   Nr$   r#   r+   r,   r   r      s    +r+   r   c                       \ rS rSrSrSrg)r      zHTTP proxy error.

Raised in :class:`aiohttp.connector.TCPConnector` if
proxy responds with status other than ``200 OK``
on ``CONNECT`` request.
r#   Nr$   r#   r+   r,   r   r      s    r+   r   c                       \ rS rSrSrSrg)TooManyRedirects   z%Client was redirected too many times.r#   Nr$   r#   r+   r,   r`   r`      s    /r+   r`   c                       \ rS rSrSrSrg)r      z$Base class for client socket errors.r#   Nr$   r#   r+   r,   r   r      s    .r+   r   c                       \ rS rSrSrSrg)r      zOSError error.r#   Nr$   r#   r+   r,   r   r      s    r+   r   c                      ^  \ rS rSrSrS\S\SS4U 4S jjr\S\4S j5       r	\S\
4S	 j5       r\S\\   4S
 j5       r\S\\\S4   4S j5       rS\
4S jr\R*                  rSrU =r$ )r      zwClient connector error.

Raised in :class:`aiohttp.connector.TCPConnector` if
    a connection can not be established.
connection_keyos_errorr6   Nc                 v   > Xl         X l        [        TU ]  UR                  UR
                  5        X4U l        g N)	_conn_key	_os_errorsuperrA   errnostrerrorr?   )r@   rh   ri   	__class__s      r,   rA   ClientConnectorError.__init__   s0    '!):):;#.	r+   c                     U R                   $ rk   )rm   rF   s    r,   ri   ClientConnectorError.os_error   s    ~~r+   c                 .    U R                   R                  $ rk   rl   hostrF   s    r,   rw   ClientConnectorError.host       ~~"""r+   c                 .    U R                   R                  $ rk   rl   portrF   s    r,   r|   ClientConnectorError.port   ry   r+   r   c                 .    U R                   R                  $ rk   )rl   sslrF   s    r,   r   ClientConnectorError.ssl   s    ~~!!!r+   c                     SR                  X R                  SL a  SU R                  5      $ U R                  U R                  5      $ )Nz6Cannot connect to host {0.host}:{0.port} ssl:{1} [{2}]TdefaultrD   r   rp   rF   s    r,   rG   ClientConnectorError.__str__   s@    GNNxx4/)t}}
 	
59XXt}}
 	
r+   )rl   rm   r?   )r%   r&   r'   r(   r)   r   OSErrorrA   rW   ri   rV   rw   r   rU   r|   r   
SSLContextboolr   rG   BaseException
__reduce__r*   __classcell__rq   s   @r,   r   r      s    /} / /D / '   #c # # #hsm # # "U:t]:; " "
 
 ))Jr+   r   c                       \ rS rSrSrSrg)r      z~Proxy connection error.

Raised in :class:`aiohttp.connector.TCPConnector` if
    connection to proxy can not be established.
r#   Nr$   r#   r+   r,   r   r      s    r+   r   c                   f   ^  \ rS rSrSrS\S\S\SS4U 4S jjr\	S\4S	 j5       r
S\4S
 jrSrU =r$ )UnixClientConnectorError   zUnix connector error.

Raised in :py:class:`aiohttp.connector.UnixConnector`
if connection to unix socket can not be established.
pathrh   ri   r6   Nc                 0   > Xl         [        TU ]	  X#5        g rk   )_pathrn   rA   )r@   r   rh   ri   rq   s       r,   rA   !UnixClientConnectorError.__init__   s     
2r+   c                     U R                   $ rk   r   rF   s    r,   r   UnixClientConnectorError.path   s    zzr+   c                     SR                  X R                  SL a  SU R                  5      $ U R                  U R                  5      $ )Nz4Cannot connect to unix socket {0.path} ssl:{1} [{2}]Tr   r   rF   s    r,   rG    UnixClientConnectorError.__str__   s@    ELLxx4/)t}}
 	
59XXt}}
 	
r+   r   )r%   r&   r'   r(   r)   rV   r   r   rA   rW   r   rG   r*   r   r   s   @r,   r   r      sY    33)63BI3	3 c  
 
 
r+   r   c                       \ rS rSrSrSrg)r      zServer connection errors.r#   Nr$   r#   r+   r,   r   r      s    #r+   r   c                   :    \ rS rSrSrSS\\\S4   SS4S jjrSr	g)	r      zServer disconnected.Nr2   r6   c                 *    Uc  SnU4U l         Xl        g )NzServer disconnectedr?   r2   )r@   r2   s     r,   rA    ServerDisconnectedError.__init__   s    ?+GJ	r+   r   rk   )
r%   r&   r'   r(   r)   r   r	   rV   rA   r*   r#   r+   r,   r   r      s+    &8#t&C D PT  r+   r   c                       \ rS rSrSrSrg)r      zServer timeout error.r#   Nr$   r#   r+   r,   r   r      s    r+   r   c            
       D    \ rS rSrSrS\S\S\S\SS4
S	 jrS\4S
 jr	Sr
g)r      z4SSL certificate does not match expected fingerprint.expectedgotrw   r|   r6   Nc                 F    Xl         X l        X0l        X@l        XX44U l        g rk   )r   r   rw   r|   r?   )r@   r   r   rw   r|   s        r,   rA   "ServerFingerprintMismatch.__init__   s"     		D/	r+   c                     SR                  U R                  R                  U R                  U R                  U R
                  U R                  5      $ )Nz/<{} expected={!r} got={!r} host={!r} port={!r}>)rD   rq   r%   r   r   rw   r|   rF   s    r,   rM   "ServerFingerprintMismatch.__repr__   s:    @GGNN##T]]DHHdii
 	
r+   )r?   r   r   rw   r|   )r%   r&   r'   r(   r)   bytesrV   rU   rA   rM   r*   r#   r+   r,   r   r      s9    >0 0U 0# 0S 0T 0
# 
r+   r   c                       \ rS rSrSrSrg)r   i  zResponse payload error.r#   Nr$   r#   r+   r,   r   r     s    !r+   r   c                   ^   ^  \ rS rSrSrS\SS4U 4S jjr\S\4S j5       rS\	4S jr
S	rU =r$ )
r    i	  zVInvalid URL.

URL used for fetching is malformed, e.g. it doesn't contains host
part.
urlr6   Nc                 $   > [         TU ]  U5        g rk   )rn   rA   )r@   r   rq   s     r,   rA   InvalidURL.__init__  s     	r+   c                      U R                   S   $ )Nr   )r?   rF   s    r,   r   InvalidURL.url  s    yy|r+   c                 P    SU R                   R                   SU R                   S3$ )N< >)rq   r%   r   rF   s    r,   rM   InvalidURL.__repr__  s&    4>>**+1TXXJa88r+   r#   )r%   r&   r'   r(   r)   r   rA   rW   r   rV   rM   r*   r   r   s   @r,   r    r    	  sG    C D 
 S  9# 9 9r+   r    c                       \ rS rSrSrSrg)r   i  zBase error for ssl.*Errors.r#   Nr$   r#   r+   r,   r   r     s    %r+   r   c                       \ rS rSrSrSrg)r   i7  zResponse ssl error.r#   Nr$   r#   r+   r,   r   r   7  s    r+   r   c                       \ rS rSrSrS\S\SS4S jr\S\4S j5       r	\S\
4S	 j5       r\S\\   4S
 j5       r\S\4S j5       rS\
4S jrSrg)r   i;  zResponse certificate error.rh   certificate_errorr6   Nc                 ,    Xl         X l        X4U l        g rk   )rl   _certificate_errorr?   )r@   rh   r   s      r,   rA   (ClientConnectorCertificateError.__init__>  s     ("3#7	r+   c                     U R                   $ rk   )r   rF   s    r,   r   1ClientConnectorCertificateError.certificate_errorE  s    &&&r+   c                 .    U R                   R                  $ rk   rv   rF   s    r,   rw   $ClientConnectorCertificateError.hostI  ry   r+   c                 .    U R                   R                  $ rk   r{   rF   s    r,   r|   $ClientConnectorCertificateError.portM  ry   r+   c                 .    U R                   R                  $ rk   )rl   is_sslrF   s    r,   r   #ClientConnectorCertificateError.sslQ  s    ~~$$$r+   c                 $    SR                  U 5      $ )Nz{Cannot connect to host {0.host}:{0.port} ssl:{0.ssl} [{0.certificate_error.__class__.__name__}: {0.certificate_error.args}])rD   rF   s    r,   rG   'ClientConnectorCertificateError.__str__U  s    **0&,	
r+   )r   rl   r?   )r%   r&   r'   r(   r)   r   	ExceptionrA   rW   r   rV   rw   r   rU   r|   r   r   rG   r*   r#   r+   r,   r   r   ;  s    %8+8@I8	8 '9 ' ' #c # # #hsm # # %T % %
 
r+   r   )5r)   asyncior<   typingr   r   r   r   r   http_parserr	   typedefsr
   r   r   ImportErrorclient_reqrepr   r   r   r   __all__r   r   r   r   r   r   r`   r   r   r   r   r   r   r   r   TimeoutErrorr   r   r   r;   r    r   CertificateErrorcert_errorscert_errors_basesSSLError
ssl_errorsssl_error_basestupler   r   r#   r+   r,   <module>r      s      = = + "J
 VV377K7.=,3) 3L+ L^** *,0 ,. 0* 0/K /)7 #*= #*L!5 
3 
.$1 $3  .0D0D  
 5 
 " "9j 9,&) & ?'')K
 ,,J%s||4O'K
 J%'O 
'8 
[	  C*s   F 
FF