ó
    &ÝNj|  ã                   ó0  • S SK r S SKJr  S SKJrJr  S SKJr  S SKJ	r	  S SK
JrJrJrJr  S SKJrJrJrJr   " S S	5      r " S
 S5      r " S S5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      r " S S\5      rg)é    N)ÚBytesIO©ÚreadableÚseekable)ÚFULL_OBJECT_CHECKSUM_ARGS)ÚIN_MEMORY_UPLOAD_TAG)ÚCompleteMultipartUploadTaskÚCreateMultipartUploadTaskÚSubmissionTaskÚTask)ÚChunksizeAdjusterÚDeferredOpenFileÚget_callbacksÚget_filtered_dictc                   ó0   • \ rS rSrSS jrS rS rS rSrg)	ÚAggregatedProgressCallbacké!   c                 ó*   • Xl         X l        SU l        g)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
r   N)Ú
_callbacksÚ
_thresholdÚ_bytes_seen)ÚselfÚ	callbacksÚ	thresholds      ÚN/home/mande/repo/quber/.venv/lib/python3.13/site-packages/s3transfer/upload.pyÚ__init__Ú#AggregatedProgressCallback.__init__"   s   € ð $ŒØ#ŒØˆÕó    c                 ó„   • U =R                   U-  sl         U R                   U R                  :¼  a  U R                  5         g g ©N)r   r   Ú_trigger_callbacks)r   Úbytes_transferreds     r   Ú__call__Ú#AggregatedProgressCallback.__call__2   s7   € Ø×ÒÐ-Ñ-ÕØ×Ñ˜tŸ™Ó.Ø×#Ñ#Õ%ð /r   c                 óF   • U R                   S:”  a  U R                  5         gg)z@Flushes out any progress that has not been sent to its callbacksr   N)r   r!   ©r   s    r   ÚflushÚ AggregatedProgressCallback.flush7   s!   € à×Ñ˜aÓØ×#Ñ#Õ%ð  r   c                 óX   • U R                    H  nU" U R                  S9  M     SU l        g )N)r"   r   )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__© r   r   r   r   !   s   † ôò &ò
&õ
r   r   c                   óJ   • \ rS rSrSrS rSS jrSS jrS rS r	S	 r
S
 rSrg)ÚInterruptReaderéB   a¯  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                 ó   • Xl         X l        g r    ©Ú_fileobjÚ_transfer_coordinator)r   ÚfileobjÚtransfer_coordinators      r   r   ÚInterruptReader.__init__P   s   € ØŒØ%9Õ"r   Nc                 óš   • U R                   R                  (       a  U R                   R                  eU R                  R                  U5      $ r    )r8   Ú	exceptionr7   Úread)r   Úamounts     r   r>   ÚInterruptReader.readT   s:   € ð ×%Ñ%×/×/Ø×,Ñ,×6Ñ6Ð6Ø�}‰}×!Ñ! &Ó)Ð)r   c                 ó:   • U R                   R                  X5        g r    )r7   Úseek)r   ÚwhereÚwhences      r   rB   ÚInterruptReader.seek^   s   € Ø�‰×Ñ˜5Õ)r   c                 ó6   • U R                   R                  5       $ r    )r7   Útellr&   s    r   rG   ÚInterruptReader.tella   s   € Ø�}‰}×!Ñ!Ó#Ð#r   c                 ó8   • U R                   R                  5         g r    )r7   Úcloser&   s    r   rJ   ÚInterruptReader.closed   s   € Ø�‰×ÑÕr   c                 ó   • U $ r    r1   r&   s    r   Ú	__enter__ÚInterruptReader.__enter__g   s   € Øˆr   c                 ó$   • U R                  5         g 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   rM   rR   r0   r1   r   r   r3   r3   B   s*   † ñò:ô*ô*ò$òòõr   r3   c                   ób   • \ rS rSrSrSS jr\S 5       rS rS r	S r
