+
    [mÀh|  ã                   ó2  € ^ 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                   ó<   a € ] tR t^!t o RR ltR tR tR tRtV t	R# )ÚAggregatedProgressCallbackc                ó,   € 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Ú	thresholds   &&&Ú3/usr/lib/python3/dist-packages/s3transfer/upload.pyÚ__init__Ú#AggregatedProgressCallback.__init__"   s   € ð $ŒØ#ŒØˆÖó    c                ó’   € V ;P                   V,          un         V P                   V P                  8¼  d   V P                  4        R # R # ©N)r   r   Ú_trigger_callbacks)r   Úbytes_transferreds   &&r   Ú__call__Ú#AggregatedProgressCallback.__call__2   s7   € Ø×ÒÐ-Õ-ÕØ×Ñ˜tŸ™Ô.Ø×#Ñ#Ö%ñ /r   c                óL   € 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   s   &r   ÚflushÚ AggregatedProgressCallback.flush7   s!   € à×Ñ˜aÔØ×#Ñ#Ö%ñ  r   c                ó`   € V P                    F  pV! V P                  R 7       K  	  ^ V n        R# ))r!   N)r   r   )r   Úcallbacks   & r   r    Ú-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__s   @r   r   r   !   s   ø‡ € ôò &ò
&÷
ð r   r   c                   óV   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                ó   € Wn         W n        R # r   ©Ú_fileobjÚ_transfer_coordinator)r   ÚfileobjÚtransfer_coordinators   &&&r   r   ÚInterruptReader.__init__P   s   € ØŒØ%9Ö"r   Nc                óœ   € V P                   P                  '       d   V P                   P                  hV P                  P                  V4      # r   )r8   Ú	exceptionr7   Úread)r   Úamounts   &&r   r>   ÚInterruptReader.readT   s=   € ð ×%Ñ%×/×/Ð/Ø×,Ñ,×6Ñ6Ð6Ø�}‰}×!Ñ! &Ó)Ð)r   c                ó<   € V P                   P                  W4       R # r   )r7   Úseek)r   ÚwhereÚwhences   &&&r   rB   ÚInterruptReader.seek^   s   € Ø�‰×Ñ˜5Ö)r   c                ó6   € V P                   P                  4       # r   )r7   Útellr%   s   &r   rG   ÚInterruptReader.tella   s   € Ø�}‰}×!Ñ!Ó#Ð#r   c                ó:   € V P                   P                  4        R # r   )r7   Úcloser%   s   &r   rJ   ÚInterruptReader.closed   s   € Ø�‰×ÑÖr   c                ó   € V # r   © r%   s   &r   Ú	__enter__ÚInterruptReader.__enter__g   s   € Øˆr   c                ó&   € V P                  4        R # r   )rJ   )r   ÚargsÚkwargss   &*,r   Ú__exit__ÚInterruptReader.__exit__j   s   € Ø�
‰
Žr   r6   r   ©r   )r+   r,   r-   r.   Ú__doc__r   r>   rB   rG   rJ   rN   rS   r/   r0   r1   s   @r   r4   r4   B   s2   ø‡ € ñò:ô*ô*ò$òò÷ð r   r4   c                   ón   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                ó*   € Wn         W n        W0n        R # r   )Ú_osutilr8   Ú_bandwidth_limiter)r   Úosutilr:   Úbandwidth_limiters   &&&&r   r   ÚUploadInputManager.__init__~   s   € ØŒØ%9Ô"Ø"3Ör   c                ó   € \        R4      h)z÷Determines 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()©ÚNotImplementedError©ÚclsÚupload_sources   &&r   Úis_compatibleÚ UploadInputManager.is_compatibleƒ   s   € ô "Ð"CÓDÐDr   c                ó   € \        R4      h)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()r`   ©r   Úoperation_names   &&r   Ústores_body_in_memoryÚ(UploadInputManager.stores_body_in_memory�   s   € ô "Ð"IÓJÐJr   c                ó   € \        R4      h)z¤Provides 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()r`   ©r   Útransfer_futures   &&r   Úprovide_transfer_sizeÚ(UploadInputManager.provide_transfer_sizež   s   € ô "Ð"JÓKÐKr   c                ó   € \        R4      h)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()r`   ©r   rn   Úconfigs   &&&r   Úrequires_multipart_uploadÚ,UploadInputManager.requires_multipart_upload¦   s   € ô "Ð"NÓOÐOr   c                ó   € \        R4      h)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()r`   rm   s   &&r   Úget_put_object_bodyÚ&UploadInputManager.get_put_object_bodyµ   s   € ô "Ð"HÓIÐIr   c                ó   € \        R4      h)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()r`   )r   rn   Ú	chunksizes   &&&r   Úyield_upload_part_bodiesÚ+UploadInputManager.yield_upload_part_bodiesÄ   s   € ô "Ð"MÓNÐNr   c                ó¢   € \        WP                  4      pV P                  '       d(   V P                  P                  WP                  R R7      pV# )F)Úenabled)r4   r8   r[   Úget_bandwith_limited_stream)r   r9   s   &&r   Ú_wrap_fileobjÚ UploadInputManager._wrap_fileobjÔ   sL   € Ü! '×+EÑ+EÓFˆØ×"×"Ð"Ø×-Ñ-×IÑIØ×3Ñ3¸Uð Jó ˆGð ˆr   c                óF   € \        VR 4      pV'       d   \        V4      .# . # )Úprogress)r   r   )r   rn   r   s   && r   Ú_get_progress_callbacksÚ*UploadInputManager._get_progress_callbacksÜ   s&   € Ü! /°:Ó>ˆ	÷ Ü.¨yÓ9Ð:Ð:Øˆ	r   c                óB   € V Uu. uF  q"P                   NK  	  up# u upi r   )r&   )r   Úaggregated_progress_callbacksr)   s   && r   Ú_get_close_callbacksÚ'UploadInputManager._get_close_callbackså   s   € Ù/LÓMÑ/L 8—”Ñ/LÑMÐMùÒMs   …)r[   rZ   r8   r   )r+   r,   r-   r.   rV   r   Úclassmethodre   rj   ro   rt   rw   r{   r€   r„   rˆ   r/   r0   r1   s   @r   rX   rX   n   sY   ø‡ € ñô4ð
 ñ	Eó ð	EòKòLòPòJòOò ò÷Nð Nr   rX   c                   ój   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                ó"   € \        V\        4      # r   )Ú
