o
    zl~i{x                     @   s  d dl Z d dlZd dlmZ d dlZd dlZd dlZd dl	m
Z
mZ d dlmZmZmZmZmZ d dlmZmZmZmZmZ d dlmZ d dlmZ d dlmZ d d	lmZ d d
lm Z  d dl!m"Z" d dl#m$Z$m%Z% d dl&m'Z'm(Z(m)Z) e *e+Z,da-dd Z.dddde  ddfddZ/d.ddZ0G dd dZ1G dd de%Z2G dd de$Z3G dd dZ4G dd de4Z5G d d! d!eZ6G d"d# d#Z7G d$d% d%Z8G d&d' d'Z9G d(d) d)Z:G d*d+ d+Z;G d,d- d-Z<dS )/    N)BytesIO)AwsCredentialsAwsCredentialsProvider)ClientBootstrapClientTlsContextDefaultHostResolverEventLoopGroupTlsContextOptions)S3ClientS3RequestTlsModeS3RequestTypeS3ResponseError&get_recommended_throughput_target_gbps)UNSIGNED)urlsplit)Config)NoCredentialsError)MB)TransferNotDoneError)BaseTransferFutureBaseTransferMeta)CallArgsOSUtilsget_callbacksc                 C   s>   t d u rtj| }z|  W n
 ty   Y d S w |a t S N)CRT_S3_PROCESS_LOCKawscrts3CrossProcessLockacquireRuntimeError)namecrt_lock r#   U/var/www/newdalilibackend/backend/venv/lib/python3.10/site-packages/s3transfer/crt.pyacquire_crt_s3_process_lock2   s   r%      Tc              	   C   s   t |}t|}t||}	d}
|rtjntj}|dur2t }|r'|j|d nd|_t	|}|
 }
t|d}t|	| ||||
|dS )a  
    :type region: str
    :param region: The region used for signing

    :type crt_credentials_provider:
        Optional[awscrt.auth.AwsCredentialsProvider]
    :param crt_credentials_provider: CRT AWS credentials provider
        to use to sign requests. If not set, requests will not be signed.

    :type num_threads: Optional[int]
    :param num_threads: Number of worker threads generated. Default
        is the number of processors in the machine.

    :type target_throughput: Optional[int]
    :param target_throughput: Throughput target in bytes per second.
        By default, CRT will automatically attempt to choose a target
        throughput that matches the system's maximum network throughput.
        Currently, if CRT is unable to determine the maximum network
        throughput, a fallback target throughput of ``1_250_000_000`` bytes
        per second (which translates to 10 gigabits per second, or 1.16
        gibibytes per second) is used. To set a specific target
        throughput, set a value for this parameter.

    :type part_size: Optional[int]
    :param part_size: Size, in Bytes, of parts that files will be downloaded
        or uploaded in.

    :type use_ssl: boolean
    :param use_ssl: Whether or not to use SSL.  By default, SSL is used.
        Note that not all services support non-ssl connections.

    :type verify: Optional[boolean/string]
    :param verify: Whether or not to verify SSL certificates.
        By default SSL certificates are verified.  You can provide the
        following values:

        * False - do not validate SSL certificates.  SSL will still be
            used (unless use_ssl is False), but SSL certificates
            will not be verified.
        * path/to/cert/bundle.pem - A filename of the CA cert bundle to
            use. Specify this argument if you want to use a custom CA cert
            bundle instead of the default one on your system.
    N)ca_filepathF) provided_throughput_target_bytes)	bootstrapregioncredential_provider	part_sizetls_modetls_connection_optionsthroughput_target_gbps)r   r   r   r   ENABLEDDISABLEDr	   &override_default_trust_store_from_pathverify_peerr   new_connection_options_get_crt_throughput_target_gbpsr
   )r*   crt_credentials_providernum_threadstarget_throughputr,   use_sslverifyevent_loop_grouphost_resolverr)   r.   r-   tls_ctx_optionsclient_tls_optiontarget_gbpsr#   r#   r$   create_s3_crt_clientK   s6   5