S	 rS
 rS rS rS rSrg)ÚUploadInputManagerén   a"  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                 ó(   • Xl         X l        X0l        g r    )Ú_osutilr8   Ú_bandwidth_limiter)r   Úosutilr:   Úbandwidth_limiters       r   r   ÚUploadInputManager.__init__~   s   € ØŒØ%9Ô"Ø"3Õr   c                 ó   • [        S5      e)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                 ó   • [        S5      e)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                 ó   • [        S5      e)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                 ó   • [        S5      e)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   rm   Úconfigs      r   Úrequires_multipart_uploadÚ,UploadInputManager.requires_multipart_upload¦   s   € ô "Ð"NÓOÐOr   c                 ó   • [        S5      e)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_   rl   s     r   Úget_put_object_bodyÚ&UploadInputManager.get_put_object_bodyµ   s   € ô "Ð"HÓIÐIr   c                 ó   • [        S5      e)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   rm   Ú	chunksizes      r   Úyield_upload_part_bodiesÚ+UploadInputManager.yield_upload_part_bodiesÄ   s   € ô "Ð"MÓNÐNr   c                 óš   • [        XR                  5      nU R                  (       a$  U R                  R                  XR                  SS9nU$ )NF)Úenabled)r3   r8   rZ   Úget_bandwith_limited_stream)r   r9   s     r   Ú_wrap_fileobjÚ UploadInputManager._wrap_fileobjÔ   sI   € Ü! '×+EÑ+EÓFˆØ×"×"Ø×-Ñ-×IÑIØ×3Ñ3¸Uð Jð ˆGð ˆr   c                 óD   • [        US5      nU(       a  [        U5      /$ / $ )NÚprogress)r   r   )r   rm   r   s      r   Ú_get_progress_callbacksÚ*UploadInputManager._get_progress_callbacksÜ   s&   € Ü! /°:Ó>ˆ	ö Ü.¨yÓ9Ð:Ð:Øˆ	r   c                 óD   • U Vs/ s H  o"R                   PM     sn$ s  snf r    )r'   )r   Úaggregated_progress_callbacksr*   s      r   Ú_get_close_callbacksÚ'UploadInputManager._get_close_callbackså   s   € Ù/LÓMÒ/L 8—”Ñ/LÑMÐMùÒMs   …)rZ   rY   r8   r    )r,   r-   r.   r/   rT   r   Úclassmethodrd   ri   rn   rs   rv   rz   r   rƒ   r‡   r0   r1   r   r   rV   rV   n   sP   † ñô4ð
 ñ	Eó ð	EòKòLòPòJòOò òõNr   rV   c                   ó^   • \ rS rSrSr\S 5       rS rS rS r	S r
S rS	 rS
 rS rS rSrg)ÚUploadFilenameInputManageréé   zUpload utility for filenamesc                 ó"   • [        U[        5      $ r    )Ú
isinstanceÚstrra   s     r   rd   Ú(UploadFilenameInputManager.is_compatibleì   s   € ä˜-¬Ó-Ð-r   c                 ó   • g)NFr1   rg   s     r   ri   Ú0UploadFilenameInputManager.stores_body_in_memoryð   s   € Ør   c                 ó¨   • UR                   R                  U R                  R                  UR                   R                  R
                  5      5        g r    )Úmetarn   rY   Úget_file_sizeÚ	call_argsr9   rl   s     r   rn   Ú0UploadFilenameInputManager.provide_transfer_sizeó   s:   € Ø×Ñ×2Ñ2Ø�L‰L×&Ñ& ×';Ñ';×'EÑ'E×'MÑ'MÓNõ	
r   c                 óH   • UR                   R                  UR                  :¬  $ r    )r”   ÚsizeÚmultipart_thresholdrq   s      r   rs   Ú4UploadFilenameInputManager.requires_multipart_uploadø   s   € Ø×#Ñ#×(Ñ(¨F×,FÑ,FÑFÐFr   c                 óô   • U R                  U5      u  p#U R                  U5      nU R                  U5      nU R                  U5      nUR                  R
                  nU R                  R                  UUUUUS9$ )N©r9   Ú
