Skip to content

Commit

Permalink
Merge pull request #192 from kdaily/add-expectedbucketowner
Browse files Browse the repository at this point in the history
Add ExpectedBucketOwner
  • Loading branch information
kyleknap committed Apr 21, 2021
2 parents 7d91ba9 + af131ae commit af982f8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changes/next-release/enhancement-s3-1285.json
@@ -0,0 +1,5 @@
{
"category": "s3",
"type": "enhancement",
"description": "Add support for ``ExpectedBucketOwner``. Fixes `#181 <https://github.com/boto/s3transfer/issues/181>`__."
}
1 change: 1 addition & 0 deletions s3transfer/constants.py
Expand Up @@ -23,6 +23,7 @@
'SSECustomerKey',
'SSECustomerKeyMD5',
'RequestPayer',
'ExpectedBucketOwner',
]

USER_AGENT = 's3transfer/%s' % s3transfer.__version__
Expand Down
7 changes: 5 additions & 2 deletions s3transfer/copies.py
Expand Up @@ -34,7 +34,8 @@ class CopySubmissionTask(SubmissionTask):
'CopySourceSSECustomerKey': 'SSECustomerKey',
'CopySourceSSECustomerAlgorithm': 'SSECustomerAlgorithm',
'CopySourceSSECustomerKeyMD5': 'SSECustomerKeyMD5',
'RequestPayer': 'RequestPayer'
'RequestPayer': 'RequestPayer',
'ExpectedBucketOwner': 'ExpectedBucketOwner'
}

UPLOAD_PART_COPY_ARGS = [
Expand All @@ -49,6 +50,7 @@ class CopySubmissionTask(SubmissionTask):
'SSECustomerAlgorithm',
'SSECustomerKeyMD5',
'RequestPayer',
'ExpectedBucketOwner'
]

CREATE_MULTIPART_ARGS_BLACKLIST = [
Expand All @@ -64,7 +66,8 @@ class CopySubmissionTask(SubmissionTask):
]

COMPLETE_MULTIPART_ARGS = [
'RequestPayer'
'RequestPayer',
'ExpectedBucketOwner'
]

def _submit(self, client, config, osutil, request_executor,
Expand Down
2 changes: 2 additions & 0 deletions s3transfer/manager.py
Expand Up @@ -165,6 +165,7 @@ class TransferManager(object):
'ContentEncoding',
'ContentLanguage',
'ContentType',
'ExpectedBucketOwner',
'Expires',
'GrantFullControl',
'GrantRead',
Expand Down Expand Up @@ -199,6 +200,7 @@ class TransferManager(object):
'MFA',
'VersionId',
'RequestPayer',
'ExpectedBucketOwner'
]

VALIDATE_SUPPORTED_BUCKET_VALUES = True
Expand Down
4 changes: 3 additions & 1 deletion s3transfer/upload.py
Expand Up @@ -490,10 +490,12 @@ class UploadSubmissionTask(SubmissionTask):
'SSECustomerAlgorithm',
'SSECustomerKeyMD5',
'RequestPayer',
'ExpectedBucketOwner'
]

COMPLETE_MULTIPART_ARGS = [
'RequestPayer'
'RequestPayer',
'ExpectedBucketOwner'
]

def _get_upload_input_manager_cls(self, transfer_future):
Expand Down

0 comments on commit af982f8

Please sign in to comment.