r@   c                 C   sD   | d u rt  }td| |d u rd}n| d d }td| |S )Nz-Recommended CRT throughput target in gbps: %sg      $@r&   i ʚ;z'Using CRT throughput target in gbps: %s)r   loggerdebug)r(   r?   r#   r#   r$   r5      s   r5   c                   @   s   e Zd ZdddZdd Zdd Z	d dd	Zd d
dZd ddZd!ddZ	dd Z
dd Zdd Zdd Zd!ddZdd Zdd ZdS )"CRTTransferManagerNc                 C   sH   |du rt  | _|| _t|| j| _|j| _g | _t	d| _
d| _dS )aF  A transfer manager interface for Amazon S3 on CRT s3 client.

        :type crt_s3_client: awscrt.s3.S3Client
        :param crt_s3_client: The CRT s3 client, handling all the
            HTTP requests and functions under then hood

        :type crt_request_serializer: s3transfer.crt.BaseCRTRequestSerializer
        :param crt_request_serializer: Serializer, generates unsigned crt HTTP
            request.

        :type osutil: s3transfer.utils.OSUtils
        :param osutil: OSUtils object to use for os-related behavior when
            using with transfer manager.
        N   r   )r   _osutil_crt_s3_clientS3ClientArgsCreator_s3_args_creatortranslate_crt_exception_crt_exception_translator_future_coordinators	threading	Semaphore
_semaphore_id_counter)selfcrt_s3_clientcrt_request_serializerosutilr#   r#   r$   __init__   s   
zCRTTransferManager.__init__c                 C   s   | S r   r#   rP   r#   r#   r$   	__enter__   s   zCRTTransferManager.__enter__c                 G   s   d}|rd}|  | d S )NFT	_shutdown)rP   exc_type	exc_valueargscancelr#   r#   r$   __exit__   s   zCRTTransferManager.__exit__c                 C   s6   |d u ri }|d u ri }t |||||d}| d|S )Nbucketkeyfileobj
extra_argssubscribers
get_objectr   _submit_transfer)rP   r_   r`   ra   rb   rc   callargsr#   r#   r$   download   s   zCRTTransferManager.downloadc                 C   s@   |d u ri }|d u ri }|  | t|||||d}| d|S )Nr^   
put_object)&_validate_checksum_algorithm_supportedr   rf   )rP   ra   r_   r`   rb   rc   rg   r#   r#   r$   upload   s   
zCRTTransferManager.uploadc                 C   s4   |d u ri }|d u ri }t ||||d}| d|S )N)r_   r`   rb   rc   delete_objectre   )rP   r_   r`   rb   rc   rg   r#   r#   r$   delete   s   zCRTTransferManager.deleteFc                 C   s   |  | d S r   rW   rP   r\   r#   r#   r$   shutdown     zCRTTransferManager.shutdownc                 C   sH   | d}|d u rd S ttjjj}| |vr"td| d| d S )NChecksumAlgorithmzChecksumAlgorithm: z* not supported. Supported algorithms are: )getlistr   r   S3ChecksumAlgorithm__members__upper
ValueError)rP   rb   checksum_algorithmsupported_algorithmsr#   r#   r$   rj     s   
z9CRTTransferManager._validate_checksum_algorithm_supportedc                 C   s    | j D ]
}| s|  qd S r   )rK   doner\   rP   coordinatorr#   r#   r$   _cancel_transfers  s
   
z$CRTTransferManager._cancel_transfersc                 C      | j D ]}|  qd S r   )rK   resultr{   r#   r#   r$   _finish_transfers     

z$CRTTransferManager._finish_transfersc                 C   r~   r   )rK   %wait_until_on_done_callbacks_completer{   r#   r#   r$   _wait_transfers_done  r   z'CRTTransferManager._wait_transfers_donec                 C   sz   |r|    z1z|   W n ty   |    Y n ty"   Y nw W |   d S W |   d S W |   d S |   w r   )r}   r   KeyboardInterrupt	Exceptionr   rn   r#   r#   r$   rX      s   zCRTTransferManager._shutdownc                 K      | j   d S r   )rN   releaserP   kwargsr#   r#   r$   _release_semaphore-  rp   z%CRTTransferManager._release_semaphorec              
   C   s  | j g}t| j| jd}t| j||d}td	i |}t|}|| z$| j	  | j
|d}|  | j
|||||}	| jjd	i |	}
W n& tyo } z||d | j
j|d|d}||d W Y d }~n
d }~ww ||
 | j| |  jd7  _|S )
