+
    i;2                       R t ^ RIHt ^ RIt^RIHt . R?Ot ! R R]4      t ! R R]4      t	 ! R  R]	4      t
 ! R! R]	4      t ! R" R]4      t ! R# R	]4      t ! R$ R
]4      t ! R% R]4      t ! R& R]4      t ! R' R]4      t ! R( R]4      t ! R) R]4      t ! R* R]4      t ! R+ R]4      t ! R, R]4      t ! R- R]4      t ! R. R]4      t ! R/ R]4      t ! R0 R]4      t ! R1 R]4      t ! R2 R]4      t ! R3 R]4      t ! R4 R]4      t ! R5 R]4      t ! R6 R]] 4      t! ! R7 R]]"4      t#^R8I$H%t%H&t& ]! ]'! 4       R9R:R;R:R<R:R=R:/R>7       R# )@aU  
:mod:`websockets.exceptions` defines the following hierarchy of exceptions.

* :exc:`WebSocketException`
    * :exc:`ConnectionClosed`
        * :exc:`ConnectionClosedOK`
        * :exc:`ConnectionClosedError`
    * :exc:`InvalidURI`
    * :exc:`InvalidProxy`
    * :exc:`InvalidHandshake`
        * :exc:`SecurityError`
        * :exc:`ProxyError`
            * :exc:`InvalidProxyMessage`
            * :exc:`InvalidProxyStatus`
        * :exc:`InvalidMessage`
        * :exc:`InvalidStatus`
        * :exc:`InvalidStatusCode` (legacy)
        * :exc:`InvalidHeader`
            * :exc:`InvalidHeaderFormat`
            * :exc:`InvalidHeaderValue`
            * :exc:`InvalidOrigin`
            * :exc:`InvalidUpgrade`
        * :exc:`NegotiationError`
            * :exc:`DuplicateParameter`
            * :exc:`InvalidParameterName`
            * :exc:`InvalidParameterValue`
        * :exc:`AbortHandshake` (legacy)
        * :exc:`RedirectHandshake` (legacy)
    * :exc:`ProtocolError` (Sans-I/O)
    * :exc:`PayloadTooBig` (Sans-I/O)
    * :exc:`InvalidState` (Sans-I/O)
    * :exc:`ConcurrencyError`

)annotationsN)lazy_importWebSocketExceptionConnectionClosedConnectionClosedOKConnectionClosedError
InvalidURIInvalidProxyInvalidHandshakeSecurityError
ProxyErrorInvalidProxyMessageInvalidProxyStatusInvalidMessageInvalidStatusInvalidHeaderInvalidHeaderFormatInvalidHeaderValueInvalidOriginInvalidUpgradeNegotiationErrorDuplicateParameterInvalidParameterNameInvalidParameterValueProtocolErrorPayloadTooBigInvalidStateConcurrencyErrorc                      ] tR t^ItRtRtR# )r   z7
Base class for all exceptions defined by websockets.

 N__name__
__module____qualname____firstlineno____doc____static_attributes__r       \/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/websockets/exceptions.pyr   r   I       r'   c                  b    ] tR t^PtRtRR R lltR R lt]R R l4       t]R	 R
 l4       t	Rt
R# )r   a  
Raised when trying to interact with a closed connection.

Attributes:
    rcvd: If a close frame was received, its code and reason are available
        in ``rcvd.code`` and ``rcvd.reason``.
    sent: If a close frame was sent, its code and reason are available
        in ``sent.code`` and ``sent.reason``.
    rcvd_then_sent: If close frames were received and sent, this attribute
        tells in which order this happened, from the perspective of this
        side of the connection.