chunk_sizeÚfull_file_sizer   Úclose_callbacks)Ú&_get_put_object_fileobj_with_full_sizer   rƒ   r‡   r”   r™   rY   Ú#open_file_chunk_reader_from_fileobj)r   rm   r9   Ú	full_sizer   r    r™   s          r   rv   Ú.UploadFilenameInputManager.get_put_object_bodyû   s‰   € à!×HÑHØó
Ñˆð ×$Ñ$ WÓ-ˆà×0Ñ0°ÓAˆ	Ø×3Ñ3°IÓ>ˆØ×#Ñ#×(Ñ(ˆð �|‰|×?Ñ?ØØØ$ØØ+ð @ð 
ð 	
r   c           	   #   ó¢  #   • UR                   R                  nU R                  X5      n[        SUS-   5       H‘  nU R	                  U5      nU R                  U5      nX%S-
  -  nU R                  UR                   R                  R                  UUUS9u  pšU R                  U	5      n	U R                  R                  U	UU
UUS9nX[4v •  M“     g 7f)Né   )Ú
start_byteÚ	part_sizerŸ   r�   )r”   r™   Ú_get_num_partsÚrangerƒ   r‡   Ú'_get_upload_part_fileobj_with_full_sizer–   r9   r   rY   r¢   )r   rm   ry   rŸ   Ú	num_partsÚpart_numberr   r    r§   r9   r£   Úread_file_chunks               r   rz   Ú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                 óB   • [        XU R                  R                  S9nU$ )N)Úopen_function)r   rY   Úopen)r   r9   r§   s      r   Ú_get_deferred_open_fileÚ2UploadFilenameInputManager._get_deferred_open_file2  s"   € Ü"Ø¨t¯|©|×/@Ñ/@ñ
ˆð ˆr   c                 ó–   • UR                   R                  R                  nUR                   R                  nU R	                  US5      U4$ )Nr   )r”   r–   r9   r™   r³   ©r   rm   r9   r™   s       r   r¡   ÚAUploadFilenameInputManager._get_put_object_fileobj_with_full_size8  sB   € Ø!×&Ñ&×0Ñ0×8Ñ8ˆØ×#Ñ#×(Ñ(ˆØ×+Ñ+¨G°QÓ7¸Ð=Ð=r   c                 ó<   • US   nUS   nU R                  X5      U4$ )Nr§   rŸ   )r³   )r   r9   rQ   r§   r£   s        r   r«   ÚBUploadFilenameInputManager._get_upload_part_fileobj_with_full_size=  s-   € Ø˜LÑ)ˆ
ØÐ+Ñ,ˆ	Ø×+Ñ+¨GÓ@À)ÐKÐKr   c                 ó€   • [        [        R                  " UR                  R                  [        U5      -  5      5      $ r    )ÚintÚmathÚceilr”   r™   Úfloat)r   rm   r¨   s      r   r©   Ú)UploadFilenameInputManager._get_num_partsB  s,   € Ü”4—9’9˜_×1Ñ1×6Ñ6¼¸yÓ9IÑIÓJÓKÐKr   r1   N)r,   r-   r.   r/   rT   r‰   rd   ri   rn   rs   rv   rz   r³   r¡   r«   r©   r0   r1   r   r   r‹   r‹   é   sG   † Ù&àñ.ó ð.òò
ò
Gò
ò0/ò>ò>ò
Lõ
Lr   r‹   c                   ó@   • \ rS rSrSr\S 5       rS rS rS r	S r
Srg	)
ÚUploadSeekableInputManageriF  z&Upload utility for an open file objectc                 ó<   • [        U5      =(       a    [        U5      $ r    r   ra   s     r   rd   Ú(UploadSeekableInputManager.is_compatibleI  s   € ä˜Ó&×B¬8°MÓ+BÐBr   c                 ó   • US:X  a  gg)NÚ
put_objectFTr1   rg   s     r   ri   Ú0UploadSeekableInputManager.stores_body_in_memoryM  s   € Ø˜\Ó)Øàr   c                 ó  • UR                   R                  R                  nUR                  5       nUR	                  SS5        UR                  5       nUR	                  U5        UR                   R                  XC-
  5        g )Nr   é   )r”   r–   r9   rG   rB   rn   )r   rm   r9   Ústart_positionÚend_positions        r   rn   Ú0UploadSeekableInputManager.provide_transfer_sizeS  se   € Ø!×&Ñ&×0Ñ0×8Ñ8ˆð !Ÿ™›ˆØ�‰�Q˜ÔØ—|‘|“~ˆØ�‰�^Ô$Ø×Ñ×2Ñ2ØÑ)õ	
