Files
Trancribe/venv/lib/python3.12/site-packages/websockets/__pycache__/exceptions.cpython-312.pyc

208 lines
18 KiB
Plaintext
Raw Normal View History

<EFBFBD>
$n!j;2<00><01><><00>dZddlmZddlZddlmZgd<06>ZGd<07>de<07>ZGd <09>d
e<08>Z Gd <0B>d e <09>Z
Gd <0A>de <09>Z Gd<0F>de<08>Z Gd<11>de<08>Z Gd<13>de<08>ZGd<15>de<0E>ZGd<17>de<0E>ZGd<19>de<10>ZGd<1B>de<10>ZGd<1D>de<0E>ZGd<1F>d e<0E>ZGd!<21>d"e<0E>ZGd#<23>d$e<15>ZGd%<25>d&e<15>ZGd'<27>d(e<15>ZGd)<29>d*e<15>ZGd+<2B>d,e<0E>ZGd-<2D>d.e<1A>ZGd/<2F>d0e<1A>ZGd1<64>d2e<1A>ZGd3<64>d4e<08>ZGd5<64>d6e<08>ZGd7<64>d8ee <20>Z!Gd9<64>d:ee"<22>Z#dd;l$m%Z%m&Z&ee'<27>d<d<d<d<d=<3D><04>><3E>y)?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`
<EFBFBD>)<01> annotationsN<73>)<01> lazy_import)<1A>WebSocketException<6F>ConnectionClosed<65>ConnectionClosedOK<4F>ConnectionClosedError<6F>
InvalidURI<EFBFBD> InvalidProxy<78>InvalidHandshake<6B> SecurityError<6F>
ProxyError<EFBFBD>InvalidProxyMessage<67>InvalidProxyStatus<75>InvalidMessage<67> InvalidStatus<75> InvalidHeader<65>InvalidHeaderFormat<61>InvalidHeaderValue<75> InvalidOrigin<69>InvalidUpgrade<64>NegotiationError<6F>DuplicateParameter<65>InvalidParameterName<6D>InvalidParameterValue<75> ProtocolError<6F> PayloadTooBig<69> InvalidState<74>ConcurrencyErrorc<01><00>eZdZdZy)rz?
Base class for all exceptions defined by websockets.
N<><04>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__<5F><00><00>W/home/jean/linux-transcriber/venv/lib/python3.12/site-packages/websockets/exceptions.pyrrI<00><00><00>r'rc<01>V<00>eZdZdZ d dd<03>Zd d<04>Zed
d<05><04>Zed d<06><04>Zy) ra
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<01><><00>||_||_||_|jdu|jduxs|jduk(sJ<00>y<00>N<><03>rcvd<76>sent<6E>rcvd_then_sent)<04>selfr.r/r0s r(<00>__init__zConnectionClosed.__init___sK<00><00> <19><04> <09><18><04> <09>,<2C><04><1B><14>#<23>#<23>t<EFBFBD>+<2B><14><19><19>d<EFBFBD>1B<31>1W<31>d<EFBFBD>i<EFBFBD>i<EFBFBD>SW<53>FW<46>X<>X<>Xr'c<01><00>|j<00>|j<00>yd|j<00>d<03>S|j<00>d|j<00>d<05>S|jrd|j<00>d|j<00><00>Sd|j<00>d|j<00><00>S)Nzno close frame received or sentzsent z; no close frame receivedz received z; no close frame sentz ; then sent z; then received r-<00>r1s r(<00>__str__zConnectionClosed.__str__js<><00><00> <0F>9<EFBFBD>9<EFBFBD> <1C><13>y<EFBFBD>y<EFBFBD> <20>8<><1E>t<EFBFBD>y<EFBFBD>y<EFBFBD>k<EFBFBD>)B<>C<>C<><13>y<EFBFBD>y<EFBFBD> <20>"<22>4<EFBFBD>9<EFBFBD>9<EFBFBD>+<2B>-B<>C<>C<><17>&<26>&<26>&<26>t<EFBFBD>y<EFBFBD>y<EFBFBD>k<EFBFBD><1C>d<EFBFBD>i<EFBFBD>i<EFBFBD>[<5B>I<>I<>"<22>4<EFBFBD>9<EFBFBD>9<EFBFBD>+<2B>-=<3D>d<EFBFBD>i<EFBFBD>i<EFBFBD>[<5B>I<>Ir'c<01><><00>tjdt<00>|j<00>tj
j S|jjS)NzZConnectionClosed.code is deprecated; use Protocol.close_code or ConnectionClosed.rcvd.code)<08>warnings<67>warn<72>DeprecationWarningr.<00>frames<65> CloseCode<64>ABNORMAL_CLOSURE<52>coder4s r(r=zConnectionClosed.code{sC<00><00><10> <0A> <0A> D<01> <1E>
<EFBFBD>
<10>9<EFBFBD>9<EFBFBD> <1C><19>#<23>#<23>4<>4<> 4<><13>y<EFBFBD>y<EFBFBD>~<7E>~<7E>r'c<01>|<00>tjdt<00>|j<00>y|jjS)Nz`ConnectionClosed.reason is deprecated; use Protocol.close_reason or ConnectionClosed.rcvd.reason<6F>)r7r8r9r.<00>reasonr4s r(r@zConnectionClosed.reason<6F>s6<00><00><10> <0A> <0A> H<01> <1E>
<EFBFBD>
<10>9<EFBFBD>9<EFBFBD> <1C><15><13>y<EFBFBD>y<EFBFBD><1F><1F>r'r,)r.<00>frames.Close | Noner/rAr0z bool | None<6E>return<72>None<6E>rB<00>str)rB<00>int) r"r#r$r%r2r5<00>propertyr=r@r&r'r(rrPsj<00><00> <08>$'+<2B> Y<01>!<21> Y<01>"<22> Y<01>$<24> Y<01>
<0E> Y<01> J<01>"<0E><1E><0E><1E><0E> <20><0E> r'rc<01><00>eZdZdZy)rz<>
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.
Nr!r&r'r(rr<00><00><00><00>r'rc<01><00>eZdZdZy)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.
Nr!r&r'r(r r <00>rIr'r c<01> <00>eZdZdZdd<02>Zdd<03>Zy)r
zL
Raised when connecting to a URI that isn't a valid WebSocket URI.
c<01> <00>||_||_yr,<00><02>uri<72>msg)r1rNrOs r(r2zInvalidURI.__init__<5F>s<00><00><16><04><08><16><04>r'c<01>8<00>|j<00>d|j<00><00>S)Nz isn't a valid URI: rMr4s r(r5zInvalidURI.__str__<5F>s<00><00><16>(<28>(<28><1A>/<2F><04><08><08>z<EFBFBD>:<3A>:r'N)rNrErOrErBrCrD<00>r"r#r$r%r2r5r&r'r(r
r
<00>s<00><00><08>
<17>;r'r
c<01> <00>eZdZdZdd<02>Zdd<03>Zy)r z?
Raised when connecting via a proxy that isn't valid.
c<01> <00>||_||_yr,<00><02>proxyrO)r1rUrOs r(r2zInvalidProxy.__init__<5F>s<00><00><1A><04>
<EFBFBD><16><04>r'c<01>8<00>|j<00>d|j<00><00>S)Nz isn't a valid proxy: rTr4s r(r5zInvalidProxy.__str__<5F>s<00><00><16>*<2A>*<2A><1C>3<>D<EFBFBD>H<EFBFBD>H<EFBFBD>:<3A>><3E>>r'N)rUrErOrErBrCrDrQr&r'r(r r <00>s<00><00><08>
<17>?r'r c<01><00>eZdZdZy)r zM
Base class for exceptions raised when the opening handshake fails.
Nr!r&r'r(r r <00>r)r'r c<01><00>eZdZdZy)r z<>
Raised when a handshake request or response breaks a security rule.
Security limits can be configured with :doc:`environment variables
<../reference/variables>`.
Nr!r&r'r(r r <00>rIr'r c<01><00>eZdZdZy)rz5
Raised when failing to connect to a proxy.
Nr!r&r'r(rr<00>r)r'rc<01><00>eZdZdZy)rz;
Raised when an HTTP proxy response is malformed.
Nr!r&r'r(rr<00>r)r'rc<01> <00>eZdZdZdd<02>Zdd<03>Zy)rz<
Raised when an HTTP proxy rejects the connection.
c<01><00>||_yr,<00><01>response<73>r1r^s r(r2zInvalidProxyStatus.__init__<5F><00> <00><00> <20><04> r'c<01>6<00>d|jjd<02><04>S)Nz proxy rejected connection: HTTP <20>d<>r^<00> status_coder4s r(r5zInvalidProxyStatus.__str__<5F>s<00><00>1<>$<24>-<2D>-<2D>2K<32>2K<32>A<EFBFBD>1N<31>O<>Or'N<>r^zhttp11.ResponserBrCrDrQr&r'r(rr<00>s<00><00><08>
!<21>Pr'rc<01><00>eZdZdZy)rzD
Raised when a handshake request or response is malformed.
Nr!r&r'r(rr<00>r)r'rc<01> <00>eZdZdZdd<02>Zdd<03>Zy)rzJ
Raised when a handshake response rejects the WebSocket upgrade.
c<01><00>||_yr,r]r_s r(r2zInvalidStatus.__init__<5F>r`r'c<01>6<00>d|jjd<02><04>S)Nz+server rejected WebSocket connection: HTTP rbrcr4s r(r5zInvalidStatus.__str__<5F>s<00><00>9<>$<24>-<2D>-<2D>:S<>:S<>TU<54>9V<39> W<>
r'NrerDrQr&r'r(rr<00>s<00><00><08>
!<21>
r'rc<01>"<00>eZdZdZddd<03>Zdd<04>Zy)rzK
Raised when an HTTP header doesn't have a valid format or value.
Nc<01> <00>||_||_yr,<00><02>name<6D>value<75>r1rmrns r(r2zInvalidHeader.__init__
<00><00><00><18><04> <09><1A><04>
r'c<01><><00>|j<00>d|j<00>d<02>S|jdk(rd|j<00>d<02>Sd|j<00>d|j<00><00>S)Nzmissing z headerr?zempty zinvalid z header: <20>rnrmr4s r(r5zInvalidHeader.__str__sY<00><00> <0F>:<3A>:<3A> <1D><1D>d<EFBFBD>i<EFBFBD>i<EFBFBD>[<5B><07>0<> 0<> <11>Z<EFBFBD>Z<EFBFBD>2<EFBFBD> <1D><1B>D<EFBFBD>I<EFBFBD>I<EFBFBD>;<3B>g<EFBFBD>.<2E> .<2E><1D>d<EFBFBD>i<EFBFBD>i<EFBFBD>[<5B> <09>$<24>*<2A>*<2A><1C>><3E> >r'r,<00>rmrErn<00>
str | NonerBrCrDrQr&r'r(rrs<00><00><08>
<1B>?r'rc<01>$<00><00>eZdZdZd<03>fd<02> Z<04>xZS)rz<>
Raised when an HTTP header cannot be parsed.
The format of the header doesn't match the grammar for that header.
c<01>6<00><01>t<00>|<00>||<02>d|<04>d|<03><00><05>y)Nz at z in <20><02>superr2)r1rm<00>error<6F>header<65>pos<6F> __class__s <20>r(r2zInvalidHeaderFormat.__init__s#<00><><00> <0A><07><18><14>%<25><17><04>S<EFBFBD>E<EFBFBD><14>f<EFBFBD>X<EFBFBD>><3E>?r')
rmrEryrErzrEr{rFrBrC<00>r"r#r$r%r2<00> __classcell__<5F>r|s@r(rrs<00><><00><08>@<01>@r'rc<01><00>eZdZdZy)rz<>
Raised when an HTTP header has a wrong value.
The format of the header is correct but the value isn't acceptable.
Nr!r&r'r(rr#s<00><00>r'rc<01>$<00><00>eZdZdZd<03>fd<02> Z<04>xZS)rzD
Raised when the Origin header in a request isn't allowed.
c<01>&<00><01>t<00>|<00>d|<01>y)N<>Originrw)r1<00>originr|s <20>r(r2zInvalidOrigin.__init__2s<00><><00> <0A><07><18><18>6<EFBFBD>*r')r<>rtrBrCr}rs@r(rr,s<00><><00><08>
+<2B>+r'rc<01><00>eZdZdZy)rzF
Raised when the Upgrade or Connection header isn't correct.
Nr!r&r'r(rr6r)r'rc<01><00>eZdZdZy)rzG
Raised when negotiating an extension or a subprotocol fails.
Nr!r&r'r(rr=r)r'rc<01> <00>eZdZdZdd<02>Zdd<03>Zy)rzK
Raised when a parameter name is repeated in an extension header.
c<01><00>||_yr,<00>rm<00>r1rms r(r2zDuplicateParameter.__init__J<00> <00><00><18><04> r'c<01> <00>d|j<00><00>S)Nzduplicate parameter: r<>r4s r(r5zDuplicateParameter.__str__Ms<00><00>&<26>t<EFBFBD>y<EFBFBD>y<EFBFBD>k<EFBFBD>2<>2r'N<>rmrErBrCrDrQr&r'r(rrDs<00><00><08>
<19>3r'rc<01> <00>eZdZdZdd<02>Zdd<03>Zy)rzJ
Raised when a parameter name in an extension header is invalid.
c<01><00>||_yr,r<>r<>s r(r2zInvalidParameterName.__init__Wr<>r'c<01> <00>d|j<00><00>S)Nzinvalid parameter name: r<>r4s r(r5zInvalidParameterName.__str__Zs<00><00>)<29>$<24>)<29>)<29><1B>5<>5r'Nr<4E>rDrQr&r'r(rrQs<00><00><08>
<19>6r'rc<01> <00>eZdZdZdd<02>Zdd<03>Zy)rzK
Raised when a parameter value in an extension header is invalid.
c<01> <00>||_||_yr,rlros r(r2zInvalidParameterValue.__init__drpr'c<01><><00>|j<00>d|j<00><00>S|jdk(rd|j<00><00>Sd|j<00>d|j<00><00>S)Nzmissing value for parameter r?zempty value for parameter zinvalid value for parameter z: rrr4s r(r5zInvalidParameterValue.__str__hsU<00><00> <0F>:<3A>:<3A> <1D>1<>$<24>)<29>)<29><1B>=<3D> =<3D> <11>Z<EFBFBD>Z<EFBFBD>2<EFBFBD> <1D>/<2F><04> <09> <09>{<7B>;<3B> ;<3B>1<>$<24>)<29>)<29><1B>B<EFBFBD>t<EFBFBD>z<EFBFBD>z<EFBFBD>l<EFBFBD>K<> Kr'NrsrDrQr&r'r(rr^s<00><00><08>
<1B>Lr'rc<01><00>eZdZdZy)ra
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.
Nr!r&r'r(rrqs<00><00>r'rc<01><<00>eZdZdZ d dd<03>Zdd<04>Zd d<05>Zy)
raU
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<01><><00>t|t<00>r*|<02>J<00>|<03>J<00>tjdt<00>||_yd|_||_|<02>J<00>||_d|_|j|<03>y)NzMPayloadTooBig(message) is deprecated; change to PayloadTooBig(size, max_size))
<EFBFBD>
isinstancerEr7r8r9<00>message<67>size<7A>max_size<7A> current_size<7A>set_current_size)r1<00>size_or_messager<65>r<>s r(r2zPayloadTooBig.__init__<5F>sz<00><00> <16>o<EFBFBD>s<EFBFBD> +<2B><1B>#<23> #<23>#<23><1F>'<27> '<27>'<27> <14>M<EFBFBD>M<EFBFBD>:<3A>"<22> <0E>
(7<>D<EFBFBD>L<EFBFBD><1F>D<EFBFBD>L<EFBFBD>$3<>D<EFBFBD>I<EFBFBD><1B>'<27> '<27>'<27>!)<29>D<EFBFBD>M<EFBFBD>,0<>D<EFBFBD> <1D> <10> !<21> !<21>,<2C> /r'c<01><><00>|j<00> |jSd}|j<00>|d|j<00>d<03>z }|j<00>|d|j<00>d<03>z }|d|j<00>d<06>z }|S)Nzframe zwith z bytes zafter reading zexceeds limit of z bytes)r<>r<>r<>r<>)r1r<>s r(r5zPayloadTooBig.__str__<5F>s<00><00> <0F><<3C><<3C> #<23><17><<3C><<3C> <1F><1E>G<EFBFBD><13>y<EFBFBD>y<EFBFBD>$<24><17>U<EFBFBD>4<EFBFBD>9<EFBFBD>9<EFBFBD>+<2B>W<EFBFBD>5<>5<><07><13> <20> <20>,<2C><17>^<5E>D<EFBFBD>,=<3D>,=<3D>+><3E>g<EFBFBD>F<>F<><07> <13>*<2A>4<EFBFBD>=<3D>=<3D>/<2F><16>@<40> @<40>G<EFBFBD><1A>Nr'c<01>^<00>|j<00>J<00>|<01>|xj|z c_||_yyr,)r<>r<>)r1r<>s r(r<>zPayloadTooBig.set_current_size<7A>s5<00><00><13> <20> <20>(<28>(<28>(<28> <17> #<23> <10>M<EFBFBD>M<EFBFBD>\<5C> )<29>M<EFBFBD> ,<2C>D<EFBFBD> <1D> $r')NN)r<>zint | None | strr<72><00>
int | Noner<65>r<>rBrCrD)r<>r<>rBrC)r"r#r$r%r2r5r<>r&r'r(rr}sD<00><00> <08> $<24>#'<27> 0<>)<29>0<><1D>0<>!<21> 0<>
<0E> 0<>.
<1B>-r'rc<01><00>eZdZdZy)ra<>
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`.
Nr!r&r'r(rr<00>s<00><00> r'rc<01><00>eZdZdZy)rz<>
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.
Nr!r&r'r(rr<00>rIr'r)r:<00>http11z.legacy.exceptions)<04>AbortHandshake<6B>InvalidStatusCode<64>RedirectHandshake<6B>WebSocketProtocolError)<01>deprecated_aliases)(r%<00>
__future__rr7<00>importsr<00>__all__<5F> Exceptionrrrr r
r r r rrrrrrrrrrrrrrrr<00>AssertionErrorr<00> RuntimeErrorrr?r:r<><00>globalsr&r'r(<00><module>r<>s<><00><01>!<04>F#<23><0F> <20> <02><07><<08><19><08>? <20>)<29>? <20>D<08>)<29><08><08>,<2C><08> ;<3B>#<23> ;<3B> ?<3F>%<25> ?<3F><08>)<29><08><08>$<24><08><08>!<21><08><08>*<2A><08>
P<01><1A>
P<01><08>%<25><08> 
<EFBFBD>$<24> 
<EFBFBD>?<3F>$<24>?<3F>& @<01>-<2D> @<01><08><1D><08>+<2B>M<EFBFBD>+<2B><08>]<5D><08><08>'<27><08>
3<>)<29>
3<>
6<>+<2B>
6<>L<01>,<2C>L<01>& <08>&<26> <08>3-<2D>&<26>3-<2D>l <08>%<25>~<7E> <08><08>)<29><<3C><08><1D> <0C> <0B>I<EFBFBD>/<2F>1<>1<>"6<> <06> r'