Nc               (    V ^8  d   QhRRRRRRRR/# )   rcvdzframes.Close | Nonesentrcvd_then_sentzbool | NonereturnNoner   )formats   "r(   __annotate__ConnectionClosed.__annotate___   s8     	Y 	Y!	Y "	Y $		Y
 
	Yr'   c                	    Wn         W n        W0n        V P                  R J V P                   R J ;'       g    V P                  R J 8X  g   Q hR # Nr-   r.   r/   )selfr-   r.   r/   s   &&&&r(   __init__ConnectionClosed.__init___   sH     		,##t+d1B1W1WdiiSWFWXXXr'   c                   V ^8  d   QhRR/# r,   r0   strr   )r2   s   "r(   r3   r4   j   s     J J Jr'   c                	.   V P                   f!   V P                  f   R# RV P                   R2# V P                  f   RV P                    R2# V P                  '       d   RV P                    RV P                   2# RV P                   RV P                    2# )Nzno close frame received or sentzsent z; no close frame receivedz	received z; no close frame sentz; then sent z; then received r7   r8   s   &r(   __str__ConnectionClosed.__str__j   s    99yy 8tyyk)BCCyy "499+-BCC&&&&tyykdii[II"499+-=dii[IIr'   c                   V ^8  d   QhRR/# )r,   r0   intr   )r2   s   "r(   r3   r4   |   s      c r'   c                	    \         P                  ! R \        4       V P                  f   \        P
                  P                  # V P                  P                  # )zZConnectionClosed.code is deprecated; use Protocol.close_code or ConnectionClosed.rcvd.code)warningswarnDeprecationWarningr-   frames	CloseCodeABNORMAL_CLOSUREcoder?   s   &r(   rK   ConnectionClosed.code{   sC    D	

 99##444yy~~r'   c                   V ^8  d   QhRR/# r<   r   )r2   s   "r(   r3   r4      s          r'   c                	    \         P                  ! R \        4       V P                  f   R# V P                  P                  # )z`ConnectionClosed.reason is deprecated; use Protocol.close_reason or ConnectionClosed.rcvd.reason )rE   rF   rG   r-   reasonr?   s   &r(   rP   ConnectionClosed.reason   s6    H	

 99yyr'   )r-   r/   r.   r6   )r!   r"   r#   r$   r%   r9   r@   propertyrK   rP   r&   r   r'   r(   r   r   P   s;    	YJ"      r'   c                      ] tR t^tRtRtR# )r   z
Like :exc:`ConnectionClosed`, when the connection terminated properly.

A close code with code 1000 (OK) or 1001 (going away) or without a code was
received and sent.

r   Nr    r   r'   r(   r   r          r'   c                      ] tR t^tRtRtR# )r   z
Like :exc:`ConnectionClosed`, when the connection terminated with an error.

A close frame with a code other than 1000 (OK) or 1001 (going away) was
received or sent, or the closing handshake didn't complete properly.

r   Nr    r   r'   r(   r   r      rT   r'   c                  2    ] tR t^tRtR R ltR R ltRtR# )r   zD
Raised when connecting to a URI that isn't a valid WebSocket URI.

c               $    V ^8  d   QhRRRRRR/# )r,   urir=   msgr0   r1   r   )r2   s   "r(   r3   InvalidURI.__annotate__   s!      C c d r'   c                	    Wn         W n        R # r6   rX   rY   )r8   rX   rY   s   &&&r(   r9   InvalidURI.__init__   s    r'   c                   V ^8  d   QhRR/# r<   r   )r2   s   "r(   r3   rZ      s     ; ; ;r'   c                	8    V P                    R V P                   2# )z isn't a valid URI: r\   r?   s   &r(   r@   InvalidURI.__str__   s    ((/z::r'   )rY   rX   Nr!   r"   r#   r$   r%   r9   r@   r&   r   r'   r(   r   r      s    
; ;r'   c                  2    ] tR t^tRtR R ltR R ltRtR# )r	   z7
Raised when connecting via a proxy that isn't valid.

c               $    V ^8  d   QhRRRRRR/# )r,   proxyr=   rY   r0   r1   r   )r2   s   "r(   r3   InvalidProxy.__annotate__   s!      c   r'   c                	    Wn         W n        R # r6   rd   rY   )r8   rd   rY   s   &&&r(   r9   InvalidProxy.__init__   s    
r'   c                   V ^8  d   QhRR/# r<   r   )r2   s   "r(   r3   re      s     ? ? ?r'   c                	8    V P                    R V P                   2# )z isn't a valid proxy: rg   r?   s   &r(   r@   InvalidProxy.__str__   s    **3DHH:>>r'   )rY   rd   Nra   r   r'   r(   r	   r	      s    
? ?r'   c                      ] tR t^tRtRtR# )r
   zE