N)transfer_idexception_translator)metar|   queuedTrz   )after_subscribers)error   r#   )r   CRTTransferCoordinatorrO   rJ   CRTTransferMetaCRTTransferFutureAfterDoneHandlerappendrN   r   rH   get_crt_callbackget_make_request_argsrF   make_requestr   set_exceptionset_s3_requestrK   )rP   request_type	call_argson_done_after_callsr|   
componentsfuture	afterdone	on_queuedcrt_callargscrt_s3_requesteon_doner#   r#   r$   rf   0  sJ   



z#CRTTransferManager._submit_transferr   NNF)__name__
__module____qualname__rT   rV   r]   rh   rk   rm   ro   rj   r}   r   r   rX   r   rf   r#   r#   r#   r$   rC      s     





rC   c                   @   s>   e Zd ZdZdddZedd Zedd Zed	d
 ZdS )r   z*Holds metadata about the CRTTransferFutureNc                 C   s   || _ || _i | _d S r   )_transfer_id
_call_args_user_context)rP   r   r   r#   r#   r$   rT   ]  s   
zCRTTransferMeta.__init__c                 C      | j S r   )r   rU   r#   r#   r$   r   b     zCRTTransferMeta.call_argsc                 C   r   r   )r   rU   r#   r#   r$   r   f  r   zCRTTransferMeta.transfer_idc                 C   r   r   )r   rU   r#   r#   r$   user_contextj  r   zCRTTransferMeta.user_contextr   )	r   r   r   __doc__rT   propertyr   r   r   r#   r#   r#   r$   r   Z  s    


r   c                   @   sD   e Zd ZdddZedd Zdd Zddd	Zd
d Zdd Z	dS )r   Nc                 C   s    || _ |du rt | _ || _dS )aZ  The future associated to a submitted transfer request via CRT S3 client

        :type meta: s3transfer.crt.CRTTransferMeta
        :param meta: The metadata associated to the transfer future.

        :type coordinator: s3transfer.crt.CRTTransferCoordinator
        :param coordinator: The coordinator associated to the transfer future.
        N)_metar   _coordinator)rP   r   r|   r#   r#   r$   rT   p  s   	
zCRTTransferFuture.__init__c                 C   r   r   )r   rU   r#   r#   r$   r   ~  r   zCRTTransferFuture.metac                 C   s
   | j  S r   )r   rz   rU   r#   r#   r$   rz        
zCRTTransferFuture.donec                 C      | j | d S r   )r   r   rP   timeoutr#   r#   r$   r        zCRTTransferFuture.resultc                 C   r   r   )r   r\   rU   r#   r#   r$   r\     rp   zCRTTransferFuture.cancelc                 C   s$   |   std| jj|dd dS )z!Sets the exception on the future.z?set_exception can only be called once the transfer is complete.T)overrideN)rz   r   r   r   rP   	exceptionr#   r#   r$   r     s
   zCRTTransferFuture.set_exceptionr   r   )
r   r   r   rT   r   r   rz   r   r\   r   r#   r#   r#   r$   r   o  s    


r   c                   @      e Zd Zdd Zdd ZdS )BaseCRTRequestSerializerc                 C      t d)al  Serialize CRT HTTP requests.

        :type transfer_type: string
        :param transfer_type: the type of transfer made,
            e.g 'put_object', 'get_object', 'delete_object'

        :type future: s3transfer.crt.CRTTransferFuture

        :rtype: awscrt.http.HttpRequest
        :returns: An unsigned HTTP request to be used for the CRT S3 client
        zserialize_http_request()NotImplementedError)rP   transfer_typer   r#   r#   r$   serialize_http_request  s   z/BaseCRTRequestSerializer.serialize_http_requestc                 C   r   )Nztranslate_crt_exception()r   r   r#   r#   r$   rI     s   z0BaseCRTRequestSerializer.translate_crt_exceptionN)r   r   r   r   rI   r#   r#   r#   r$   r     s    r   c                   @   sf   e Zd ZdddZdd Zdd Zdd	 Zd
d Zdd Zdd Z	dd Z
dd Zdd Zdd ZdS )BotocoreCRTRequestSerializerNc                 C   sp   || _ |du r	i }| || |jdi || _| jjjd| j | jjjd| j | jjjd| j	 dS )a  Serialize CRT HTTP request using botocore logic
        It also takes into account configuration from both the session
        and any keyword arguments that could be passed to
        `Session.create_client()` when serializing the request.

        :type session: botocore.session.Session

        :type client_kwargs: Optional[Dict[str, str]])
        :param client_kwargs: The kwargs for the botocore
            s3 client initialization.
        Nzrequest-created.s3.*zafter-call.s3.*zbefore-send.s3.*r#   )
