+
    ,i|  c                   s2   ^ RI t ^ RIHt ^ RIHtHt ^ RIHt ^ RIH	t	 ^ RI
HtHtHtHt ^ RIHtHtHtH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# )    N)BytesIOreadableseekable)FULL_OBJECT_CHECKSUM_ARGS)IN_MEMORY_UPLOAD_TAG)CompleteMultipartUploadTaskCreateMultipartUploadTaskSubmissionTaskTask)ChunksizeAdjusterDeferredOpenFileget_callbacksget_filtered_dictc                   s<   a  ] tR t^!t o RR ltR tR tR tRtV t	R# )AggregatedProgressCallbackc                s,    Wn         W n        ^ V n        R# )a  Aggregates progress updates for every provided progress callback

:type callbacks: A list of functions that accepts bytes_transferred
    as a single argument
:param callbacks: The callbacks to invoke when threshold is reached

:type threshold: int
:param threshold: The progress threshold in which to take the
    aggregated progress and invoke the progress callback with that
    aggregated progress total
N)
_callbacks
_threshold_bytes_seen)self	callbacks	threshold   &&&6/usr/lib/python3.14/site-packages/s3transfer/upload.py__init__Z#AggregatedProgressCallback.__init__"   s     $#    c                s    V ;P                   V,          un         V P                   V P                  8  d   V P                  4        R # R # N)r   r   _trigger_callbacks)r   bytes_transferred   &&r   __call__Z#AggregatedProgressCallback.__call__2   s7    --t.##% /r   c                sL    V P                   ^ 8  d   V P                  4        R# R# )z@Flushes out any progress that has not been sent to its callbacksN)r   r   r      &r   flushZ AggregatedProgressCallback.flush7   s!    a##%  r   c                s`    V P                    F  pV! V P                  R 7       K  	  ^ V n        R# ))r   N)r   r   )r   callbacks   & r   r   Z-AggregatedProgressCallback._trigger_callbacks<   s&    Ht'7'78 (r   )r   r   r   N)i   )
__name__
__module____qualname____firstlineno__r   r   r!   r   __static_attributes____classdictcell____classdict__   @r   r   r   !   s      &
&
 r   r   c                   sV   a  ] tR t^Bt o RtR tRR ltRR ltR tR t	R t
R	 tR
tV tR# )InterruptReadera  Wrapper that can interrupt reading using an error

It uses a transfer coordinator to propagate an error if it notices
that a read is being made while the file is being read from.

:type fileobj: file-like obj
:param fileobj: The file-like object to read from

:type transfer_coordinator: s3transfer.futures.TransferCoordinator
:param transfer_coordinator: The transfer coordinator to use if the
    reader needs to be interrupted.
c                s    Wn         W n        R # r   _fileobj_transfer_coordinator)r   fileobjtransfer_coordinatorr   r   r   ZInterruptReader.__init__P   s    %9"r   Nc                s    V P                   P                  '       d   V P                   P                  hV P                  P                  V4      # r   )r/   Z	exceptionr.   read)r   amountr   r   r2   ZInterruptReader.readT   s=     %%///,,666}}!!&))r   c                s<    V P                   P                  W4       R # r   )r.   seek)r   ZwhereZwhencer   r   r4   ZInterruptReader.seek^   s    5)r   c                s6    V P                   P                  4       # r   )r.   tellr   r    r   r5   ZInterruptReader.tella   s    }}!!##r   c                s:    V P                   P                  4        R # r   )r.   closer   r    r   r6   ZInterruptReader.closed   s    r   c                s    V # r    r   r    r   	__enter__ZInterruptReader.__enter__g   s    r   c                s&    V P                  4        R # r   )r6   )r   Zargskwargss   &*,r   __exit__ZInterruptReader.__exit__j   s    

