# Path: s3transfer/compat.py
# MAXINT = None
# 
# Path: s3transfer/exceptions.py
# class RetriesExceededError(Exception):
# class S3UploadFailedError(Exception):
# class InvalidSubscriberMethodError(Exception):
# class TransferNotDoneError(Exception):
# class FatalError(CancelledError):
#     def __init__(self, last_exception, msg='Max Retries Exceeded'):
# 
# Path: s3transfer/utils.py
# class FunctionContainer:
#     """An object that contains a function and any args or kwargs to call it
# 
#     When called the provided function will be called with provided args
#     and kwargs.
#     """
# 
#     def __init__(self, func, *args, **kwargs):
#         self._func = func
#         self._args = args
#         self._kwargs = kwargs
# 
#     def __repr__(self):
#         return 'Function: {} with args {} and kwargs {}'.format(
#             self._func, self._args, self._kwargs
#         )
# 
#     def __call__(self):
#         return self._func(*self._args, **self._kwargs)
# 
# class TaskSemaphore:
#     def __init__(self, count):
#         """A semaphore for the purpose of limiting the number of tasks
# 
#         :param count: The size of semaphore
#         """
#         self._semaphore = threading.Semaphore(count)
# 
#     def acquire(self, tag, blocking=True):
#         """Acquire the semaphore
# 
#         :param tag: A tag identifying what is acquiring the semaphore. Note
#             that this is not really needed to directly use this class but is
#             needed for API compatibility with the SlidingWindowSemaphore
#             implementation.
#         :param block: If True, block until it can be acquired. If False,
#             do not block and raise an exception if cannot be acquired.
# 
#         :returns: A token (can be None) to use when releasing the semaphore
#         """
#         logger.debug("Acquiring %s", tag)
#         if not self._semaphore.acquire(blocking):
#             raise NoResourcesAvailable("Cannot acquire tag '%s'" % tag)
# 
#     def release(self, tag, acquire_token):
#         """Release the semaphore
# 
#         :param tag: A tag identifying what is releasing the semaphore
#         :param acquire_token:  The token returned from when the semaphore was
#             acquired. Note that this is not really needed to directly use this
#             class but is needed for API compatibility with the
#             SlidingWindowSemaphore implementation.
#         """
#         logger.debug(f"Releasing acquire {tag}/{acquire_token}")
#         self._semaphore.release()


import copy
import logging
import sys
import threading
from collections import namedtuple
from concurrent import futures
from s3transfer.compat import MAXINT
from s3transfer.exceptions import CancelledError, TransferNotDoneError
from s3transfer.utils import FunctionContainer, TaskSemaphore
# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.


logger = logging.getLogger(__name__)


class BaseTransferFuture:
    @property

# Path: s3transfer/compat.py
# MAXINT = None
# 
# Path: s3transfer/exceptions.py
# class RetriesExceededError(Exception):
# class S3UploadFailedError(Exception):
# class InvalidSubscriberMethodError(Exception):
# class TransferNotDoneError(Exception):
# class FatalError(CancelledError):
#     def __init__(self, last_exception, msg='Max Retries Exceeded'):
# 
# Path: s3transfer/utils.py
# class FunctionContainer:
#     """An object that contains a function and any args or kwargs to call it
# 
#     When called the provided function will be called with provided args
#     and kwargs.
#     """
# 
#     def __init__(self, func, *args, **kwargs):
#         self._func = func
#         self._args = args
#         self._kwargs = kwargs
# 
#     def __repr__(self):
#         return 'Function: {} with args {} and kwargs {}'.format(
#             self._func, self._args, self._kwargs
#         )
# 
#     def __call__(self):
#         return self._func(*self._args, **self._kwargs)
# 
# class TaskSemaphore:
#     def __init__(self, count):
#         """A semaphore for the purpose of limiting the number of tasks
# 
#         :param count: The size of semaphore
#         """
#         self._semaphore = threading.Semaphore(count)
# 
#     def acquire(self, tag, blocking=True):
#         """Acquire the semaphore
# 
#         :param tag: A tag identifying what is acquiring the semaphore. Note
#             that this is not really needed to directly use this class but is
#             needed for API compatibility with the SlidingWindowSemaphore
#             implementation.
#         :param block: If True, block until it can be acquired. If False,
#             do not block and raise an exception if cannot be acquired.
# 
#         :returns: A token (can be None) to use when releasing the semaphore
#         """
#         logger.debug("Acquiring %s", tag)
#         if not self._semaphore.acquire(blocking):
#             raise NoResourcesAvailable("Cannot acquire tag '%s'" % tag)
# 
#     def release(self, tag, acquire_token):
#         """Release the semaphore
# 
#         :param tag: A tag identifying what is releasing the semaphore
#         :param acquire_token:  The token returned from when the semaphore was
#             acquired. Note that this is not really needed to directly use this
#             class but is needed for API compatibility with the
#             SlidingWindowSemaphore implementation.
#         """
#         logger.debug(f"Releasing acquire {tag}/{acquire_token}")
#         self._semaphore.release()


# Path: s3transfer/futures.py
import copy
import logging
import sys
import threading
from collections import namedtuple
from concurrent import futures
from s3transfer.compat import MAXINT
from s3transfer.exceptions import CancelledError, TransferNotDoneError
from s3transfer.utils import FunctionContainer, TaskSemaphore

# Copyright 2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.


logger = logging.getLogger(__name__)


class BaseTransferFuture:
    @property

    def meta(self):