Base class for exceptions raised when the opening handshake fails.

r   Nr    r   r'   r(   r
   r
      r)   r'   c                      ] tR t^tRtRtR# )r   z
Raised when a handshake request or response breaks a security rule.

Security limits can be configured with :doc:`environment variables
<../reference/variables>`.

r   Nr    r   r'   r(   r   r      rT   r'   c                      ] tR t^tRtRtR# )r   z-
Raised when failing to connect to a proxy.

r   Nr    r   r'   r(   r   r      r)   r'   c                      ] tR t^tRtRtR# )r   z3
Raised when an HTTP proxy response is malformed.

r   Nr    r   r'   r(   r   r      r)   r'   c                  2    ] tR t^tRtR R ltR R ltRtR# )r   z4
Raised when an HTTP proxy rejects the connection.

c                    V ^8  d   QhRRRR/# r,   responsezhttp11.Responser0   r1   r   )r2   s   "r(   r3   InvalidProxyStatus.__annotate__        ! ! !T !r'   c                	    Wn         R # r6   rs   r8   rs   s   &&r(   r9   InvalidProxyStatus.__init__        r'   c                   V ^8  d   QhRR/# r<   r   )r2   s   "r(   r3   rt      s     P P Pr'   c                	6    R V P                   P                  R 2# )z proxy rejected connection: HTTP drs   status_coder?   s   &r(   r@   InvalidProxyStatus.__str__   s    1$--2K2KA1NOOr'   rw   Nra   r   r'   r(   r   r      s    
!P Pr'   c                      ] tR t^tRtRtR# )r   z<
Raised when a handshake request or response is malformed.

r   Nr    r   r'   r(   r   r      r)   r'   c                  2    ] tR t^tRtR R ltR R ltRtR# )r   zB
Raised when a handshake response rejects the WebSocket upgrade.

c                    V ^8  d   QhRRRR/# rr   r   )r2   s   "r(   r3   InvalidStatus.__annotate__   ru   r'   c                	    Wn         R # r6   rw   rx   s   &&r(   r9   InvalidStatus.__init__   rz   r'   c                   V ^8  d   QhRR/# r<   r   )r2   s   "r(   r3   r      s     
 
 
r'   c                	6    R V P                   P                  R 2# )z+server rejected WebSocket connection: HTTP r}   r~   r?   s   &r(   r@   InvalidStatus.__str__   s    9$--:S:STU9VW	
r'   rw   Nra   r   r'   r(   r   r      s    
!
 
r'   c                  6    ] tR tRtRtR	R R lltR R ltRtR# )
r   i  zC
Raised when an HTTP header doesn't have a valid format or value.

Nc               $    V ^8  d   QhRRRRRR/# r,   namer=   value
str | Noner0   r1   r   )r2   s   "r(   r3   InvalidHeader.__annotate__
  s!      S  t r'   c                	    Wn         W n        R # r6   r   r   r8   r   r   s   &&&r(   r9   InvalidHeader.__init__
      	
r'   c                   V ^8  d   QhRR/# r<   r   )r2   s   "r(   r3   r     s     ? ? ?r'   c                	    V P                   f   RV P                   R2# V P                   R8X  d   RV P                   R2# RV P                   RV P                    2# )Nzmissing z headerrO   zempty zinvalid z	 header: r   r   r?   s   &r(   r@   InvalidHeader.__str__  sY    ::dii[00ZZ2DII;g..dii[	$**>>r'   r   r6   ra   r   r'   r(   r   r     s    
? ?r'   c                  2   a  ] tR tRtRtR V 3R lltRtV ;t# )r   i  zt
Raised when an HTTP header cannot be parsed.

The format of the header doesn't match the grammar for that header.

