From de1de68f90b6f4ff3388e8dd65698f8882b2841e Mon Sep 17 00:00:00 2001 From: "Mr. Outis" Date: Sat, 18 Jan 2020 23:01:50 -0600 Subject: [PATCH] s3: import boto3 inside _copy instead of module level Kudos to @skshetry for bringing this out during a review --- dvc/remote/s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dvc/remote/s3.py b/dvc/remote/s3.py index bcc1cffb83..64256e44d8 100644 --- a/dvc/remote/s3.py +++ b/dvc/remote/s3.py @@ -3,7 +3,6 @@ import logging import os import threading -from boto3.s3.transfer import TransferConfig from funcy import cached_property, wrap_prop @@ -157,6 +156,7 @@ def _copy(cls, s3, from_info, to_info, extra_args): # the same throughout the transfer, so it means that in order to # preserve etag, we need to transfer each part separately, so the # object is transfered in the same chunks as it was originally. + from boto3.s3.transfer import TransferConfig obj = cls.get_head_object(s3, from_info.bucket, from_info.path) etag = obj["ETag"].strip('"')