File: //lib/python3.6/site-packages/awscli/customizations/s3/__pycache__/s3handler.cpython-36.pyc
3
�T_[ � @ s: d dl Z d dlZd dlmZ d dlmZmZmZmZm Z m
Z
d dlmZ d dl
mZ d dl
mZ d dl
mZ d dl
mZ d d l
mZ d d
l
mZ d dl
mZ d dl
mZ d d
l
mZ d dl
mZ d dl
mZ d dl
mZ d dl
mZ d dl
mZ d dl
mZ d dl
mZ d dlmZ d dlmZ d dlm Z d dlm!Z! d dlm"Z" d dlm#Z# d dlm$Z$ d dlm%Z% d dlm&Z& d dlm'Z' d dl(m)Z) e j*e+�Z,G d d!� d!e-�Z.G d"d#� d#e-�Z/G d$d%� d%e-�Z0G d&d'� d'e0�Z1G d(d)� d)e0�Z2G d*d+� d+e0�Z3G d,d-� d-e1�Z4G d.d/� d/e2�Z5G d0d1� d1e0�Z6G d2d3� d3e0�Z7dS )4� N)�TransferManager)�human_readable_size�MAX_UPLOAD_SIZE�find_bucket_key�
relative_path�create_warning�NonSeekableStream)�*create_transfer_config_from_runtime_config)�UploadResultSubscriber)�DownloadResultSubscriber)�CopyResultSubscriber)�UploadStreamResultSubscriber)�DownloadStreamResultSubscriber)�DeleteResultSubscriber)�QueuedResult)�
SuccessResult)�
FailureResult)�DryRunResult)�ResultRecorder)�
ResultPrinter)�OnlyShowErrorsResultPrinter)�NoProgressResultPrinter)�ResultProcessor)�CommandResultRecorder)�RequestParamsMapper)�StdoutBytesWriter)�ProvideSizeSubscriber)�"ProvideUploadContentTypeSubscriber)� ProvideCopyContentTypeSubscriber)�!ProvideLastModifiedTimeSubscriber)�DirectoryCreatorSubscriber)�DeleteSourceFileSubscriber)�DeleteSourceObjectSubscriber)� DeleteCopySourceObjectSubscriber)�get_binary_stdinc @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) �S3TransferHandlerFactory� c C s || _ || _dS )a Factory for S3TransferHandlers
:type cli_params: dict
:param cli_params: The parameters provide to the CLI command
:type runtime_config: RuntimeConfig
:param runtime_config: The runtime config for the CLI command
being run
N)�_cli_params�_runtime_config)�self�
cli_paramsZruntime_config� r+ �/usr/lib/python3.6/s3handler.py�__init__: s
z!S3TransferHandlerFactory.__init__c C sr t | j�}| j|_| j|_t||�}tjd|j|j � t
� }|g}| j||� t||�}t
|||�}t|| j|�S )ag Creates a S3TransferHandler instance
:type client: botocore.client.Client
:param client: The client to power the S3TransferHandler
:type result_queue: queue.Queue
:param result_queue: The result queue to be used to process results
for the S3TransferHandler
:returns: A S3TransferHandler instance
z7Using a multipart threshold of %s and a part size of %s)r r( �MAX_IN_MEMORY_CHUNKSZmax_in_memory_upload_chunksZmax_in_memory_download_chunksr �LOGGER�debugZmultipart_thresholdZmultipart_chunksizer �_add_result_printerr r �S3TransferHandlerr'