c          
     ,    V ^8  d   QhRRRRRRRRRR/# )	r,   r   r=   errorheaderposrC   r0   r1   r   )r2   s   "r(   r3    InvalidHeaderFormat.__annotate__  s6     @ @S @ @c @ @ @r'   c                	6   < \         SV `  W R V RV 24       R# )z at z in Nsuperr9   )r8   r   r   r   r   	__class__s   &&&&&r(   r9   InvalidHeaderFormat.__init__  s!    SEfX>?r'   r   r!   r"   r#   r$   r%   r9   r&   __classcell__r   s   @r(   r   r     s    @ @r'   c                      ] tR tRtRtRtR# )r   i#  zu
Raised when an HTTP header has a wrong value.

The format of the header is correct but the value isn't acceptable.

r   Nr    r   r'   r(   r   r   #  s    r'   c                  2   a  ] tR tRtRtR V 3R lltRtV ;t# )r   i,  z<
Raised when the Origin header in a request isn't allowed.

c                    V ^8  d   QhRRRR/# )r,   originr   r0   r1   r   )r2   s   "r(   r3   InvalidOrigin.__annotate__2  s     + +z +d +r'   c                	(   < \         SV `  R V4       R# )OriginNr   )r8   r   r   s   &&r(   r9   InvalidOrigin.__init__2  s    6*r'   r   r   r   s   @r(   r   r   ,  s    
+ +r'   c                      ] tR tRtRtRtR# )r   i6  z>
Raised when the Upgrade or Connection header isn't correct.

r   Nr    r   r'   r(   r   r   6  r)   r'   c                      ] tR tRtRtRtR# )r   i=  z?
Raised when negotiating an extension or a subprotocol fails.

r   Nr    r   r'   r(   r   r   =  r)   r'   c                  2    ] tR tRtRtR R ltR R ltRtR# )	r   iD  zC
Raised when a parameter name is repeated in an extension header.

c                    V ^8  d   QhRRRR/# r,   r   r=   r0   r1   r   )r2   s   "r(   r3   DuplicateParameter.__annotate__J        S T r'   c                	    Wn         R # r6   r   r8   r   s   &&r(   r9   DuplicateParameter.__init__J      	r'   c                   V ^8  d   QhRR/# r<   r   )r2   s   "r(   r3   r   M  s     3 3 3r'   c                	     R V P                    2# )zduplicate parameter: r   r?   s   &r(   r@   DuplicateParameter.__str__M  s    &tyyk22r'   r   Nra   r   r'   r(   r   r   D  s    
3 3r'   c                  2    ] tR tRtRtR R ltR R ltRtR# )	r   iQ  zB
Raised when a parameter name in an extension header is invalid.

c                    V ^8  d   QhRRRR/# r   r   )r2   s   "r(   r3   !InvalidParameterName.__annotate__W  r   r'   c                	    Wn         R # r6   r   r   s   &&r(   r9   InvalidParameterName.__init__W  r   r'   c                   V ^8  d   QhRR/# r<   r   )r2   s   "r(   r3   r   Z  s     6 6 6r'   c                	     R V P                    2# )zinvalid parameter name: r   r?   s   &r(   r@   InvalidParameterName.__str__Z  s    )$))55r'   r   Nra   r   r'   r(   r   r   Q  s    
6 6r'   c                  2    ] tR tRtRtR R ltR R ltRtR# )	r   i^  zC
Raised when a parameter value in an extension header is invalid.

c               $    V ^8  d   QhRRRRRR/# r   r   )r2   s   "r(   r3   "InvalidParameterValue.__annotate__d  s!      S   r'   c                	    Wn         W n        R # r6   r   r   s   &&&r(   r9   InvalidParameterValue.__init__d  r   r'   c                   V ^8  d   QhRR/# r<   r   )r2   s   "r(   r3   r   h  s     L L Lr'   c                	    V P                   f   RV P                   2# V P                   R8X  d   RV P                   2# RV P                   RV P                    2# )Nzmissing value for parameter rO   zempty value for parameter zinvalid value for parameter z: r   r?   s   &r(   r@   InvalidParameterValue.__str__h  sU    ::1$))==ZZ2/		{;;1$))BtzzlKKr'   r   Nra   r   r'   r(   r   r   ^  s    
L Lr'   c                      ] tR tRtRtRtR# )r   iq  z
Raised when receiving or sending a frame that breaks the protocol.