_session_resolve_client_configcreate_client_clientr   eventsregister_capture_http_request+_change_response_to_serialized_http_request_make_fake_http_response)rP   sessionclient_kwargsr#   r#   r$   rT     s   


z%BotocoreCRTRequestSerializer.__init__c                 C   sP   d }|  r
|  }d|v r|d }ttd}|r||}||d< d|d< d S )Nconfig)signature_versionr   service_name)get_default_client_configr   r   merge)rP   r   r   user_provided_configclient_configr#   r#   r$   r     s   

z3BotocoreCRTRequestSerializer._resolve_client_configc           	      C   s   t |j}|j}|jr| d|j }g }|j D ]\}}t|tr+|||f q||t|df qt	j
|}t	j
j|j|||jd}|S )N?zutf-8)methodpathheadersbody_stream)r   urlr   queryr   items
isinstancestrr   r   httpHttpHeadersHttpRequestr   body)	rP   aws_request	url_partscrt_pathheaders_listr!   valuecrt_headerscrt_requestr#   r#   r$   _crt_request_from_aws_request  s"   

z:BotocoreCRTRequestSerializer._crt_request_from_aws_requestc                 C   s   |  |}|jdd u rt|j}|jd|j |jdd ur(|jd |jdd u r<|jd u r<|j	dd |jdd urJ|jd |S )NhostzContent-MD5zContent-Length0zTransfer-Encoding)
r   r   rr   r   r   setnetlocremover   add)rP   botocore_http_requestr   r   r#   r#   r$   _convert_to_crt_http_request  s   


z9BotocoreCRTRequestSerializer._convert_to_crt_http_requestc                 K   s   ||j d< d S )Nhttp_request)contextrP   requestr   r#   r#   r$   r     rp   z2BotocoreCRTRequestSerializer._capture_http_requestc                 K   s   |d }|  |d< d S )Nr   HTTPRequest)prepare)rP   r   parsedr   r   r#   r#   r$   r     s   zHBotocoreCRTRequestSerializer._change_response_to_serialized_http_requestc                 K   s   t jd di tdS )N       )botocore
awsrequestAWSResponseFakeRawResponser   r#   r#   r$   r     s   z5BotocoreCRTRequestSerializer._make_fake_http_responsec                 C   s&   t | j|d|j|jd|jd S )N)BucketKeyr   r#   )getattrr   r_   r`   rb   )rP   client_methodr   r#   r#   r$   _get_botocore_http_request  s   z7BotocoreCRTRequestSerializer._get_botocore_http_requestc                 C   s   |  ||jj}| |}|S r   )r  r   r   r   )rP   r   r   r   r   r#   r#   r$   r     s
   
z3BotocoreCRTRequestSerializer.serialize_http_requestc                 C   s   t |tr
| |S d S r   )r   r    _translate_crt_s3_response_errorr   r#   r#   r$   rI   "  s   

z4BotocoreCRTRequestSerializer.translate_crt_exceptionc                 C   s   |j }|dk r	d S dd |jD }|j}|d ur$| jjj}||j}nd }tj	
|||jd}| jjj||d}|di d}	| jj|	}
|
||dS )	Ni-  c                 S   s   i | ]\}}||qS r#   r#   ).0kvr#   r#   r$   
<dictcomp>/  s    zQBotocoreCRTRequestSerializer._translate_crt_s3_response_error.<locals>.<dictcomp>)r   status_coder   )shapeErrorCode)operation_name)r  r   r  r   r   service_modeloperation_modeloutput_shaper   r   HeadersDictr   _response_parserparserr   
exceptions	from_code)rP   s3_response_errorr  r   r  r  r  response_dictparsed_response
error_codeerror_classr#   r#   r$   r  (  s&   