isinstanceÚstrrb   s   &&r   re   Ú(UploadFilenameInputManager.is_compatibleì   s   € ä˜-¬Ó-Ð-r   c                ó   € R # )FrM   rh   s   &&r   rj   Ú0UploadFilenameInputManager.stores_body_in_memoryð   s   € Ùr   c                óª   € VP                   P                  V P                  P                  VP                   P                  P
                  4      4       R # r   )Úmetaro   rZ   Úget_file_sizeÚ	call_argsr9   rm   s   &&r   ro   Ú0UploadFilenameInputManager.provide_transfer_sizeó   s:   € Ø×Ñ×2Ñ2Ø�L‰L×&Ñ& ×';Ñ';×'EÑ'E×'MÑ'MÓNö	
r   c                óH   € VP                   P                  VP                  8¬  # r   )r”   ÚsizeÚmultipart_thresholdrr   s   &&&r   rt   Ú4UploadFilenameInputManager.requires_multipart_uploadø   s   € Ø×#Ñ#×(Ñ(¨F×,FÑ,FÑFÐFr   c                óú   € 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      # )©r9   Ú
chunk_sizeÚfull_file_sizer   Úclose_callbacks)Ú&_get_put_object_fileobj_with_full_sizer€   r„   rˆ   r”   r™   rZ   Ú#open_file_chunk_reader_from_fileobj)r   rn   r9   Ú	full_sizer   r    r™   s   &&     r   rw   Ú.UploadFilenameInputManager.get_put_object_bodyû   s‰   € à!×HÑHØó
Ñˆð ×$Ñ$ WÓ-ˆà×0Ñ0°ÓAˆ	Ø×3Ñ3°IÓ>ˆØ×#Ñ#×(Ñ(ˆð �|‰|×?Ñ?ØØØ$ØØ+ð @ó 
ð 	
r   c           	   #  óÈ  "  € 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  ršV P                  V	4      p	V P                  P                  V	VV
VVR7      pW[3x € K¡  	  R# 5i)é   )Ú
start_byteÚ	part_sizerŸ   r�   N)r”   r™   Ú_get_num_partsÚranger„   rˆ   Ú'_get_upload_part_fileobj_with_full_sizer–   r9   r€   rZ   r¢   )r   rn   rz   rŸ   Ú	num_partsÚpart_numberr   r    r§   r9   r£   Úread_file_chunks   &&&         r   r{   Ú3UploadFilenameInputManager.yield_upload_part_bodies  sè   é € Ø(×-Ñ-×2Ñ2ˆØ×'Ñ'¨ÓCˆ	Ü   I°¥MÖ2ˆKØ×4Ñ4°_ÓEˆIØ"×7Ñ7¸	ÓBˆOØ"°A¥oÕ6ˆJð "&×!MÑ!MØ×$Ñ$×.Ñ.×6Ñ6Ø%Ø#Ø-ð	 "Nó "ÑˆGð ×(Ñ(¨Ó1ˆGð #Ÿl™l×NÑNØØ$Ø(Ø#Ø /ð Oó ˆOð Ð.Ô.ó5 3ùs   ‚C C"c                óH   € \        WV P                  P                  R 7      pV# ))Úopen_function)r   rZ   Úopen)r   r9   r§   s   &&&r   Ú_get_deferred_open_fileÚ2UploadFilenameInputManager._get_deferred_open_file2  s"   € Ü"Ø¨t¯|©|×/@Ñ/@ô
ˆð ˆr   c                ó–   € VP                   P                  P                  pVP                   P                  pV P	                  V^ 4      V3# rU   )r”   r–   r9   r™   r³   ©r   rn   r9   r™   s   &&  r   r¡   ÚAUploadFilenameInputManager._get_put_object_fileobj_with_full_size8  sB   € Ø!×&Ñ&×0Ñ0×8Ñ8ˆØ×#Ñ#×(Ñ(ˆØ×+Ñ+¨G°QÓ7¸Ð=Ð=r   c                óL   € VR ,          pVR,          pV P                  W4      V3# )r§   rŸ   )r³   )r   r9   rR   r§   r£   s   &&,  r   r«   ÚBUploadFilenameInputManager._get_upload_part_fileobj_with_full_size=  s-   € Ø˜LÕ)ˆ
ØÐ+Õ,ˆ	Ø×+Ñ+¨GÓ@À)ÐKÐKr   c                óˆ   € \        \        P                  ! VP                  P                  \        V4      ,          4      4      # r   )ÚintÚmathÚceilr”   r™   Úfloat)r   rn   r¨   s   &&&r   r©   Ú)UploadFilenameInputManager._get_num_partsB  s,   € Ü”4—9’9˜_×1Ñ1×6Ñ6¼¸yÓ9IÕIÓJÓKÐKr   rM   N)r+   r,   r-   r.   rV   rŠ   re   rj   ro   rt   rw   r{   r³   r¡   r«   r©   r/   r0   r1   s   @r   rŒ   rŒ   é   sP   ø‡ € Ù&àñ.ó ð.òò
ò
Gò
ò0/ò>ò>ò
L÷
Lð Lr   rŒ   c                   óL   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                ó>   € \        V4      ;'       d    \        V4      # r   r   rb   s   &&r   re   Ú(UploadSeekableInputManager.is_compatibleI  s   € ä˜Ó&×BÐB¬8°MÓ+BÐBr   c                ó   € VR 8X  d   R# R# )Ú
put_objectFTrM   rh   s   &&r   rj   Ú0UploadSeekableInputManager.stores_body_in_memoryM  s   € Ø˜\Ô)Ùár   c                ó  € 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)r”   r–   r9   rG   rB   ro   )r   rn   r9   Ústart_positionÚend_positions   &&   r   ro   Ú0UploadSeekableInputManager.provide_transfer_sizeS  se   € Ø!×&Ñ&×0Ñ0×8Ñ8ˆð !Ÿ™›ˆØ�‰�Q˜ÔØ—|‘|“~ˆØ�‰�^Ô$Ø×Ñ×2Ñ2ØÕ)ö	
r   c                ó^   € VP                  VR ,          4      p\        V4      \        V4      3# )r¨   )r>   r   Úlen)r   r9   rR   Údatas   &&, r   r«   ÚBUploadSeekableInputManager._get_upload_part_fileobj_with_full_size`  s,   € ð �|‰|˜F ;Õ/Ó0ˆô �t‹}œc $›iÐ'Ð'r   c                óž   € VP                   P                  P                  pVP                  4       VP                   P                  ,           pW#3# r   )r”   r–   r9   rG   r™   r¶   s   &&  r   r¡   ÚAUploadSeekableInputManager._get_put_object_fileobj_with_full_sizeo  s?   € Ø!×&Ñ&×0Ñ0×8Ñ8ˆð �|‰|‹~ × 4Ñ 4× 9Ñ 9Õ9ˆØˆ}Ðr   rM   N)r+   r,   r-   r.   rV   rŠ   re   rj   ro   r«   r¡   r/   r0   r1   s   @r   rÁ   rÁ   F  s5   ø‡ € Ù0àñCó ðCòò
ò(÷ð r   rÁ   c                   óx   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                ó6   <€ \         SV `  WV4       R V n        R# )r   N)Úsuperr   Ú_initial_data)r   r\   r:   r]   Ú	__class__s   &&&&€r   r   Ú&UploadNonSeekableInputManager.__init__z  s   ø€ Ü‰Ñ˜Ð7HÔIØ ˆÖr   c                ó   € \        V4      # r   )r   rb   s   &&r   re   Ú+UploadNonSeekableInputManager.is_compatible~  s   € ä˜Ó&Ð&r   c                ó   € R # ©TrM   rh   s   &&r   rj   Ú3UploadNonSeekableInputManager.stores_body_in_memory‚  s   € Ùr   c                ó   € R # r   rM   rm   s   &&r   ro   Ú3UploadNonSeekableInputManager.provide_transfer_size…  s   € ñ 	r   c                ó:  € 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)r”   r™   rš   r–   r9   Ú_readrÖ   rÍ   )r   rn   rs   r9   r   s   &&&  r   rt   Ú7UploadNonSeekableInputManager.requires_multipart_uploadŠ  s�   € à×Ñ×$Ñ$Ò0Ø"×'Ñ'×,Ñ,°×0JÑ0JÑJÐJð "×&Ñ&×0Ñ0×8Ñ8ˆØ×.Ñ.ˆ	Ø!ŸZ™Z¨¸EÓBˆÔÜˆt×!Ñ!Ó" YÔ.Ùár   c                óú   € 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   )r„   rˆ   r”   r–   r9   Ú
_wrap_datarÖ   r>   )r   rn   r   r    r9   Úbodys   &&    r   rw   Ú1UploadNonSeekableInputManager.get_put_object_body›  sl   € Ø×0Ñ0°ÓAˆ	Ø×3Ñ3°IÓ>ˆØ!×&Ñ&×0Ñ0×8Ñ8ˆà�‰Ø×Ñ §¡£Õ/°ó
ˆð "ˆÔØˆr   c              #  ó  "  € 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rÈ   )r”   r–   r9   r„   rˆ   rá   rä   )	r   rn   rz   Úfile_objectr­   r   r    Úpart_contentÚpart_objects	   &&&      r   r{   Ú6UploadNonSeekableInputManager.yield_upload_part_bodies©  s‡   é € Ø%×*Ñ*×4Ñ4×<Ñ<ˆØˆð Ø×4Ñ4°_ÓEˆIØ"×7Ñ7¸	ÓBˆOØ˜1ÕˆKØŸ:™: kÓ=ˆLßÙØŸ/™/Ø¨óˆKð
  ˆLØÐ*Ô*ùs   ‚BBc                ó„  € \        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   )rÍ   rÖ   r>   )r   r9   r?   ÚtruncaterÎ   Úamount_to_reads   &&&&  r   rá   Ú#UploadNonSeekableInputManager._read½  s®   € ô$ ˆt×!Ñ!Ó" aÔ'Ø—<‘< Ó'Ð'ð ”S˜×+Ñ+Ó,Ô,Ø×%Ñ% g vÐ.ˆD÷ Ø%)×%7Ñ%7¸¸Ð%@�Ô"ØˆKð
  ¤# d×&8Ñ&8Ó"9Õ9ˆØ×!Ñ! G§L¡L°Ó$@Õ@ˆ÷ Ø!$ˆDÔØˆr   c                óš   € 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�   )r€   r   rZ   r¢   rÍ   )r   rÎ   r   r    r9   s   &&&& r   rä   Ú(UploadNonSeekableInputManager._wrap_dataç  sL   € ð  ×$Ñ$¤W¨T£]Ó3ˆØ�|‰|×?Ñ?ØÜ˜4“yÜ˜t›9ØØ+ð @ó 
ð 	
r   )rÖ   r   rÜ   )r+   r,   r-   r.   rV   r   rŠ   re   rj   ro   rt   rw   r{   rá   rä   r/   r0   Ú__classcell__)r×   r2   s   @@r   rÓ   rÓ   w  sJ   ù‡ € ÙA÷!ð ñ'ó ð'òòò
ò"ò+ô((÷T
ò 
r   rÓ   c                   ó˜   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                óâ   € \         \        \        .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.)	rŒ   rÁ   rÓ   r”   r–   r9   re   ÚRuntimeErrorÚtype)r   rn   Úupload_manager_resolver_chainr9   Úupload_manager_clss   &&   r   Ú_get_upload_input_manager_clsÚ2UploadSubmissionTask._get_upload_input_manager_cls  sw   € ô 'Ü&Ü)ð)
Ð%ð "×&Ñ&×0Ñ0×8Ñ8ˆÛ"?ÐØ!×/Ñ/°×8Ô8Ø)Ò)ñ #@ô Ø�W�I˜Z¬¨W« Ð6HÐIó
ð 	
r   Nc                ó&  € 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ü   r8   r”   r™   ro   rt   Ú_submit_upload_requestÚ_submit_multipart_request)r   Úclientrs   r\   Úrequest_executorrn   r]   Úupload_input_managers   &&&&&&& r   Ú_submitÚUploadSubmissionTask._submit3  s¨   € ð6  $×AÑAØô 
à
×,Ñ,Ð.?ó AÐð
 ×Ñ×$Ñ$Ò,Ø ×6Ñ6°ÔGð $×=Ñ=Ø÷
ò 
ð ×'Ñ'ØØØØ ØØ$öð ×*Ñ*ØØØØ ØØ$ör   c                óN  € 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	# )
rÅ   r  r9   ÚbucketÚkeyÚ
extra_argsT)r:   Úmain_kwargsÚis_final©ÚtagN)r”   r–   Ú_extra_put_object_argsr	  Ú_get_upload_task_tagr8   ÚsubmitÚPutObjectTaskrw   r  r  )
r   r  rs   r\   r  rn   r  r–   Úput_object_extra_argsÚput_object_tags
   &&&&&&&   r   rÿ   Ú+UploadSubmissionTask._submit_upload_requestl  s¹   € ð $×(Ñ(×2Ñ2ˆ	à $× ;Ñ ;Ø× Ñ ó!
Ðð
 ×2Ñ2Ø  ,ó
ˆð
 	×"Ñ"×)Ñ)ØÜØ%)×%?Ñ%?à˜fØÐ3×GÑGØ'ó ð ˜i×.Ñ.Ø˜9Ÿ=™=Ø Ð"7ðð ôð ð 	*ö 	
r   c                óT  € VP                   P                  p\         FC  pW‡P                  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# )ÚFULL_OBJECTrõ   ÚChecksumÚ ÚChecksumAlgorithmr  r  r  r	  )r:   r
  Úupload_partr9   r­   Ú	upload_id)r:   r
  Úpending_main_kwargsr  ÚpartsT)r:   r
  r  r  N)r”   r–   r   r	  ÚreplaceÚ_extra_create_multipart_argsr8   r  r
   r  r  Ú_extra_upload_part_argsr  r™   r   Úadjust_chunksizeÚmultipart_chunksizer{   ÚappendÚUploadPartTaskÚ_extra_complete_multipart_argsr	   )r   r  rs   r\   r  rn   r  r–   ÚchecksumÚcreate_multipart_extra_argsÚcreate_multipart_futureÚpart_futuresÚextra_part_argsÚupload_part_tagr™   Úadjusterrz   Úpart_iteratorr­   r9   Úcomplete_multipart_extra_argss   &&&&&&&              r   r   Ú.UploadSubmissionTask._submit_multipart_request“  sS  € ð $×(Ñ(×2Ñ2ˆ	÷ 2ˆHØ×/Ñ/Ö/Ø7D�	×$Ñ$ ^Ñ4Ø<D×<LÑ<LØ ó=�	×$Ñ$Ð%8Ó9ñ 2ð '+×&GÑ&GØ× Ñ ó'
Ð#ð
 #'×"<Ñ"<×"CÑ"CØÜ%Ø%)×%?Ñ%?à˜fØ˜i×.Ñ.Ø˜9Ÿ=™=Ø Ð"=ð	ôó#
Ðð ˆØ×6Ñ6°y×7KÑ7KÓ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	  s   &&r   r   Ú,UploadSubmissionTask._extra_upload_part_argsö  s   € ô ! ×-BÑ-BÓCÐCr   c                ó,   € \        WP                  4      # r   )r   ÚCOMPLETE_MULTIPART_ARGSr2  s   &&r   r%  Ú3UploadSubmissionTask._extra_complete_multipart_argsû  s   € Ü  ×-IÑ-IÓJÐJr   c                ó.   € \        WP                  R 7      # ©)Úblocklisted_keys)r   ÚCREATE_MULTIPART_BLOCKLISTr2  s   &&r   r  Ú1UploadSubmissionTask._extra_create_multipart_argsþ  s   € Ü Ø×)HÑ)Hô
ð 	
r   c                ó.   € \        WP                  R 7      # r8  )r   ÚPUT_OBJECT_BLOCKLISTr2  s   &&r   r  Ú+UploadSubmissionTask._extra_put_object_args  s   € Ü Ø×)BÑ)Bô
ð 	
r   c                óD   € R pVP                  V4      '       d   \        pV# r   )rj   r   )r   r  ri   r  s   &&& r   r  Ú)UploadSubmissionTask._get_upload_task_tag  s"   € ØˆØ×5Ñ5°n×EÒEÜ&ˆCØˆ
r   rM   )r  ÚSSECustomerKeyÚSSECustomerAlgorithmÚSSECustomerKeyMD5ÚRequestPayerÚExpectedBucketOwner)rA  rB  rC  rD  rE  rõ   rö   r   )r+   r,   r-   r.   rV   r=  r   r:  r1  r5  rü   r  rÿ   r   r   r%  r  r  r  r/   r0   r1   s   @r   rô   rô     ss   ø‡ € Ù8à*¨OÐ<Ðà!:¸oÐ=NÕ!NÐòÐòð 	"õ"Ðò
ô07òr%
òNa
òFDò
Kò
ò

÷
ð r   rô   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                ó„   € 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ÚBodyNrM   )rÅ   )r   r  r9   r  r  r	  rå   s   &&&&&& r   Ú_mainÚPutObjectTask._main  s7   € ÷ ‰W˜Ø×ÒÑN VÐN°ÐN¸4ÐNÀ:ÒN÷ �W�WŠWús   ‹.®?	rM   N©r+   r,   r-   r.   rV   rK  r/   r0   r1   s   @r   r  r    s   ø‡ € Ù*÷
Oð 
Or   r  c                   ó*   a € ] tR tRt o RtR tRtV tR# )r$  i  z+Task to upload a part in a multipart uploadc                ó  € 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WÙ9   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.
rH  rI  ÚUploadIdÚ
PartNumberrJ  NÚETagr  r  rM   )r  Úupper)r   r  r9   r  r  r  r­   r	  rå   ÚresponseÚetagÚpart_metadataÚalgorithm_nameÚchecksum_members   &&&&&&&&      r   rK  ÚUploadPartTask._main"  sº   € ÷, ‰W˜Ø×)Ò)ñ Øðàðð #ðð 'ð	ð
 ðð ñˆH÷ ð ˜ÕˆØ  |°[ÐAˆØ *Ô,Ø'Ð(;Õ<×BÑBÓDˆNØ (¨Ð(8Ð9ˆOØÔ*Ø19Õ1J�Ñ.ØÐ÷! �Wús   ‹A4Á4B	rM   NrM  r1   s   @r   r$  r$    s   ø‡ € Ù5÷&ð &r   r$  )r¼   Úior   Ús3transfer.compatr   r   Ús3transfer.constantsr   Ús3transfer.futuresr   Ús3transfer.tasksr	   r
   r   r   Ús3transfer.utilsr   r   r   r   r   r4   rX   rŒ   rÁ   rÓ   rô   r  r$  rM   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   