r   c                 óV   • UR                  US   5      n[        U5      [        U5      4$ )Nr¨   )r>   r   Úlen)r   r9   rQ   Údatas       r   r«   ÚBUploadSeekableInputManager._get_upload_part_fileobj_with_full_size`  s,   € ð �|‰|˜F ;Ñ/Ó0ˆô �t‹}œc $›iÐ'Ð'r   c                 ó–   • UR                   R                  R                  nUR                  5       UR                   R                  -   nX#4$ 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   r1   N)r,   r-   r.   r/   rT   r‰   rd   ri   rn   r«   r¡   r0   r1   r   r   rÁ   rÁ   F  s-   † Ù0àñCó ðCòò
ò(õr   rÁ   c                   ón   ^ • \ rS rSrSrSU 4S jjr\S 5       rS rS r	S r
S rS	 rSS
 jrS rSrU =r$ )ÚUploadNonSeekableInputManageriw  z7Upload utility for a file-like object that cannot seek.c                 ó4   >• [         TU ]  XU5        SU l        g )Nr   )Úsuperr   Ú_initial_data)r   r[   r:   r\   Ú	__class__s       €r   r   Ú&UploadNonSeekableInputManager.__init__z  s   ø€ Ü‰Ñ˜Ð7HÔIØ ˆÕr   c                 ó   • [        U5      $ r    )r   ra   s     r   rd   Ú+UploadNonSeekableInputManager.is_compatible~  s   € ä˜Ó&Ð&r   c                 ó   • g)NTr1   rg   s     r   ri   Ú3UploadNonSeekableInputManager.stores_body_in_memory‚  s   € Ør   c                 ó   • g r    r1   rl   s     r   rn   Ú3UploadNonSeekableInputManager.provide_transfer_size…  s   € ð 	r   c                 ó2  • UR                   R                  b#  UR                   R                  UR                  :¬  $ UR                   R                  R                  nUR                  nU R                  X4S5      U l        [        U R                  5      U:  a  gg)NFT)r”   r™   rš   r–   r9   Ú_readrÖ   rÍ   )r   rm   rr   r9   r   s        r   rs   Ú7UploadNonSeekableInputManager.requires_multipart_uploadŠ  s�   € à×Ñ×$Ñ$Ñ0Ø"×'Ñ'×,Ñ,°×0JÑ0JÑJÐJð "×&Ñ&×0Ñ0×8Ñ8ˆØ×.Ñ.ˆ	Ø!ŸZ™Z¨¸EÓBˆÔÜˆt×!Ñ!Ó" YÓ.Øàr   c                 óò   • U R                  U5      nU R                  U5      nUR                  R                  R                  nU R                  U R                  UR                  5       -   X#5      nS U l        U$ r    )rƒ   r‡   r”   r–   r9   Ú
_wrap_datarÖ   r>   )r   rm   r   r    r9   Úbodys         r   rv   Ú1UploadNonSeekableInputManager.get_put_object_body›  sl   € Ø×0Ñ0°ÓAˆ	Ø×3Ñ3°IÓ>ˆØ!×&Ñ&×0Ñ0×8Ñ8ˆà�‰Ø×Ñ §¡£Ñ/°ó
ˆð "ˆÔØˆr   c              #   ó  #   • UR                   R                  R                  nSn U R                  U5      nU R	                  U5      nUS-  nU R                  X25      nU(       d  g U R                  XuU5      nS nXH4v •  M[  7f)Nr   r¦   )r”   r–   r9   rƒ   r‡   rà   rã   )	r   rm   ry   Úfile_objectr­   r   r    Úpart_contentÚpart_objects	            r   rz   Ú6UploadNonSeekableInputManager.yield_upload_part_bodies©  sŒ   é € Ø%×*Ñ*×4Ñ4×<Ñ<ˆØˆð Ø×4Ñ4°_ÓEˆIØ"×7Ñ7¸	ÓBˆOØ˜1ÑˆKØŸ:™: kÓ=ˆLÞØØŸ/™/Ø¨óˆKð
  ˆLØÐ*Ò*ñ ùs   ‚A?Bc                 ól  • [        U R                  5      S:X  a  UR                  U5      $ U[        U R                  5      ::  a,  U R                  SU nU(       a  U R                  US U l        U$ U[        U R                  5      -
  nU R                  UR                  U5      -   nU(       a  SU l        U$ )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.
r   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                 ó”   • U R                  [        U5      5      nU R                  R                  U[	        U5      [	        U5      UUS9$ )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   rY   r¢   rÍ   )r   rÎ   r   r    r9   s        r   rã   Ú(UploadNonSeekableInputManager._wrap_dataç  sL   € ð  ×$Ñ$¤W¨T£]Ó3ˆØ�|‰|×?Ñ?ØÜ˜4“yÜ˜t›9ØØ+ð @ð 
ð 	
r   )rÖ   r    )T)r,   r-   r.   r/   rT   r   r‰   rd   ri   rn   rs   rv   rz   rà   rã   r0   Ú__classcell__)r×   s   @r   rÓ   rÓ   w  sH   ø† ÙA÷!ð ñ'ó ð'òòò
ò"ò+ô((÷T
ð 
r   rÓ   c                   ó~   • \ rS rSrSrSS/r\S/-   r/ SQr/ SQ\-   r	S r
 SS	 jrS
 rS rS rS rS rS rS rSrg)ÚUploadSubmissionTaski  z.Task for submitting tasks to execute an uploadÚChecksumTypeÚMpuObjectSize)ÚChecksumAlgorithmÚSSECustomerKeyÚSSECustomerAlgorithmÚSSECustomerKeyMD5ÚRequestPayerÚExpectedBucketOwner)r÷   rø   rù   rú   rû   rô   rõ   c                 óà   • [         [        [        /nUR                  R                  R
                  nU H  nUR                  U5      (       d  M  Us  $    [        SU S[        U5       S35      e)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   rd   ÚRuntimeErrorÚtype)r   rm   Ú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                 ó  • U R                  U5      " X0R                  U5      nUR                  R                  c  UR	                  U5        UR                  XR5      (       d  U R                  UUUUUU5        gU R                  UUUUUU5        g)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™   rn   rs   Ú_submit_upload_requestÚ_submit_multipart_request)r   Úclientrr   r[   Úrequest_executorrm   r\   Úupload_input_managers           r   Ú_submitÚUploadSubmissionTask._submit3  s¨   € ð6  $×AÑAØô 
à
×,Ñ,Ð.?ó AÐð
 ×Ñ×$Ñ$Ñ,Ø ×6Ñ6°ÔGð $×=Ñ=Ø÷
ñ 
ð ×'Ñ'ØØØØ ØØ$õð ×*Ñ*ØØØØ ØØ$õr   c                 ó8  • UR                   R                  nU R                  UR                  5      nU R	                  US5      n	U R
                  R                  U[        U R
                  UUR                  U5      UR                  UR                  US.SS9U	S9  g )NrÅ   )r  r9   ÚbucketÚkeyÚ
extra_argsT)r:   Úmain_kwargsÚis_final©Útag)r”   r–   Ú_extra_put_object_argsr  Ú_get_upload_task_tagr8   ÚsubmitÚPutObjectTaskrv   r  r  )
r   r  rr   r[   r  rm   r  r–   Úput_object_extra_argsÚput_object_tags
             r   r  Ú+UploadSubmissionTask._submit_upload_requestl  s­   € ð $×(Ñ(×2Ñ2ˆ	à $× ;Ñ ;Ø× Ñ ó!
Ðð
 ×2Ñ2Ø  ,ó
ˆð
 	×"Ñ"×)Ñ)ØÜØ%)×%?Ñ%?à$Ø3×GÑGØ'ó ð (×.Ñ.Ø$Ÿ=™=Ø"7ñð ñð ð 	*ò 	
r   c                 ó   • UR                   R                  n[         HB  nX‡R                  ;   d  M  SUR                  S'   UR	                  SS5      UR                  S'   MD     U R                  UR                  5      n	U R                  R                  U[        U R                  UUR                  UR                  U	S.S95      n
/ nU R                  UR                  5      nU R                  US5      nUR                   R                  n[        5       nUR                  UR                   U5      nUR#                  UU5      nU H`  u  nnUR%                  U R                  R                  U['        U R                  UUUR                  UR                  UUS	.S
U
0S9US95        Mb     U R)                  UR                  5      nU R                  R                  U[+        U R                  UUR                  UR                  US.U
US.SS95        g )NÚFULL_OBJECTrô   ÚChecksumÚ rö   )r  r  r  r  )r:   r  Úupload_part)r  r9   r  r  r­   r  Ú	upload_id)r:   r  Úpending_main_kwargsr  )r  ÚpartsT)r:   r  r   r  )r”   r–   r   r  ÚreplaceÚ_extra_create_multipart_argsr8   r  r
   r  r  Ú_extra_upload_part_argsr  r™   r   Úadjust_chunksizeÚmultipart_chunksizerz   ÚappendÚUploadPartTaskÚ_extra_complete_multipart_argsr	   )r   r  rr   r[   r  rm   r  r–   ÚchecksumÚcreate_multipart_extra_argsÚcreate_multipart_futureÚpart_futuresÚextra_part_argsÚupload_part_tagr™   Úadjusterry   Úpart_iteratorr­   r9   Úcomplete_multipart_extra_argss                        r   r  Ú.UploadSubmissionTask._submit_multipart_request“  s0  € ð $×(Ñ(×2Ñ2ˆ	÷ 2ˆHØ×/Ñ/Õ/Ø7D�	×$Ñ$ ^Ñ4Ø<D×<LÑ<LØ ó=�	×$Ñ$Ð%8Ó9ñ 2ð '+×&GÑ&GØ× Ñ ó'
Ð#ð
 #'×"<Ñ"<×"CÑ"CØÜ%Ø%)×%?Ñ%?à$Ø'×.Ñ.Ø$Ÿ=™=Ø"=ñ	ñó#
Ðð ˆØ×6Ñ6°y×7KÑ7KÓLˆð ×3Ñ3Ø  -ó
ˆð ×#Ñ#×(Ñ(ˆÜ$Ó&ˆØ×-Ñ-¨f×.HÑ.HÈ$ÓOˆ	Ø,×EÑEØ˜Yó
ˆó %2Ñ ˆK˜Ø×ÑØ×*Ñ*×1Ñ1Ø$Ü"Ø-1×-GÑ-Gà&,Ø'.Ø&/×&6Ñ&6Ø#,§=¡=Ø+6Ø*9ñ%ð (Ð)@ð-ñð (ð! 2ð öñ %2ð, )-×(KÑ(KØ× Ñ ó)
Ð%ð 	×"Ñ"×)Ñ)ØÜ'Ø%)×%?Ñ%?à$Ø'×.Ñ.Ø$Ÿ=™=Ø"?ñ	ð "9Ø)ñ%ð ñõ	
r   c                 ó,   • [        XR                  5      $ r    )r   ÚUPLOAD_PART_ARGS©r   r  s     r   r$  Ú,UploadSubmissionTask._extra_upload_part_argsö  s   € ô ! ×-BÑ-BÓCÐCr   c                 ó,   • [        XR                  5      $ r    )r   ÚCOMPLETE_MULTIPART_ARGSr6  s     r   r)  Ú3UploadSubmissionTask._extra_complete_multipart_argsû  s   € Ü  ×-IÑ-IÓJÐJr   c                 ó(   • [        XR                  S9$ ©N)Úblocklisted_keys)r   ÚCREATE_MULTIPART_BLOCKLISTr6  s     r   r#  Ú1UploadSubmissionTask._extra_create_multipart_argsþ  s   € Ü Ø×)HÑ)Hñ
ð 	
r   c                 ó(   • [        XR                  S9$ r<  )r   ÚPUT_OBJECT_BLOCKLISTr6  s     r   r  Ú+UploadSubmissionTask._extra_put_object_args  s   € Ü Ø×)BÑ)Bñ
ð 	
r   c                 óB   • S nUR                  U5      (       a  [        nU$ r    )ri   r   )r   r  rh   r  s       r   r  Ú)UploadSubmissionTask._get_upload_task_tag  s"   € ØˆØ×5Ñ5°n×EÑEÜ&ˆCØˆ
r   r1   r    )r,   r-   r.   r/   rT   rA  r   r>  r5  r9  r  r	  r  r  r$  r)  r#  r  r  r0   r1   r   r   ró   ró     sp   † Ù8à*¨OÐ<Ðà!:¸oÐ=NÑ!NÐòÐòð 	"ñ"Ðò
ð> ô7òr%
òNa
òFDò
Kò
ò