z=BotocoreCRTRequestSerializer._translate_crt_s3_response_errorr   )r   r   r   rT   r   r   r   r   r   r   r  r   rI   r  r#   r#   r#   r$   r     s    
r   c                   @   s   e Zd ZdddZdS )r     Nc                 c   s    	 |  |}|sd S |V  qr   )read)rP   amtdecode_contentchunkr#   r#   r$   streamF  s   
zFakeRawResponse.stream)r  N)r   r   r   r$  r#   r#   r#   r$   r  E  s    r  c                   @   s,   e Zd Zdd Zdd Zdd Zdd Zd	S )
BotocoreCRTCredentialsWrapperc                 C   
   || _ d S r   )_resolved_credentials)rP   resolved_botocore_credentialsr#   r#   r$   rT   O  r   z&BotocoreCRTCredentialsWrapper.__init__c                 C   s   |    }t|j|j|jS r   )_get_credentialsget_frozen_credentialsr   
access_key
secret_keytoken)rP   credentialsr#   r#   r$   __call__R  s   z&BotocoreCRTCredentialsWrapper.__call__c                 C   s
   t | S r   )r   new_delegaterU   r#   r#   r$   to_crt_credentials_providerX  r   z9BotocoreCRTCredentialsWrapper.to_crt_credentials_providerc                 C   s   | j d u rt | j S r   )r'  r   rU   r#   r#   r$   r)  [  s   
z.BotocoreCRTCredentialsWrapper._get_credentialsN)r   r   r   rT   r/  r1  r)  r#   r#   r#   r$   r%  N  s
    r%  c                   @   sn   e Zd ZdZ	dddZedd Zdd Zdd	d
ZdddZ	dd Z
dddZdd Zdd Zdd ZdS )r   z-A helper class for managing CRTTransferFutureNc                 C   s6   || _ || _|| _t | _d | _d | _t | _	d S r   )
r   _exception_translator_s3_requestrL   Lock_lock
_exception_crt_futureEvent_done_event)rP   r   
s3_requestr   r#   r#   r$   rT   d  s   
zCRTTransferCoordinator.__init__c                 C   r   r   )r3  rU   r#   r#   r$   r:  o  r   z!CRTTransferCoordinator.s3_requestc                 C   r   r   )r9  r   rU   r#   r#   r$   set_done_callbacks_completes  rp   z2CRTTransferCoordinator.set_done_callbacks_completec                 C   r   r   )r9  waitr   r#   r#   r$   r   v  r   z<CRTTransferCoordinator.wait_until_on_done_callbacks_completeFc                 C   sN   | j  |  r
|r|| _W d    d S W d    d S 1 s w   Y  d S r   )r5  rz   r6  )rP   r   r   r#   r#   r$   r   y  s   "z$CRTTransferCoordinator.set_exceptionc                 C   s   | j r
| j   d S d S r   )r3  r\   rU   r#   r#   r$   r\   ~  s   zCRTTransferCoordinator.cancelc              
   C   s   | j r| j z<z| j| W n( ty!   |   | j|   ty7 } z| | W Y d }~nd }~ww W | jrAd | _d S d S | jrId | _w r   )r6  r7  r   r   r\   r   handle_exceptionr3  )rP   r   r   r#   r#   r$   r     s"   

zCRTTransferCoordinator.resultc              
   C   s^   d }| j r&z|  |}W n ty% } ztjd|d W Y d }~nd }~ww |d ur-|||)NzUnable to translate exception.)exc_info)r2  r   rA   rB   )rP   exctranslated_excr   r#   r#   r$   r=    s   z'CRTTransferCoordinator.handle_exceptionc                 C   s   | j d u rdS | j  S )NF)r7  rz   rU   r#   r#   r$   rz     s   

zCRTTransferCoordinator.donec                 C   s   || _ | j j| _d S r   )r3  finished_futurer7  )rP   r:  r#   r#   r$   r     s   z%CRTTransferCoordinator.set_s3_request)NNNr   r   )r   r   r   r   rT   r   r:  r;  r   r   r\   r   r=  rz   r   r#   r#   r#   r$   r   a  s    




