diff --git a/documentcloud/common/environment/aws/storage.py b/documentcloud/common/environment/aws/storage.py index 11c7d7ab..ac4aa695 100644 --- a/documentcloud/common/environment/aws/storage.py +++ b/documentcloud/common/environment/aws/storage.py @@ -77,9 +77,9 @@ def open(self, file_name, mode="rb", content_type=None, access=None): writeable_kwargs["ACL"] = ACLS[access] if writeable_kwargs: # Guard against no writeable kwargs provided - transport_params["client_kwargs"] = { - "S3.Client.create_multipart_upload": writeable_kwargs - } + # smart_open 7.x passes client_kwargs + # directly to put_object/create_multipart_upload + transport_params["client_kwargs"] = writeable_kwargs return smart_open.open( f"s3://{file_name}", mode, transport_params=transport_params ) diff --git a/tasks.py b/tasks.py index bcc2fc9a..c9aa4e3b 100755 --- a/tasks.py +++ b/tasks.py @@ -120,9 +120,9 @@ def format(c): cmd="black documentcloud --exclude migrations && " "black config/urls.py && " "black config/settings && " - "isort -rc documentcloud && " - "isort -rc config/urls.py && " - "isort -rc config/settings" + "isort documentcloud && " + "isort config/urls.py && " + "isort config/settings" ) )