
    h;Y                        S SK r S SKrS SKrS SKrS SKrS SKrS SKJrJrJrJ	r	J
r
JrJrJr  SSKJrJrJrJrJrJrJr  SSKJr  SSKJrJrJr  \R8                  " \5      r\R>                  (       a$  \R@                  " S5      r!\RD                  " S5      r# " S	 S
\5      r$ " S S\5      r% " S S\5      r& " S S\&\ RN                  5      r( " S S\&5      r) " S S\&5      r*g)    N)BinaryIOCallableClassVar
Collection	GeneratorMappingSequenceType   )	JsonError
JsonObject	JsonValuecreate_objectget_boolget_enumget_str)CockpitProblem)EndpointRouterRoutingRule_T_Pc                   |   ^  \ rS rSr% S\S'   S\SS4U 4S jjrS\4S	 jrS
SS\S\	4S jr
S\SS4S jrS rSrU =r$ )ChannelRoutingRule&   zdict[str, list[Type[Channel]]]tablerouterchannel_typeszCollection[Type[Channel]]c                   > [         TU ]  U5        0 U l        U H:  nU R                  R                  UR                  / 5      nUR                  U5        M<     U R                  R                  5        H  nUR                  S SS9  M     g )Nc                 ,    [        U R                  5      $ N)lenrestrictions)clss    1/usr/lib/python3/dist-packages/cockpit/channel.py<lambda>-ChannelRoutingRule.__init__.<locals>.<lambda>5   s    s3+;+;'<    T)keyreverse)super__init__r   
setdefaultpayloadappendvaluessort)selfr   r   r$   entry	__class__s        r%   r,   ChannelRoutingRule.__init__)   ss     
 !CJJ))#++r:ELL ! ZZ&&(EJJ<dJK )r(   returnc                     0 nU R                   R                  5        H/  u  p#/ nU H  nUR                  UR                  5        M      XAU'   M1     U$ r!   )r   itemsextendcapabilities)r2   resultr.   implscapsimpls         r%   r:   ChannelRoutingRule.capabilities7   sO    )+"jj..0NG "DD--. "7O	 1
 r(   r#   zCollection[tuple[str, object]]optionsc                 ^    U H'  u  p4UR                  U5      nUc    gUc  M   XT:w  d  M'    g   g)NFT)get)r2   r#   r@   r)   expected_value	our_values         r%   check_restrictions%ChannelRoutingRule.check_restrictionsA   s=    #/CC(I   )i.I $0 r(   zChannel | Nonec                     U R                   c   eUR                  S5      n[        U[        5      (       d  g U R                  R                  U/ 5       H8  nU R                  UR                  U5      (       d  M&  U" U R                   5      s  $    g )Nr.   )r   rB   
isinstancestrr   rE   r#   )r2   r@   r.   r$   s       r%   
apply_ruleChannelRoutingRule.apply_ruleR   sv    {{&&&++i('3''::>>'2.C&&s'7'7AA4;;'' / r(   c                     g r!    r2   s    r%   shutdownChannelRoutingRule.shutdown_       r(   )r   )__name__
__module____qualname____firstlineno____annotations__r   r,   r   r:   boolrE   rJ   rO   __static_attributes____classcell__)r4   s   @r%   r   r   &   sg    ++Lv L6Q Lj /O Zd im "* 1A  r(   r   c                       \ rS rSrSrg)ChannelErrorc   rM   N)rR   rS   rT   rU   rX   rM   r(   r%   r[   r[   c   s    r(   r[   c                      \ rS rSr% SrSrSr\\S'   Sr	\
\S'   \r\
\S'   \\S	'   S
\S'   SrS\S'   S\S'   SrS\S'   SrS\S'   SrSr\\S'   S\S'   S\S\SS4S jrS\S\S\SS4S jrS S!S"S!S#\SS4S$ jrS%\SS4S& jrSJS' jrSJS( jrSJS) jrS\SS4S* jrS\SS4S+ jrS,\SS4S- jrS\S,\SS4S. jrS,\SS/4S0 jrS1\ SS4S2 jr!SS3.S,\S4\S\4S5 jjr"SJS6 jr#S\4S7 jr$SJS8 jr%S9 r&SKS: jr'SKSLS; jjr(S,\S\4S< jr)S,\S\4S= jr*S,\S\4S> jr+SKS?SS1\ S\4S@ jjr,SA r-SJSB jr.\/R`                  " SCSD9r1SE\SF'   S\S1\ SS4SG jr2S\SS4SH jr3SIr4g)MChannelg   i @  i    F_send_pingsr   _out_sequence_out_window
_ack_byteszset[asyncio.Task]_tasksNJsonObject | None_close_argszClassVar[str]r.   rM   z&ClassVar[Sequence[tuple[str, object]]]r#   zClassVar[Sequence[str]]r:    	is_binaryz codecs.IncrementalDecoder | Nonedecodercommandmessager6   c                 f   US:X  a  [        5       U l        [        US5      U l        [	        USSS9(       a  SU l        [        USS/S 5      S LU l        [        US	S
5      U l        [        USS/S 5      S LU l	        S U l
        U R                  5         U R                  U5        g US:X  a  U R                  5         g US:X  a  U R                  5         g US:X  a  U R                  5         g US:X  a  U R!                  U5        g US:X  a  U R#                  U5        g US:X  a  U R%                  U5        g g )Nopenchannelzflow-controlF)defaultTz	send-acksbytesgroupro   binaryrawreadydoneclosepingpongr@   )setrd   r   rn   r   r`   r   rc   rq   rh   ri   freeze_endpointdo_opendo_readydo_donedo_closedo_pingdo_pong
do_options)r2   rj   rk   s      r%   
do_controlChannel.do_control   s    f%DK"7I6DL?#' &wgYMUYYDO '9=DJ%gx%$GtSDNDL  "LL!MMOLLNMMOLL!LL!	!OOG$ "r(   rn   c                     U R                   b  g   U R                  X#5        g ! [         a  n[        S[	        U5      S9UeS nAff = f! [         a)  nU R                  UR                  5       5         S nAg S nAff = f)Nprotocol-errorrk   )rf   r   r   r[   rI   rv   	get_attrs)r2   rn   rj   rk   excs        r%   do_channel_controlChannel.do_channel_control   sr    '	(P1 P"#3SXFCOP 	(JJs}}''	(s,   # 
AAAA	 	
A<A77A<hostz
str | Nonerq   _messagec                 p    U R                   b  g Ub  g Ub  U R                  U:w  a  g U R                  5         g r!   )rf   rq   r~   )r2   r   rq   r   s       r%   do_killChannel.do_kill   s7    'u!4r(   r@   c                     [         er!   NotImplementedErrorr2   r@   s     r%   r{   Channel.do_open       !!r(   c                     g r!   rM   rN   s    r%   r|   Channel.do_ready   rQ   r(   c                     g r!   rM   rN   s    r%   r}   Channel.do_done   rQ   r(   c                 $    U R                  5         g r!   rv   rN   s    r%   r~   Channel.do_close   s    

r(   c                     [        SSS9e)Nznot-supportedz)This channel does not implement "options"r   )r[   r2   rk   s     r%   r   Channel.do_options   s    ?4_``r(   c                 &    U R                  U5        g r!   )	send_pongr   s     r%   r   Channel.do_ping   s    wr(   datac                 Z    U R                   (       a  U R                  S[        U5      S9  g g )Nack)rp   )rc   send_controlr"   r2   r   s     r%   send_ackChannel.send_ack   s%    ??e3t95 r(   c                     U R                   b  g  U R                  U5      (       d  U R                  U5        g g ! [         a)  nU R	                  UR                  5       5         S nAg S nAff = fr!   )rf   do_datar   r[   rv   r   )r2   rn   r   r   s       r%   do_channel_dataChannel.do_channel_data   s[    '	(<<%%d# & 	(JJs}}''	(s   '9 
A,A''A,zbool | Nonec                 &    AU R                  5         g)zHandles incoming data to the channel.