The Sans-I/O implementation raises this exception when:

* receiving or sending a frame that contains invalid data;
* receiving or sending an invalid sequence of frames.

r   Nr    r   r'   r(   r   r   q  s    r'   c                  B    ] tR tRtRtRR R lltR R ltR R	 ltR
tR# )r   i}  a=  
Raised when parsing a frame with a payload that exceeds the maximum size.

The Sans-I/O layer uses this exception internally. It doesn't bubble up to
the I/O layer.

The :meth:`~websockets.extensions.Extension.decode` method of extensions
must raise :exc:`PayloadTooBig` if decoding a frame would exceed the limit.

Nc               (    V ^8  d   QhRRRRRRRR/# )r,   size_or_messagezint | None | strmax_size
int | Nonecurrent_sizer0   r1   r   )r2   s   "r(   r3   PayloadTooBig.__annotate__  s2     0 0)0 0 !	0
 
0r'   c                	    \        V\        4      '       d0   Ve   Q hVe   Q h\        P                  ! R\        4       Wn        R # R V n        Wn        Vf   Q hW n        R V n        V P                  V4       R # )NzMPayloadTooBig(message) is deprecated; change to PayloadTooBig(size, max_size))

isinstancer=   rE   rF   rG   messagesizer   r   set_current_size)r8   r   r   r   s   &&&&r(   r9   PayloadTooBig.__init__  sw     os++###'''MM:"
 (7LDL$3I'''!)M,0D!!,/r'   c                   V ^8  d   QhRR/# r<   r   )r2   s   "r(   r3   r     s     
 
 
r'   c                	    V P                   e   V P                   # RpV P                  e   VRV P                   R2,          pV P                  e   VRV P                   R2,          pVRV P                   R2,          pV# )Nzframe zwith z bytes zafter reading zexceeds limit of z bytes)r   r   r   r   )r8   r   s   & r(   r@   PayloadTooBig.__str__  s    <<#<<Gyy$U499+W55  ,^D,=,=+>gFF*4==/@@GNr'   c                    V ^8  d   QhRRRR/# )r,   r   r   r0   r1   r   )r2   s   "r(   r3   r     s     - -Z -D -r'   c                	p    V P                   e   Q hVe"   V ;P                  V,          un        Wn         R # R # r6   )r   r   )r8   r   s   &&r(   r   PayloadTooBig.set_current_size  s3      (((#MM\)M , $r'   )r   r   r   r   )NN)	r!   r"   r#   r$   r%   r9   r@   r   r&   r   r'   r(   r   r   }  s    	0.
- -r'   c                      ] tR tRtRtRtR# )r   i  a~  
Raised when sending a frame is forbidden in the current state.

Specifically, the Sans-I/O layer raises this exception when:

* sending a data frame to a connection in a state other
  :attr:`~websockets.protocol.State.OPEN`;
* sending a control frame to a connection in a state other than
  :attr:`~websockets.protocol.State.OPEN` or
  :attr:`~websockets.protocol.State.CLOSING`.

r   Nr    r   r'   r(   r   r     s    r'   c                      ] tR tRtRtRtR# )r   i  z
Raised when receiving or sending messages concurrently.

WebSocket is a connection-oriented protocol. Reads must be serialized; so
must be writes. However, reading and writing concurrently is possible.

r   Nr    r   r'   r(   r   r     rT   r'   )rH   http11AbortHandshakez.legacy.exceptionsInvalidStatusCodeRedirectHandshakeWebSocketProtocolError)deprecated_aliases)r   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )(r%   
__future__r   rE   importsr   __all__	Exceptionr   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   AssertionErrorr   RuntimeErrorr   rO   rH   r   globalsr   r'   r(   <module>r      s  !F #   < ? ) ? D) , ;# ;?% ?) $ ! * 
P 
P% 
$ 
?$ ?&	@- 	@ +M +] ' 
3) 
3
6+ 
6L, L&	& 	3-& 3-l%~ )<   I 	.11 "6	r'   