õ
r   ró   c                   ó   • \ rS rSrSrS rSrg)r  i  z Task to do a nonmultipart uploadc                 óf   • U nUR                   " SX4US.UD6  SSS5        g! , (       d  f       g= f)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ÚBodyNr1   )rÅ   )r   r  r9   r  r  r  rä   s          r   Ú_mainÚPutObjectTask._main  s+   € ñ ˜Ø×ÒÐN V¸4ÑNÀ:ÒN÷ �WŽWús   ƒ"¢
0r1   N©r,   r-   r.   r/   rT   rJ  r0   r1   r   r   r  r    s   † Ù*õ
Or   r  c                   ó   • \ rS rSrSrS rSrg)r(  i  z+Task to upload a part in a multipart uploadc           
      óÒ   • U nUR                   " SUUUUUS.UD6n	SSS5        W	S   n
X¦S.nSU;   a#  US   R                  5       nSU 3nXÙ;   a  X�   X½'   U$ ! , (       d  f       NB= f)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.
)rG  rH  ÚUploadIdÚ
PartNumberrI  NÚETag)rQ  rP  rö   r  r1   )r  Úupper)r   r  r9   r  r  r  r­   r  rä   ÚresponseÚetagÚpart_metadataÚalgorithm_nameÚchecksum_members                 r   rJ  ÚUploadPartTask._main"  s˜   € ñ, ˜Ø×)Ò)ð ØØØ"Ø&Øñð ñˆH÷ ð ˜ÑˆØ!%ÑAˆØ *Ó,Ø'Ð(;Ñ<×BÑBÓDˆNØ (¨Ð(8Ð9ˆOØÓ*Ø19Ñ1J�Ñ.ØÐ÷! �Wús   ƒAÁ
A&r1   NrL  r1   r   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   r3   rV   r‹   rÁ   rÓ   ró   r  r(  r1   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   