+
    TŎi                         R t ^ RIt^ RIt^ RIHtHtHtHtHt ^RI	H
t
 ^RIHtHt Rt ! R R4      t ! R R4      t]! ]4       ! R	 R
]4      4       t]! ]4       ! R R]4      4       tR# )am  
Payload implementation for coroutines as data provider.

As a simple case, you can upload data from file::

   @aiohttp.streamer
   async def file_sender(writer, file_name=None):
      with open(file_name, 'rb') as f:
          chunk = f.read(2**16)
          while chunk:
              await writer.write(chunk)

              chunk = f.read(2**16)

Then you can use `file_sender` like this:

    async with session.post('http://httpbin.org/post',
                            data=file_sender(file_name='huge_file')) as resp:
        print(await resp.text())

..note:: Coroutine must accept `writer` as first argument

N)Any	AwaitableCallableDictTupleAbstractStreamWriter)Payloadpayload_typestreamerc                   D   a  ] tR t^#t o V 3R lR ltV 3R lR ltRtV tR# )_stream_wrapperc                |   < V ^8  d   QhRS[ RS[R,          3,          RS[S[R3,          RS[S[S[3,          RR/# )   coro.Nargskwargsreturn)r   r   r   r   r   str)format__classdict__s   "g/Users/ahmad/.openclaw/workspace/scripts/.venv/lib/python3.14/site-packages/aiohttp/payload_streamer.py__annotate___stream_wrapper.__annotate__$   sQ      sIdO+, CHo S#X	
 
    c                T    \         P                  ! V4      V n        W n        W0n        R # N)types	coroutiner   r   r   )selfr   r   r   s   &&&&r   __init___stream_wrapper.__init__$   s     OOD)		r   c                $   < V ^8  d   QhRS[ RR/# r   writerr   Nr   )r   r   s   "r   r   r   .   s     ; ;%9 ;d ;r   c                v   "   V P                   ! V.V P                  O5/ V P                  B G R j  xL
  R #  L5ir   )r   r   r   r   r$   s   &&r   __call___stream_wrapper.__call__.   s)     ii::dkk:::s   .979)r   r   r   N__name__
__module____qualname____firstlineno__r    r'   __static_attributes____classdictcell__r   s   @r   r   r   #   s      ; ;r   r   c                   D   a  ] tR t^2t o V 3R lR ltV 3R lR ltRtV tR# )r   c                F   < V ^8  d   QhRS[ RS[R,          3,          RR/# )r   r   .Nr   )r   r   )r   r   s   "r   r   streamer.__annotate__3   s)      Xc9T?&:;  r   c                L    \         P                  ! R \        ^R7       Wn        R# )z5@streamer is deprecated, use async generators instead)
stacklevelN)warningswarnDeprecationWarningr   )r   r   s   &&r   r    streamer.__init__3   s    C	

 	r   c                ,   < V ^8  d   QhRS[ RS[ RS[/# )r   r   r   r   )r   r   )r   r   s   "r   r   r3   ;   s"     8 8c 8S 8_ 8r   c                .    \        V P                  W4      # r   )r   r   )r   r   r   s   &*,r   r'   streamer.__call__;   s    tyy$77r   )r   Nr)   r0   s   @r   r   r   2   s      8 8r   c                   H   a  ] tR t^?t o V 3R lR ltRV 3R lR lltRtV tR# )StreamWrapperPayloadc                $   < V ^8  d   QhRS[ RR/# r#   r   )r   r   s   "r   r   !StreamWrapperPayload.__annotate__A        " ""6 "4 "r   c                D   "   V P                  V4      G R j  xL
  R #  L5ir   _valuer&   s   &&r   writeStreamWrapperPayload.writeA        kk&!!!     c                ,   < V ^8  d   QhRS[ RS[ RS[ /# )r   encodingerrorsr   )r   )r   r   s   "r   r   r@   D   s"     - -s -c - -r   c                    \        R 4      h)zUnable to decode.)	TypeError)r   rJ   rK   s   &&&r   decodeStreamWrapperPayload.decodeD   s    +,,r    N)zutf-8strict)r*   r+   r,   r-   rE   rN   r.   r/   r0   s   @r   r>   r>   ?   s     " "- - -r   r>   c                   P   a a ] tR t^Ht oV3R lV 3R lltV3R lR ltRtVtV ;t# )StreamPayloadc                0   < V ^8  d   QhRS[ RS[ RS[ RR/# )r   valuer   r   r   N)r   )r   r   s   "r   r   StreamPayload.__annotate__J   s)     3 3c 3# 3 3 3r   c                :   < \         SV `  ! V! 4       .VO5/ VB  R # r   )superr    )r   rU   r   r   	__class__s   &&*,r   r    StreamPayload.__init__J   s    24262r   c                $   < V ^8  d   QhRS[ RR/# r#   r   )r   r   s   "r   r   rV   M   rA   r   c                D   "   V P                  V4      G R j  xL
  R #  L5ir   rC   r&   s   &&r   rE   StreamPayload.writeM   rG   rH   rP   )	r*   r+   r,   r-   r    rE   r.   r/   __classcell__)rY   r   s   @@r   rS   rS   H   s     3 3" " "r   rS   )r   )__doc__r   r6   typingr   r   r   r   r   abcr   payloadr	   r
   __all__r   r   r>   rS   rP   r   r   <module>rd      sx   0   8 8 % *
; ;
8 
8 o-7 - - h"( " "r   