r   r-   r   r    )r#   r$   r%   r&   __doc__r   r2   r4   r5   r6   r8   r:   r'   r(   r)   r+   r   r,   r,   B   s2     :**$ r   r,   c                   sn   a  ] tR t^nt o RtRR lt]R 4       tR tR t	R t
R tR	 tR
 tR tR tRtV tR# )UploadInputManagera"  Base manager class for handling various types of files for uploads

This class is typically used for the UploadSubmissionTask class to help
determine the following:

    * How to determine the size of the file
    * How to determine if a multipart upload is required
    * How to retrieve the body for a PutObject
    * How to retrieve the bodies for a set of UploadParts

The answers/implementations differ for the various types of file inputs
that may be accepted. All implementations must subclass and override
public methods from this class.
Nc                s*    Wn         W n        W0n        R # r   )_osutilr/   _bandwidth_limiter)r   osutilr1   bandwidth_limiters   &&&&r   r   ZUploadInputManager.__init__~   s    %9""3r   c                    \        R4      h)zDetermines if the source for the upload is compatible with manager

:param upload_source: The source for which the upload will pull data
    from.

:returns: True if the manager can handle the type of source specified
    otherwise returns False.
zmust implement _is_compatible()ZNotImplementedErrorZclsZupload_sourcer   r   is_compatibleZ UploadInputManager.is_compatible   s     ""CDDr   c                rB   )a  Whether the body it provides are stored in-memory

:type operation_name: str
:param operation_name: The name of the client operation that the body
    is being used for. Valid operation_names are ``put_object`` and
    ``upload_part``.

:rtype: boolean
:returns: True if the body returned by the manager will be stored in
    memory. False if the manager will not directly store the body in
    memory.
z%must implement store_body_in_memory()rC   r   operation_namer   r   stores_body_in_memoryZ(UploadInputManager.stores_body_in_memory   s     ""IJJr   c                rB   )zProvides the transfer size of an upload

:type transfer_future: s3transfer.futures.TransferFuture
:param transfer_future: The future associated with upload request
z&must implement provide_transfer_size()rC   r   transfer_futurer   r   provide_transfer_sizeZ(UploadInputManager.provide_transfer_size   s     ""JKKr   c                rB   )a  Determines where a multipart upload is required

:type transfer_future: s3transfer.futures.TransferFuture
:param transfer_future: The future associated with upload request

:type config: s3transfer.manager.TransferConfig
:param config: The config associated to the transfer manager

:rtype: boolean
:returns: True, if the upload should be multipart based on
    configuration and size. False, otherwise.
z*must implement requires_multipart_upload()rC   r   rJ   configr   r   requires_multipart_uploadZ,UploadInputManager.requires_multipart_upload   s     ""NOOr   c                rB   )a  Returns the body to use for PutObject

:type transfer_future: s3transfer.futures.TransferFuture
:param transfer_future: The future associated with upload request

:type config: s3transfer.manager.TransferConfig
:param config: The config associated to the transfer manager

:rtype: s3transfer.utils.ReadFileChunk
:returns: A ReadFileChunk including all progress callbacks
    associated with the transfer future.
z$must implement get_put_object_body()rC   rI   r   r   get_put_object_bodyZ&UploadInputManager.get_put_object_body   s     ""HIIr   c                rB   )a  Yields the part number and body to use for each UploadPart

:type transfer_future: s3transfer.futures.TransferFuture
:param transfer_future: The future associated with upload request

:type chunksize: int
:param chunksize: The chunksize to use for this upload.

:rtype: int, s3transfer.utils.ReadFileChunk
:returns: Yields the part number and the ReadFileChunk including all
    progress callbacks associated with the transfer future for that
    specific yielded part.