r   c                   @   sB   e Zd Zdd Zdd Z		dddZdd	 Zd
d Zdd ZdS )rG   c                 C   s   || _ || _d S r   )_request_serializer	_os_utils)rP   rR   os_utilsr#   r#   r$   rT     s   
zS3ClientArgsCreator.__init__c                 C   s(   t | d| | j}|||||g |dS )N_get_make_request_args_r   r   r|   r   on_done_before_callsr   )r  _default_get_make_request_args)rP   r   r   r|   r   r   request_args_handlerr#   r#   r$   r     s   z)S3ClientArgsCreator.get_make_request_argsNc                    s    fdd}|S )Nc                     sf   g }d ur
|7 }|t 7 } d ur| 7 }|D ]}dkr)|| d d q|| i | qd S )Nprogressr   )bytes_transferred)r   )r[   r   callbacks_listcallbackr   before_subscriberscallback_typer   r#   r$   invoke_all_callbacks  s   zBS3ClientArgsCreator.get_crt_callback.<locals>.invoke_all_callbacksr#   )rP   r   rP  rO  r   rQ  r#   rN  r$   r     s   z$S3ClientArgsCreator.get_crt_callbackc                 C   s   d }t |jtr|j}| j|}||jd< n|j|jd< |jdd }	tj	j
tj	j|	 tj	jjd}
d|jd< | j||||||d}||d	< |
|d
< |S )NContentLengthBodyrq   CRC32)	algorithmlocationzoverride-to-be-removed
ContentMD5rF  send_filepathchecksum_config)r   ra   r   rC  get_file_sizerb   poprv   r   r   S3ChecksumConfigrt   S3ChecksumLocationTRAILERrH  )rP   r   r   r|   r   rG  r   rX  data_lenrx   rY  make_request_argsr#   r#   r$   !_get_make_request_args_put_object  s6   	

z5S3ClientArgsCreator._get_make_request_args_put_objectc                 C   s   d }d }t jjdd}	t|jtr&|j}
| j|
}|t	||
|| j nt
|j}| j||||||d}||d< ||d< |	|d< |S )NT)validate_responserF  recv_filepathon_bodyrY  )r   r   r\  r   ra   r   rC  get_temp_filenamer   RenameTempFileHandlerOnBodyFileObjWriterrH  )rP   r   r   r|   r   rG  r   rc  rd  rY  final_filepathr`  r#   r#   r$   !_get_make_request_args_get_object  s0   	

z5S3ClientArgsCreator._get_make_request_args_get_objectc                 C   s:   | j ||tt| tj| |d||| |ddS )Nrz   rJ  )r   typer   on_progress)rB  r   r  r   rv   DEFAULTr   )rP   r   r   r|   r   rG  r   r#   r#   r$   rH  '  s   

z2S3ClientArgsCreator._default_get_make_request_argsr   )	r   r   r   rT   r   r   ra  ri  rH  r#   r#   r#   r$   rG     s    
*$rG   c                   @   r   )rf  c                 C   s   || _ || _|| _|| _d S r   )r   _final_filename_temp_filenamerE   )rP   r|   final_filenametemp_filenamerS   r#   r#   r$   rT   ?  s   
zRenameTempFileHandler.__init__c              
   K   sx   |d }|r| j | j d S z| j | j| j W d S  ty; } z| j | j | j| W Y d }~d S d }~ww )Nr   )rE   remove_filern  rename_filerm  r   r   r   )rP   r   r   r   r#   r#   r$   r/  E  s   
zRenameTempFileHandler.__call__Nr   r   r   rT   r/  r#   r#   r#   r$   rf  >  s    rf  c                   @   r   )r   c                 C   r&  r   )r   r{   r#   r#   r$   rT   U  r   zAfterDoneHandler.__init__c                 K   r   r   )r   r;  r   r#   r#   r$   r/  X  rp   zAfterDoneHandler.__call__Nrs  r#   r#   r#   r$   r   T      r   c                   @   r   )rg  c                 C   r&  r   )_fileobj)rP   ra   r#   r#   r$   rT   ]  r   zOnBodyFileObjWriter.__init__c                 K   r   r   )ru  write)rP   r#  r   r#   r#   r$   r/  `  r   zOnBodyFileObjWriter.__call__Nrs  r#   r#   r#   r$   rg  \  rt  rg  r   )=loggingrL   ior   awscrt.httpr   botocore.awsrequestr   botocore.sessionawscrt.authr   r   	awscrt.ior   r   r   r   r	   	awscrt.s3r
   r   r   r   r   r   botocore.compatr   botocore.configr   botocore.exceptionsr   s3transfer.constantsr   s3transfer.exceptionsr   s3transfer.futuresr   r   s3transfer.utilsr   r   r   	getLoggerr   rA   r   r%   r@   r5   rC   r   r   r   r   r  r%  r   rG   rf  r   rg  r#   r#   r#   r$   <module>   sV   


U )& 	I 