Return value is True if the channel takes care of send acks on its own,
in which case it should call self.send_ack() on `data` at some point.
None or False means that the acknowledgement is sent automatically.Tr   r   s     r%   r   Channel.do_data   s     

r(   kwargsc                 L    U R                  5         U R                  " SSS0UD6  g )Nrj   rt   rM   )thaw_endpointr   )r2   r   s     r%   rt   Channel.ready   s$    4'4V4r(   finalr   c                    U R                   c   e U R                   R                  XS9$ ! [         a  n[        S[	        U5      S9UeS nAff = f)Nr   r   r   )ri   decodeUnicodeDecodeErrorr[   rI   )r2   r   r   r   s       r%   __decode_frameChannel.__decode_frame   sV    ||'''	L<<&&t&99! 	L/SBK	Ls   * 
AAAc                 \    U R                   b  U R                  SSS9  U R                  SS9  g )Nr(   Tr   ru   )rj   )ri   _Channel__decode_framer   rN   s    r%   ru   Channel.done   s0    <<#40&)r(   c                     U R                   S L$ r!   )rf   rN   s    r%   
is_closingChannel.is_closing   s    t++r(   c                 :    U R                  U R                  5        g r!   )shutdown_endpointrf   rN   s    r%   
_close_nowChannel._close_now   s    t//0r(   c                     U R                   R                  U5        U R                  b#  U R                   (       d  U R                  5         g g g r!   )rd   removerf   r   )r2   tasks     r%   
_task_doneChannel._task_done   s:    
 	4 'OO 1<'r(   c                     U R                   b   e[        R                  " U5      nU R                  R	                  U5        UR                  U R                  5        U$ )zCreate a task associated with the channel.

All tasks must exit before the channel can close.  You may not create
new tasks after calling .close().
)rf   asynciocreate_taskrd   addadd_done_callbackr   )r2   	coroutinenamer   s       r%   r   Channel.create_task	  sM     '''""9-t/r(   c                     U R                   b  gU=(       d    0 U l         U R                  (       d  U R                  5         gg)zRequests the channel to be closed.

After you call this method, you won't get anymore `.do_*()` calls.

This will wait for any running tasks to complete before sending the
close message.
N)rf   rd   r   )r2   
close_argss     r%   rv   Channel.close  s6     '%+{{OO r(   c                 N   U R                  U R                  U5        U R                  (       a`  U R                  [	        U5      -   nU R                  [
        R                  -  U[
        R                  -  :w  a  U R                  SUS9  X l        U R                  U R                  :  $ )a[  Send binary data and handle book-keeping for flow control.

The flow control is "advisory".  The data is sent immediately, even if
it's larger than the window.  In general you should try to send packets
which are approximately Channel.BLOCK_SIZE in size.

Returns True if there is still room in the window, or False if you
should stop writing for now.  In that case, `.do_resume_send()` will be
called later when there is more room.

Be careful with text channels (i.e. without binary="raw"): you are responsible
for ensuring that @data is valid UTF-8. This isn't validated here for
efficiency reasons.
rw   )rj   sequence)	send_channel_datarn   r`   ra   r"   r^   
BLOCK_SIZEr   rb   )r2   r   out_sequences      r%   
send_bytesChannel.send_bytes$  s     	t||T2--D	9L!!W%7%77<7K]K];]]!!&<!H!-!!D$4$444r(   c                     U R                   (       a  U R                  U5      $ U R                  c  [        R                  " S5      " SS9U l        U R                  U R                  U5      5      $ )a  Send data and transparently handle UTF-8 for text channels

Use this for channels which can be text, but are not guaranteed to get
valid UTF-8 frames -- i.e. multi-byte characters may be split across
frames. This is expensive, so prefer send_text() or send_bytes() wherever
possible.
zutf-8strict)errors)rh   r   ri   codecsgetincrementaldecoder	send_textr   r   s     r%   	send_dataChannel.send_data=  sW     >>??4(( <<!77@QDL~~d11$788r(   c                 @    U R                  UR                  5       5      $ )zSend UTF-8 string data and handle book-keeping for flow control.

Similar to `send_bytes`, but for text data.  The data is sent as UTF-8 encoded bytes.
)r   encoder   s     r%   r   Channel.send_textN  s    
 t{{}--r(   msgc                 r    U R                   R                  [        X5      5      S-   nU R                  U5      $ )N
)json_encoderr   r   r   )r2   r   r   prettys       r%   	send_jsonChannel.send_jsonU  s1    ""))-*DEL~~f%%r(   c                     U R                   (       d!  [        R                  SU R                  5        g US   [        R
                  -   U l        U R                  U R                  :  a  U R                  5         g g )NzGot wild pong on channel %sr   )	r`   loggerwarningrn   r^   SEND_WINDOWrb   ra   do_resume_sendr   s     r%   r   Channel.do_pongY  s^    NN8$,,G":.1D1DD 0 00! 1r(   c                     g)z<Called to indicate that the channel may start sending again.NrM   rN   s    r%   r   Channel.do_resume_sendb  s    r(      )indentzClassVar[json.JSONEncoder]r   c                 B    U R                   " U R                  US 40 UD6  g r!   send_channel_controlrn   )r2   rj   r   s      r%   r   Channel.send_controlh  s    !!$,,HHr(   c                 >    U R                  U R                  SU5        g )Nrx   r   r   s     r%   r   Channel.send_pongk  s    !!$,,@r(   )
rc   rf   ra   rb   r`   rd   rn   ri   rq   rh   r6   Nr!   )r   re   r6   N)5rR   rS   rT   rU   r   r   r`   rW   rV   ra   intrb   rf   r#   r:   rn   rq   rI   r   r   r   r   r{   r|   r}   r~   r   r   rp   r   r   r   r   rt   r   ru   r   r   r   r   rv   r   r   r   r   r   r   jsonJSONEncoderr   r   r   rX   rM   r(   r%   r^   r^   g   sk   J!K KM3"K"  '+K$+ =?L:?.0L+0 GEO//%# %
 %t %8(# ( (j (UY (	L 	 	 	X\ 	"z "d "a* a a z  d  6U 6t 6
(s 
(% 
(D 
(	E 	m 	5i 5D 5 <A L5 LD LS L*,D ,1
5u 5 529e 9 9".c .d .&0 &9 &QU &"K 261A1A1KL.KIC I9 I IA A Ar(   r^   c                      \ rS rSr% SrSrS\S'   Sr\\S'   Sr	S\S	'   Sr
S
\S'   SrS\S'   Sr\\S'   Sr\\S'   S\R                  S\S\R"                  4S jrS\SS4S jrS&S jrS\R*                  SS4S jrS\4S jrS'S jrS\SS4S jrS(S jrS(S jrS\SS4S jrS(S jrS(S  jrS\4S! jr S" r!S(S# jr"S(S$ jr#S%r$g))ProtocolChannelio  a  A channel subclass that implements the asyncio Protocol interface.

In effect, data sent to this channel will be written to the connected
transport, and vice-versa.  Flow control is supported.

The default implementation of the .do_open() method calls the
.create_transport() abstract method.  This method should return a transport
which will be used for communication on the channel.

Otherwise, if the subclass implements .do_open() itself, it is responsible
for setting up the connection and ensuring that .connection_made() is called.
Nzasyncio.Transport | None
_transportT_send_pongsre   
_last_pingz&asyncio.Task[asyncio.Transport] | None_create_transport_task_ready_infoF_close_on_eof_eofloopr@   r6   c                    #    [         e7f)zCreates the transport for this channel, according to options.

The event loop for the transport is passed to the function.  The
protocol for the transport is the channel object, itself (self).

This needs to be implemented by the subclass.
r   )r2   r  r@   s      r%   create_transport ProtocolChannel.create_transport  s      "!   	c                     [         R                  " 5       n[         R                  " U R                  X!5      5      U l        U R                  R                  U R                  5        g r!   )r   get_running_loopr   r  r  r   create_transport_done)r2   r@   r  s      r%   r{   ProtocolChannel.do_open  sI    '')&-&9&9$:O:OPT:^&_###55d6P6PQr(   c                 V   XR                   L d   eS U l          UR                  5       nU R                  U5        U R                  b  U R                  " S0 U R                  D6  g U R                  5         g ! [         a)  nU R                  UR	                  5       5         S nAg S nAff = f)NrM   )r  r;   r[   rv   r   connection_mader  rt   )r2   r   	transportr   s       r%   r  %ProtocolChannel.create_transport_done  s    22222&*#	I
 	Y''JJ*))*JJL  	JJs}}'	s   A5 5
B(?B##B(r  c                 R    [        U[        R                  5      (       d   eXl        g r!   )rH   r   	Transportr  )r2   r  s     r%   r  ProtocolChannel.connection_made  s     )W%6%67777#r(   c                     0 $ r!   rM   rN   s    r%   _get_close_argsProtocolChannel._get_close_args  s    	r(   c                 B    U R                  U R                  5       5        g r!   )rv   r  )r2   r   s     r%   connection_lostProtocolChannel.connection_lost  s    

4'')*r(   r   c                 X    U R                   c   eU R                   R                  U5        g r!   )r  writer   s     r%   r   ProtocolChannel.do_data  s$    ***d#r(   c                     U R                   c   eU R                   R                  5       (       a  U R                   R                  5         g g r!   )r  can_write_eof	write_eofrN   s    r%   r}   ProtocolChannel.do_done  s:    ***??((**OO%%' +r(   c                 T    U R                   b  U R                   R                  5         g g r!   )r  rv   rN   s    r%   r~   ProtocolChannel.do_close  s!    ??&OO!!# 'r(   c                     U R                   c   e U R                  U5      (       d  U R                   R                  5         g g ! [         a)  nU R	                  UR                  5       5         S nAg S nAff = fr!   )r  r   pause_readingr[   rv   r   )r2   r   r   s      r%   data_receivedProtocolChannel.data_received  s`    ***	(>>$''--/ ( 	(JJs}}''	(s   0A 
A6A11A6c                 V    U R                   c   eU R                   R                  5         g r!   )r  resume_readingrN   s    r%   r   ProtocolChannel.do_resume_send  s"    ***&&(r(   c                     SU l         U R                  (       a*  U R                  c   eU R                  R                  5         gg)a|  Mark the channel to be closed on EOF.

Normally, ProtocolChannel tries to keep the channel half-open after
receiving EOF from the transport.  This instructs that the channel
should be closed on EOF.

If EOF was already received, then calling this function will close the
channel immediately.

If you don't call this function, you are responsible for closing the
channel yourself.
TN)r	  r
  r  rv   rN   s    r%   close_on_eofProtocolChannel.close_on_eof  s8     "99??...OO!!# r(   c                 R    SU l         U R                  5         U R                  (       + $ NT)r
  ru   r	  rN   s    r%   eof_receivedProtocolChannel.eof_received  s!    			%%%%r(   c                 V    U R                   (       a  U R                  U5        g Xl        g r!   )r  r   r  r   s     r%   r   ProtocolChannel.do_ping  s    NN7# &Or(   c                     SU l         g )NF)r  rN   s    r%   pause_writingProtocolChannel.pause_writing  s
     r(   c                 r    SU l         U R                  b#  U R                  U R                  5        S U l        g g r5  )r  r  r   rN   s    r%   resume_writingProtocolChannel.resume_writing  s0    ??&NN4??+"DO 'r(   )r	  r  r
  r  r  r  )r   zasyncio.Task[asyncio.Transport]r6   N)r   zException | Noner6   Nr   )%rR   rS   rT   rU   __doc__r  rV   r  rW   r  r  r  r	  r
  r   AbstractEventLoopr   r  r  r{   r  BaseTransportr  r  r  rp   r   r}   r~   r,  r   r2  r6  r   r;  r>  rX   rM   r(   r%   r  r  o  s    .2J*1K&*J#*GKDK'+K$+  M4D$"7+D+D "z "^e^o^o "Rz Rd R
$)>)> $4 $ +$E $d $(
$(% (D ()$$&d &&!#r(   r  c                       \ rS rSr% SrS\S'   \R                  \S'   SrS\	SS	4S
 jr
S\	SS4S jrSS jrS\SS4S jrSS jrS\SS4S jrSS jrS\	SS4S jrSS jrSS jrS\	SS4S jrS\S\4S jrSrg)AsyncChanneli  a  A subclass for async/await-style implementation of channels, with flow control

This subclass provides asynchronous `read()` and `write()` calls for
subclasses, with familiar semantics.  `write()` doesn't buffer, so the
`done()` method on the base channel class can be used in a way similar to
`shutdown()`.  A high-level `sendfile()` method is available to send the
entire contents of a binary-mode file-like object.

The subclass must provide an async `run()` function, which will be spawned
as a task.  The task is cancelled when the channel is closed.

On the receiving side, the channel will respond to flow control pings to
indicate that it has received the data, but only after it has been consumed
by `read()`.

On the sending side, write() will block if the channel backs up.
z(asyncio.Queue[bytes | JsonObject | None]receive_queuer  Nr@   r6   re   c                    #    [         e7fr!   r   r   s     r%   runAsyncChannel.run  s     !!r  c                   #     [         R                  " 5       U l        U R                  U R	                  U5      I S h  vN 5        g  N	! [         R
                   a    U R                  5          g [         a)  nU R                  UR                  5       5         S nAg S nAf[         a'  nU R                  S[        U5      S.5         S nAg S nAf[         a)    U R                  S[        R                  " 5       S.5        e f = f7f)Nr   )problemrk   zinternal-error)rJ  cause)r   r  r  rv   rG  CancelledErrorr[   r   r   rI   BaseException	traceback
format_exc)r2   r@   r   s      r%   run_wrapperAsyncChannel.run_wrapper  s     	002DIJJTXXg../.%% 	JJL 	(JJs}}'' 	KJJ#3CIJJ 	JJ#3i>R>R>TUV	s\   D9A	 AA	 DA	 	$D-D/	D8BDD)CD6DDc                    #     U R                   R                  5       I S h  vN nUc  g [        U[        5      (       a  U R	                  U5        OU R                  U5        U$ Mb   ND7fr!   )rE  rB   rH   r   r   r   )r2   items     r%   readAsyncChannel.read  s[     
 ++//11D|$((t$d# 1s   A(A&AA(r   c                    #    U R                  U5      (       d4  U R                  R                  5       U l        U R                  I S h  vN   g g  N7fr!   )r   r  create_futurewrite_waiterr   s     r%   r"  AsyncChannel.write-  s@     ~~d## $		 7 7 9D#### $#s   AAAAc                 `   #    U R                   R                  " S U/UQ70 UD6I S h  vN $  N7fr!   )r  run_in_executor)r2   fnargsr   s       r%   	in_threadAsyncChannel.in_thread2  s,     YY..tRI$I&IIIIs   %.,.streamc                 ,  #    U    U R                   R                  S UR                  [        R                  5      I S h  vN nUS:X  a  OU R                  U5      I S h  vN   M_  U R                  5         S S S 5        g  N? N!! , (       d  f       g = f7f)Nr(   )r  r[  rT  r^   r   r"  ru   )r2   r`  r   s      r%   sendfileAsyncChannel.sendfile5  sr     !YY66tV[['J\J\]]3;jj&&&	  IIK V] ' Vs?   B:BA? BB B6	B?BB
BBc                 d    U R                   b#  U R                   R                  S 5        S U l         g g r!   )rX  
set_resultrN   s    r%   r   AsyncChannel.do_resume_send?  s/    (((. $D )r(   c                     [         R                  " 5       U l        U R                  U R	                  U5      U R
                  R                   SU S3S9U l        g )Nz.run_wrapper())r   )r   QueuerE  r   rP  r4   rR   	_run_taskr   s     r%   r{   AsyncChannel.do_openD  sS    $]]_))$*:*:7*C26..2I2I1J-X_W``a/b * dr(   c                 :    U R                   R                  S 5        g r!   rE  
put_nowaitrN   s    r%   r}   AsyncChannel.do_doneI  s    %%d+r(   c                 8    U R                   R                  5         g r!   )rj  cancelrN   s    r%   r~   AsyncChannel.do_closeL  s    r(   rk   c                 :    U R                   R                  U5        g r!   rm  r   s     r%   r   AsyncChannel.do_pingO  s    %%g.r(   c                 :    U R                   R                  U5        gr5  rm  r   s     r%   r   AsyncChannel.do_dataR  s    %%d+r(   )rj  r  rE  rX  )r6   zbytes | None)r\  zCallable[_P, _T]r]  z_P.argsr   z	_P.kwargsr6   r   r   )rR   rS   rT   rU   r@  rV   r   rA  rX  r   rG  rP  rT  rp   r"  r^  r   rb  r   r{   r}   r~   r   rW   r   rX   rM   r(   r%   rD  rD    s    * >=

#
## L" "0C "  $ $$ $
JX $ %
dz dd d
, /z /d /E d r(   rD  c                   R    \ rS rSr% SrS\S'   S\SS4S jrS\SS4S	 jrSS
 jr	Sr
g)GeneratorChanneliW  a
  A trivial Channel subclass for sending data from a generator with flow control.

Calls the .do_yield_data() generator with the options from the open message
and sends the data which it yields.  If the generator returns a value it
will be used for the close message.
z"Generator[bytes, None, JsonObject]_GeneratorChannel__generatorr@   r6   c                     [         er!   r   r   s     r%   do_yield_dataGeneratorChannel.do_yield_data`  r   r(   Nc                 P    U R                  U5      U l        U R                  5         g r!   )r{  ry  r   r   s     r%   r{   GeneratorChannel.do_openc  s!    --g6r(   c                 6    U R                  [        U R                  5      5      (       a-   U R                  [        U R                  5      5      (       a  M,  g g ! [         a5  nU R	                  5         U R                  UR                  5         S nAg S nAff = fr!   )r   nextry  StopIterationru   rv   value)r2   stops     r%   r   GeneratorChannel.do_resume_sendg  sl    	#..d&6&6!788 ..d&6&6!788 	#IIKJJtzz""	#s   AA 
B#+BB)__generatorr   )rR   rS   rT   rU   r@  rV   r   r{  r{   r   rX   rM   r(   r%   rx  rx  W  s;     65"Z "4X "z d #r(   rx  )+r   r   r   loggingrN  typingr   r   r   r   r   r   r	   r
   jsonutilr   r   r   r   r   r   r   protocolr   r   r   r   r   	getLoggerrR   r   TYPE_CHECKINGTypeVarr   	ParamSpecr   r   r[   r^   Protocolr  rD  rx  rM   r(   r%   <module>r     s   $       _ _ _ b b b $ 1 1			8	$ 
		B			$	B: :z	> 	EAh EAP#gw// #Dc7 cL#w #r(   