z)must implement yield_upload_part_bodies()rC   )r   rJ   	chunksizer   r   yield_upload_part_bodiesZ+UploadInputManager.yield_upload_part_bodies   s     ""MNNr   c                s    \        WP                  4      pV P                  '       d(   V P                  P                  WP                  R R7      pV# )F)Zenabled)r,   r/   r?   Zget_bandwith_limited_stream)r   r0   r   r   _wrap_fileobjZ UploadInputManager._wrap_fileobj   sL    !'+E+EF"""--II33U J G r   c                sF    \        VR 4      pV'       d   \        V4      .# . # )Zprogress)r   r   )r   rJ   r      && r   _get_progress_callbacksZ*UploadInputManager._get_progress_callbacks   s&    !/:>	 .y9::	r   c                sB    V Uu. uF  q"P                   NK  	  up# u upi r   )r!   )r   Zaggregated_progress_callbacksr"   rS   r   _get_close_callbacksZ'UploadInputManager._get_close_callbacks   s    /LM/L8/LMMMs   )r?   r>   r/   r   )r#   r$   r%   r&   r<   r   classmethodrE   rH   rK   rN   rO   rQ   rR   rT   rU   r'   r(   r)   r+   r   r=   r=   n   sY     4
 	E 	EKLPJO N Nr   r=   c                   sj   a  ] tR t^t o Rt]R 4       tR tR tR t	R t
R tR tR	 tR
 tR tRtV tR# )UploadFilenameInputManagerzUpload utility for filenamesc                s"    \        V\        4      # r   )Z
isinstanceZstrrD   r   r   rE   Z(UploadFilenameInputManager.is_compatible   s    ---r   c                    R # )Fr7   rF   r   r   rH   Z0UploadFilenameInputManager.stores_body_in_memory   s    r   c                s    VP                   P                  V P                  P                  VP                   P                  P
                  4      4       R # r   )metarK   r>   Zget_file_size	call_argsr0   rI   r   r   rK   Z0UploadFilenameInputManager.provide_transfer_size   s:    22LL&&';';'E'E'M'MN	
r   c                sH    VP                   P                  VP                  8  # r   )rY   sizemultipart_thresholdrL   r   r   rN   Z4UploadFilenameInputManager.requires_multipart_upload   s    ##((F,F,FFFr   c                s    V P                  V4      w  r#V P                  V4      pV P                  V4      pV P                  V4      pVP                  P
                  pV P                  P                  VVVVVR 7      # )r0   Z
chunk_sizefull_file_sizer   close_callbacks)&_get_put_object_fileobj_with_full_sizerR   rT   rU   rY   r[   r>   #open_file_chunk_reader_from_fileobj)r   rJ   r0   	full_sizer   r_   r[   s   &&     r   rO   Z.UploadFilenameInputManager.get_put_object_body   s    !HH
 $$W-00A	33I>##(( ||??$+ @ 
 	
r   c           	   #  s  "   VP                   P                  pV P                  W4      p\        ^V^,           4       F  pV P	                  V4      pV P                  V4      pW%^,
          ,          pV P                  VP                   P                  P                  VVVR7      w  rV P                  V	4      p	V P                  P                  V	VV
VVR7      pW[3x  K  	  R# 5i)i   )
start_byte	part_sizer^   r]   N)rY   r[   _get_num_partsZrangerT   rU   '_get_upload_part_fileobj_with_full_sizerZ   r0   rR   r>   ra   )r   rJ   rP   r^   Z	num_partspart_numberr   r_   rc   r0   rb   Zread_file_chunks   &&&         r   rQ   Z3UploadFilenameInputManager.yield_upload_part_bodies  s     (--22''C	 IM2K44_EI"77	BO"Ao6J "&!M!M$$..66%#-	 "N "G ((1G #llNN$(# / O O ..5 3s   C C"c                sH    \        WV P                  P                  R 7      pV# ))Zopen_function)r   r>   Zopen)r   r0   rc   r   r   _get_deferred_open_fileZ2UploadFilenameInputManager._get_deferred_open_file2  s"    "t||/@/@
 r   c                s    VP                   P                  P                  pVP                   P                  pV P	                  V^ 4      V3# r;   )rY   rZ   r0   r[   rh   r   rJ   r0   r[      &&  r   r`   ZAUploadFilenameInputManager._get_put_object_fileobj_with_full_size8  sB    !&&0088##((++GQ7==r   c                sL    VR ,          pVR,          pV P                  W4      V3# )rc   r^   )rh   )r   r0   r9   rc   rb   s   &&,  r   rf   ZBUploadFilenameInputManager._get_upload_part_fileobj_with_full_size=  s-    L)
+,	++G@)KKr   c                s    \        \        P                  ! VP                  P                  \        V4      ,          4      4      # r   )ZintmathZceilrY   r[   Zfloat)r   rJ   rd   r   r   re   Z)UploadFilenameInputManager._get_num_partsB  s,    499_1166y9IIJKKr   r7   N)r#   r$   r%   r&   r<   rV   rE   rH   rK   rN   rO   rQ   rh   r`   rf   re   r'   r(   r)   r+   r   rW   rW      sP     &. .

G
0/>>
L
L Lr   rW   c                   sL   a  ] tR tRt o Rt]R 4       tR tR tR t	R t
RtV tR	# )
UploadSeekableInputManageriF  z&Upload utility for an open file objectc                s>    \        V4      ;'       d    \        V4      # r   r   rD   r   r   rE   Z(UploadSeekableInputManager.is_compatibleI  s    &BB8M+BBr   c                s    VR 8X  d   R# R# )
put_objectFTr7   rF   r   r   rH   Z0UploadSeekableInputManager.stores_body_in_memoryM  s    \)r   c                s   VP                   P                  P                  pVP                  4       pVP	                  ^ ^4       VP                  4       pVP	                  V4       VP                   P                  WC,
          4       R# r    N)rY   rZ   r0   r5   r4   rK   )r   rJ   r0   Zstart_positionZend_position   &&   r   rK   Z0UploadSeekableInputManager.provide_transfer_sizeS  se    !&&0088 !Q||~^$22)	
r   c                s^    VP                  VR ,          4      p\        V4      \        V4      3# )rd   )r2   r   len)r   r0   r9   datas   &&, r   rf   ZBUploadSeekableInputManager._get_upload_part_fileobj_with_full_size`  s,     ||F;/0 t}c$i''r   c                s    VP                   P                  P                  pVP                  4       VP                   P                  ,           pW#3# r   )rY   rZ   r0   r5   r[   ri   rj   r   r`   ZAUploadSeekableInputManager._get_put_object_fileobj_with_full_sizeo  s?    !&&0088 ||~ 4 4 9 99}r   r7   N)r#   r$   r%   r&   r<   rV   rE   rH   rK   rf   r`   r'   r(   r)   r+   r   rl   rl   F  s5     0C C
( r   rl   c                   sx   a a ] tR tRt oRtRV 3R llt]R 4       tR tR t	R t
R tR	 tRR
 ltR tRtVtV ;t# )UploadNonSeekableInputManageriw  z7Upload utility for a file-like object that cannot seek.c                s6   < \         SV `  WV4       R V n        R# )r   N)Zsuperr   _initial_data)r   r@   r1   rA   	__class__s   &&&&r   r   Z&UploadNonSeekableInputManager.__init__z  s    7HI r   c                s    \        V4      # r   )r   rD   r   r   rE   Z+UploadNonSeekableInputManager.is_compatible~  s    &&r   c                rX   Tr7   rF   r   r   rH   Z3UploadNonSeekableInputManager.stores_body_in_memory  s    r   c                rX   r   r7   rI   r   r   rK   Z3UploadNonSeekableInputManager.provide_transfer_size  s     	r   c                s:   VP                   P                  e$   VP                   P                  VP                  8  # VP                   P                  P                  pVP                  pV P                  W4R4      V n        \        V P                  4      V8  d   R# R# )NFT)rY   r[   r\   rZ   r0   _readrs   rp   )r   rJ   rM   r0   r   s   &&&  r   rN   Z7UploadNonSeekableInputManager.requires_multipart_upload  s    $$0"'',,0J0JJJ "&&0088..	!ZZEBt!!"Y.r   c                s    V P                  V4      pV P                  V4      pVP                  P                  P                  pV P                  V P                  VP                  4       ,           W#4      pR V n        V# r   )rT   rU   rY   rZ   r0   
_wrap_datars   r2   )r   rJ   r   r_   r0   bodys   &&    r   rO   Z1UploadNonSeekableInputManager.get_put_object_body  sl    00A	33I>!&&0088/
 "r   c              #  s  "   VP                   P                  P                  p^ p V P                  V4      pV P	                  V4      pV^,          pV P                  W24      pV'       g   R# V P                  WuV4      pRpWH3x  Kb  5irn   )rY   rZ   r0   rT   rU   rv   rw   )	r   rJ   rP   Zfile_objectrg   r   r_   Zpart_contentZpart_objects	   &&&      r   rQ   Z6UploadNonSeekableInputManager.yield_upload_part_bodies  s     %**44<< 44_EI"77	BO1K::k=L//K
  L**s   BBc                s   \        V P                  4      ^ 8X  d   VP                  V4      # V\        V P                  4      8:  d.   V P                  RV pV'       d   V P                  VR V n        V# V\        V P                  4      ,
          pV P                  VP                  V4      ,           pV'       d   RV n        V# )a  
Reads a specific amount of data from a stream and returns it. If there
is any data in initial_data, that will be popped out first.

:type fileobj: A file-like object that implements read
:param fileobj: The stream to read from.

:type amount: int
:param amount: The number of bytes to read from the stream.

:type truncate: bool
:param truncate: Whether or not to truncate initial_data after
    reading from it.

:return: Generator which generates part bodies from the initial data.
Nr   )rp   rs   r2   )r   r0   r3   Ztruncaterq   Zamount_to_reads   &&&&  r   rv   Z#UploadNonSeekableInputManager._read  s    $ t!!"a'<<'' S++,,%%gv.D %)%7%7%@"K
  #d&8&8"99!!GLL$@@ !$Dr   c                s    V P                  \        V4      4      pV P                  P                  V\	        V4      \	        V4      VVR7      # )ah  
Wraps data with the interrupt reader and the file chunk reader.

:type data: bytes
:param data: The data to wrap.

:type callbacks: list
:param callbacks: The callbacks associated with the transfer future.

:type close_callbacks: list
:param close_callbacks: The callbacks to be called when closing the
    wrapper for the data.

:return: Fully wrapped data.
r]   )rR   r   r>   ra   rp   )r   rq   r   r_   r0   s   &&&& r   rw   Z(UploadNonSeekableInputManager._wrap_data  sL      $$WT]3||??4yt9+ @ 
 	
r   )rs   r   ru   )r#   r$   r%   r&   r<   r   rV   rE   rH   rK   rN   rO   rQ   rv   rw   r'   r(   Z__classcell__)rt   r*   s   @@r   rr   rr   w  sJ     A! ' '
"+((T
 
r   rr   c                   s   a  ] tR tRt o RtRR.t]R.,           t. ROt. RO],           t	R t
RR ltR tR	 tR
 tR tR tR tR tRtV tR# )UploadSubmissionTaski  z.Task for submitting tasks to execute an uploadChecksumTypeMpuObjectSizec                s    \         \        \        .pVP                  P                  P
                  pV F  pVP                  V4      '       g   K  Vu # 	  \        RV R\        V4       R24      h)a?  Retrieves a class for managing input for an upload based on file type

:type transfer_future: s3transfer.futures.TransferFuture
:param transfer_future: The transfer future for the request

:rtype: class of UploadInputManager
:returns: The appropriate class to use for managing a specific type of
    input for uploads.
zInput z
 of type: z is not supported.)	rW   rl   rr   rY   rZ   r0   rE   ZRuntimeErrorZtype)r   rJ   Zupload_manager_resolver_chainr0   Zupload_manager_clsro   r   _get_upload_input_manager_clsZ2UploadSubmissionTask._get_upload_input_manager_cls  sw     '&))
% "&&0088"?!//88)) #@ WIZW6HI
 	
r   Nc                s&   V P                  V4      ! W0P                  V4      pVP                  P                  f   VP	                  V4       VP                  WR4      '       g   V P                  VVVVVV4       R# V P                  VVVVVV4       R# )aj  
:param client: The client associated with the transfer manager

:type config: s3transfer.manager.TransferConfig
:param config: The transfer config associated with the transfer
    manager

:type osutil: s3transfer.utils.OSUtil
:param osutil: The os utility associated to the transfer manager

:type request_executor: s3transfer.futures.BoundedExecutor
:param request_executor: The request executor associated with the
    transfer manager

:type transfer_future: s3transfer.futures.TransferFuture
:param transfer_future: The transfer future associated with the
    transfer request that tasks are being submitted for
N)r|   r/   rY   r[   rK   rN   _submit_upload_request_submit_multipart_request)r   clientrM   r@   request_executorrJ   rA   upload_input_managers   &&&&&&& r   _submitZUploadSubmissionTask._submit3  s    6  $AA 

,,.? A
 $$, 66G $==
 
 '' $ ** $r   c                sN   VP                   P                  pV P                  VP                  4      pV P	                  VR 4      p	V P
                  P                  V\        V P
                  RVRVP                  V4      RVP                  RVP                  RV/RR7      V	R7       R	# )
rm   r   r0   bucketkey
extra_argsT)r1   main_kwargsis_finaltagN)rY   rZ   _extra_put_object_argsr   _get_upload_task_tagr/   submitPutObjectTaskrO   r   r   )
r   r   rM   r@   r   rJ   r   rZ   Zput_object_extra_argsZput_object_tags
   &&&&&&&   r   r}   Z+UploadSubmissionTask._submit_upload_requestl  s     $((22	 $ ; ;  !

 22 ,

 	""))%)%?%?f3GG'  i..9== "7   	* 	
r   c                sT   VP                   P                  p\         FC  pWP                  9   g   K  R VP                  R&   VP	                  RR4      VP                  R&   KE  	  V P                  VP                  4      p	V P                  P                  V\        V P                  RVRVP                  RVP                  RV	/R	7      4      p
. pV P                  VP                  4      pV P                  VR
4      pVP                   P                  p\        4       pVP                  VP                   V4      pVP#                  VV4      pV Fk  w  ppVP%                  V P                  P                  V\'        V P                  RVRVRVP                  RVP                  RVRV/RV
/R7      VR7      4       Km  	  V P)                  VP                  4      pV P                  P                  V\+        V P                  RVRVP                  RVP                  RV/RV
RV/RR7      4       R# )ZFULL_OBJECTrz   ChecksumZ ChecksumAlgorithmr   r   r   r   )r1   r   upload_partr0   rg   	upload_id)r1   r   pending_main_kwargsr   ZpartsT)r1   r   r   r   N)rY   rZ   r   r   Zreplace_extra_create_multipart_argsr/   r   r   r   r   _extra_upload_part_argsr   r[   r   Zadjust_chunksizeZmultipart_chunksizerQ   ZappendUploadPartTask_extra_complete_multipart_argsr   )r   r   rM   r@   r   rJ   r   rZ   ZchecksumZcreate_multipart_extra_argsZcreate_multipart_futureZpart_futuresZextra_part_argsZupload_part_tagr[   ZadjusterrP   Zpart_iteratorrg   r0   Zcomplete_multipart_extra_argss   &&&&&&&              r   r~   Z.UploadSubmissionTask._submit_multipart_request  sS    $((22	 2H///7D	$$^4<D<L<L=	$$%89 2 '+&G&G  '
#
 #'"<"<"C"C%%)%?%?fi..9== "=	#
 66y7K7KL 33 -
 ##(($&--f.H.H$O	,EEY
 %2 K**11$"-1-G-G$f%w$i&6&6!9==);(/% ()@- (! 2  %2, )-(K(K  )
% 	""))'%)%?%?fi..9== "?	  !8\% 	
r   c                ,    \        WP                  4      # r   )r   UPLOAD_PART_ARGSr   r   r   r   r   Z,UploadSubmissionTask._extra_upload_part_args  s     !-B-BCCr   c                r   r   )r   COMPLETE_MULTIPART_ARGSr   r   r   r   Z3UploadSubmissionTask._extra_complete_multipart_args  s     -I-IJJr   c                .    \        WP                  R 7      # )Zblocklisted_keys)r   CREATE_MULTIPART_BLOCKLISTr   r   r   r   Z1UploadSubmissionTask._extra_create_multipart_args  s     )H)H
 	
r   c                r   r   )r   PUT_OBJECT_BLOCKLISTr   r   r   r   Z+UploadSubmissionTask._extra_put_object_args  s     )B)B
 	
r   c                sD    R pVP                  V4      '       d   \        pV# r   )rH   r   )r   r   rG   r   s   &&& r   r   Z)UploadSubmissionTask._get_upload_task_tag  s"    55nEE&C
r   r7   )r   SSECustomerKeySSECustomerAlgorithmSSECustomerKeyMD5RequestPayerExpectedBucketOwner)r   r   r   r   r   rz   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   ry   ry     ss     8*O<!:o=N!N 	""
07r%
Na
FD
K



 r   ry   c                   *   a  ] tR tRt o RtR tRtV tR# )r   i  z Task to do a nonmultipart uploadc                s    V;_uu_ 4       pVP                   ! RRVRVRV/VB  RRR4       R#   + '       g   i     R# ; i)a  
:param client: The client to use when calling PutObject
:param fileobj: The file to upload.
:param bucket: The name of the bucket to upload to
:param key: The name of the key to upload to
:param extra_args: A dictionary of any extra arguments that may be
    used in the upload.
BucketKeyBodyNr7   )rm   )r   r   r0   r   r   r   rx   s   &&&&&& r   _mainZPutObjectTask._main  s7     WNVNN4N:N WWWs   .?	r7   Nr#   r$   r%   r&   r<   r   r'   r(   r)   r+   r   r   r     s     *
O 
Or   r   c                   r   )r   i  z+Task to upload a part in a multipart uploadc                s   V;_uu_ 4       pVP                   ! R
RVRVRVRVRV/VB p	RRR4       X	R,          p
RV
RV/pRV9   d-   VR,          P                  4       pR	V 2pW9   d   W,          W&   V#   + '       g   i     LT; i)a[  
:param client: The client to use when calling PutObject
:param fileobj: The file to upload.
:param bucket: The name of the bucket to upload to
:param key: The name of the key to upload to
:param upload_id: The id of the upload
:param part_number: The number representing the part of the multipart
    upload
:param extra_args: A dictionary of any extra arguments that may be
    used in the upload.

:rtype: dict
:returns: A dictionary representing a part::

    {'Etag': etag_value, 'PartNumber': part_number}

    This value can be appended to a list to be used to complete
    the multipart upload.
r   r   ZUploadIdZ
PartNumberr   NZETagr   r   r7   )r   Zupper)r   r   r0   r   r   r   rg   r   rx   ZresponseZetagZpart_metadataZalgorithm_nameZchecksum_members   &&&&&&&&      r   r   ZUploadPartTask._main"  s    , W))  # '	
  H  |[A*,'(;<BBDN ((89O*191J.! Ws   A44B	r7   Nr   r)   r+   r   r   r     s     5& &r   r   )rk   Zior   Zs3transfer.compatr   r   Zs3transfer.constantsr   Zs3transfer.futuresr   Zs3transfer.tasksr   r   r	   r
   Zs3transfer.utilsr   r   r   r   r   r,   r=   rW   rl   rr   ry   r   r   r7   r   r   <module>r      s      0 : 3   B) )XxN xNvZL!3 ZLz.!; .bG
$6 G
TK> K\OD O )T )r   