Files
old-parkingkoncept/parkingkonceptvenv/lib/python3.7/site-packages/s3transfer/__pycache__/copies.cpython-37.pyc

88 lines
7.6 KiB
Plaintext
Raw Normal View History

2019-11-17 12:44:16 +01:00
B
<00>[<5B>]<5D>3<00>@s<>ddlZddlZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm
Z
dd lm Z Gd
d <0B>d e<04>Z Gd d <0A>d e<03>Z Gdd<0F>de<03>ZdS)<10>N)<01>Task)<01>SubmissionTask)<01>CreateMultipartUploadTask)<01>CompleteMultipartUploadTask)<01> get_callbacks)<01>calculate_range_parameter)<01>get_filtered_dict)<01>ChunksizeAdjusterc @s<>eZdZdZdddddddd d
<EFBFBD>Zd d d dddddddd g Zd d d dddddgZd gZdd<14>Zdd<16>Z dd<18>Z
dd<1A>Z dd<1C>Z dd<1E>Z dd <20>Zd!S)"<22>CopySubmissionTaskz+Task for submitting tasks to execute a copyZIfMatchZIfModifiedSinceZ IfNoneMatchZIfUnmodifiedSinceZSSECustomerKeyZSSECustomerAlgorithmZSSECustomerKeyMD5<44> RequestPayer)<08>CopySourceIfMatch<63>CopySourceIfModifiedSince<63>CopySourceIfNoneMatch<63>CopySourceIfUnmodifiedSince<63>CopySourceSSECustomerKey<65>CopySourceSSECustomerAlgorithm<68>CopySourceSSECustomerKeyMD5r r r rrrrrZMetadataDirectivec Cs<>|jjdkrr|jj}|<00>|j<04>}|j}x,|<08><06>D] \} }
| |jkr0|
||j| <q0W|jj f|<07>} |j<00>
| d<00>|jj|j kr<>|<00> |||||<05>n|<00> |||||<05>dS)a<>
: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
NZ ContentLength)<0E>meta<74>size<7A> call_args<67>)_get_head_object_request_from_copy_source<63> copy_source<63>
extra_args<EFBFBD>items<6D>EXTRA_ARGS_TO_HEAD_ARGS_MAPPINGZ source_clientZ head_objectZprovide_transfer_sizeZmultipart_threshold<6C>_submit_copy_request<73>_submit_multipart_request) <0C>self<6C>client<6E>config<69>osutil<69>request_executor<6F>transfer_futurerZhead_object_requestr<00>param<61>value<75>response<73>r&<00>9/tmp/pip-install-u_6_z2pz/s3transfer/s3transfer/copies.py<70>_submitEs" 

zCopySubmissionTask._submitc CsL|jj}t|d<01>}|j<03>|t|j||j|j|j|j ||jj
d<02>dd<04><03>dS)N<>progress)rr<00>bucket<65>keyr<00> callbacksrT)<03>transfer_coordinator<6F> main_kwargs<67>is_final) rrr<00>_transfer_coordinator<6F>submit<69>CopyObjectTaskrr*r+rr)rrrr r!r"r<00>progress_callbacksr&r&r'r{s

z'CopySubmissionTask._submit_copy_requestcCsr|jj}i}x(|j<02><03>D]\}} ||jkr| ||<qW|j<05>|t|j||j|j |d<01>d<02><02>}
|j
} t <0B>} | <0C> | |jj <0A>} tt<0F>|jj t| <0B><00><01>} g}t|d<03>}x<>td| d<00>D]~}|<00>|j<02>}t| |d| |jj <0A>|d<|<00>| |d| |jj <0A>}|<0E>|j<05>|t|j||j|j|j ||||d<06>d|
id<08><03><02>q<>W|<00>|j<02>}|j<05>|t|j||j|j |d<01>|
|d <09>d
d <0B><04>dS) N)rr*r+r)r-r.r)<00>ZCopySourceRange)rrr*r+<00> part_numberrr,r<00> upload_id)r-r.<00>pending_main_kwargs)r6<00>partsT)r-r.r7r/)rrrr<00>CREATE_MULTIPART_ARGS_BLACKLISTr0r1rr*r+Zmultipart_chunksizer Zadjust_chunksizer<00>int<6E>math<74>ceil<69>floatr<00>range<67>_extra_upload_part_argsr<00>_get_transfer_size<7A>append<6E> CopyPartTaskr<00>_extra_complete_multipart_argsr)rrrr r!r"rZcreate_multipart_extra_argsr#<00>valZcreate_multipart_future<72> part_sizeZadjuster<65> num_partsZ part_futuresr3r5Zextra_part_argsrZcomplete_multipart_extra_argsr&r&r'r<00>sn
  
z,CopySubmissionTask._submit_multipart_requestcCs,t|t<01>rt<02>|<01>Std|t|<01>f<00><01>dS)NzZExpecting dictionary formatted: {"Bucket": bucket_name, "Key": key} but got %s or type %s.)<05>
isinstance<EFBFBD>dict<63>copy<70> TypeError<6F>type)rrr&r&r'r<00>s


z<CopySubmissionTask._get_head_object_request_from_copy_sourcecCs t||j<01>S)N)r<00>UPLOAD_PART_COPY_ARGS)rrr&r&r'r?<00>sz*CopySubmissionTask._extra_upload_part_argscCs t||j<01>S)N)r<00>COMPLETE_MULTIPART_ARGS)rrr&r&r'rCsz1CopySubmissionTask._extra_complete_multipart_argscCs||dkr|||S|S)Nr4r&)rrEZ
part_indexrFZtotal_transfer_sizer&r&r'r@s  z%CopySubmissionTask._get_transfer_sizeN)<0F>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rrLr9rMr(rrrr?rCr@r&r&r&r'r
sH6] r
c@seZdZdZdd<03>ZdS)r2zTask to do a nonmultipart copyc Cs4|jf|||d<01>|<05><02>x|D]}||d<02>qWdS)a<>
:param client: The client to use when calling PutObject
:param copy_source: The CopySource parameter to use
:param bucket: The name of the bucket to copy to
:param key: The name of the key to copy to
:param extra_args: A dictionary of any extra arguments that may be
used in the upload.
:param callbacks: List of callbacks to call after copy
:param size: The size of the transfer. This value is passed into
the callbacks
)<03>
CopySource<EFBFBD>Bucket<65>Key)<01>bytes_transferredN)Z copy_object) rrrr*r+rr,r<00>callbackr&r&r'<00>_mains
zCopyObjectTask._mainN)rNrOrPrQrWr&r&r&r'r2 sr2c@seZdZdZdd<03>ZdS)rBz)Task to upload a part in a multipart copyc
CsJ|jf|||||d<01>|<07><02>}
x|D]} | | d<02>q"W|
dd} | |d<05>S)a<>
:param client: The client to use when calling PutObject
:param copy_source: The CopySource parameter to use
: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.
:param callbacks: List of callbacks to call after copy part
:param size: The size of the transfer. This value is passed into
the callbacks
: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.
)rRrSrTZUploadId<49>
PartNumber)rUZCopyPartResult<6C>ETag)rYrX)Zupload_part_copy) rrrr*r+r6r5rr,rr%rV<00>etagr&r&r'rW%s
 zCopyPartTask._mainN)rNrOrPrQrWr&r&r&r'rB#srB)rIr;Zs3transfer.tasksrrrrZs3transfer.utilsrrrr r
r2rBr&r&r&r'<00><module> s        t