Skip to content

Commit e2b2df5

Browse files
Merge branch 'release-1.36.0'
* release-1.36.0: Bumping version to 1.36.0 Add changelog entries from botocore Merge customizations for S3
2 parents 74405ee + 80855f0 commit e2b2df5

File tree

7 files changed

+151
-9
lines changed

7 files changed

+151
-9
lines changed

.changes/1.36.0.json

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
[
2+
{
3+
"category": "``apigateway``",
4+
"description": "[``botocore``] Documentation updates for Amazon API Gateway",
5+
"type": "api-change"
6+
},
7+
{
8+
"category": "``bedrock-agent-runtime``",
9+
"description": "[``botocore``] Now supports streaming for inline agents.",
10+
"type": "api-change"
11+
},
12+
{
13+
"category": "``cognito-identity``",
14+
"description": "[``botocore``] corrects the dual-stack endpoint configuration",
15+
"type": "api-change"
16+
},
17+
{
18+
"category": "``partnercentral-selling``",
19+
"description": "[``botocore``] Add Tagging support for ResourceSnapshotJob resources",
20+
"type": "api-change"
21+
},
22+
{
23+
"category": "``s3``",
24+
"description": "[``botocore``] This change enhances integrity protections for new SDK requests to S3. S3 SDKs now support the CRC64NVME checksum algorithm, full object checksums for multipart S3 objects, and new default integrity protections for S3 requests.",
25+
"type": "api-change"
26+
},
27+
{
28+
"category": "``security-ir``",
29+
"description": "[``botocore``] Increase minimum length of Threat Actor IP 'userAgent' to 1.",
30+
"type": "api-change"
31+
},
32+
{
33+
"category": "``sesv2``",
34+
"description": "[``botocore``] This release introduces a new recommendation in Virtual Deliverability Manager Advisor, which detects elevated complaint rates for customer sending identities.",
35+
"type": "api-change"
36+
},
37+
{
38+
"category": "``workspaces``",
39+
"description": "[``botocore``] Added GeneralPurpose.4xlarge & GeneralPurpose.8xlarge ComputeTypes.",
40+
"type": "api-change"
41+
},
42+
{
43+
"category": "``workspaces-thin-client``",
44+
"description": "[``botocore``] Mark type in MaintenanceWindow as required.",
45+
"type": "api-change"
46+
},
47+
{
48+
"category": "AWSCRT",
49+
"description": "[``botocore``] Update awscrt version to 0.23.4",
50+
"type": "enhancement"
51+
},
52+
{
53+
"category": "``s3``",
54+
"description": "[``botocore``] The S3 client attempts to validate response checksums for all S3 API operations that support checksums. However, if the SDK has not implemented the specified checksum algorithm then this validation is skipped. Checksum validation behavior can be configured using the ``when_supported`` and ``when_required`` options - in code using the ``response_checksum_validation`` parameter for ``botocore.config.Config``, in the shared AWS config file using ``response_checksum_validation``, or as an env variable using ``AWS_RESPONSE_CHECKSUM_VALIDATION``.",
55+
"type": "feature"
56+
},
57+
{
58+
"category": "``s3``",
59+
"description": "[``botocore``] Added support for the CRC64NVME checksum algorithm in the S3 client through the optional AWS CRT (``awscrt``) dependency.",
60+
"type": "feature"
61+
},
62+
{
63+
"category": "``s3``",
64+
"description": "[``botocore``] S3 client behavior is updated to always calculate a CRC32 checksum by default for operations that support it (such as PutObject or UploadPart), or require it (such as DeleteObjects). Checksum behavior can be configured using ``when_supported`` and ``when_required`` options - in code using the ``request_checksum_calculation`` parameter for ``botocore.config.Config``, in the shared AWS config file using ``request_checksum_calculation``, or as an env variable using ``AWS_REQUEST_CHECKSUM_CALCULATION``. Note: Botocore will no longer automatically compute and populate the Content-MD5 header.",
65+
"type": "feature"
66+
}
67+
]

CHANGELOG.rst

+18
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22
CHANGELOG
33
=========
44

5+
1.36.0
6+
======
7+
8+
* api-change:``apigateway``: [``botocore``] Documentation updates for Amazon API Gateway
9+
* api-change:``bedrock-agent-runtime``: [``botocore``] Now supports streaming for inline agents.
10+
* api-change:``cognito-identity``: [``botocore``] corrects the dual-stack endpoint configuration
11+
* api-change:``partnercentral-selling``: [``botocore``] Add Tagging support for ResourceSnapshotJob resources
12+
* api-change:``s3``: [``botocore``] This change enhances integrity protections for new SDK requests to S3. S3 SDKs now support the CRC64NVME checksum algorithm, full object checksums for multipart S3 objects, and new default integrity protections for S3 requests.
13+
* api-change:``security-ir``: [``botocore``] Increase minimum length of Threat Actor IP 'userAgent' to 1.
14+
* api-change:``sesv2``: [``botocore``] This release introduces a new recommendation in Virtual Deliverability Manager Advisor, which detects elevated complaint rates for customer sending identities.
15+
* api-change:``workspaces``: [``botocore``] Added GeneralPurpose.4xlarge & GeneralPurpose.8xlarge ComputeTypes.
16+
* api-change:``workspaces-thin-client``: [``botocore``] Mark type in MaintenanceWindow as required.
17+
* enhancement:AWSCRT: [``botocore``] Update awscrt version to 0.23.4
18+
* feature:``s3``: [``botocore``] The S3 client attempts to validate response checksums for all S3 API operations that support checksums. However, if the SDK has not implemented the specified checksum algorithm then this validation is skipped. Checksum validation behavior can be configured using the ``when_supported`` and ``when_required`` options - in code using the ``response_checksum_validation`` parameter for ``botocore.config.Config``, in the shared AWS config file using ``response_checksum_validation``, or as an env variable using ``AWS_RESPONSE_CHECKSUM_VALIDATION``.
19+
* feature:``s3``: [``botocore``] Added support for the CRC64NVME checksum algorithm in the S3 client through the optional AWS CRT (``awscrt``) dependency.
20+
* feature:``s3``: [``botocore``] S3 client behavior is updated to always calculate a CRC32 checksum by default for operations that support it (such as PutObject or UploadPart), or require it (such as DeleteObjects). Checksum behavior can be configured using ``when_supported`` and ``when_required`` options - in code using the ``request_checksum_calculation`` parameter for ``botocore.config.Config``, in the shared AWS config file using ``request_checksum_calculation``, or as an env variable using ``AWS_REQUEST_CHECKSUM_CALCULATION``. Note: Botocore will no longer automatically compute and populate the Content-MD5 header.
21+
22+
523
1.35.99
624
=======
725

boto3/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from boto3.session import Session
1818

1919
__author__ = 'Amazon Web Services'
20-
__version__ = '1.35.99'
20+
__version__ = '1.36.0'
2121

2222

2323
# The default Boto3 session; autoloaded when needed.

docs/source/guide/configuration.rst

+34
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,15 @@ You can set configuration settings using system-wide environment variables. Thes
236236
A comma-delimited list of regions to sign when signing with SigV4a. For more
237237
information, see the ``sigv4a_signing_region_set`` configuration file section.
238238

239+
``AWS_REQUEST_CHECKSUM_CALCULATION``
240+
Determines when a checksum will be calculated for request payloads. For more
241+
information, see the ``request_checksum_calculation`` configuration file section.
242+
243+
244+
``AWS_RESPONSE_CHECKSUM_VALIDATION``
245+
Determines when checksum validation will be performed on response payloads. For more
246+
information, see the ``response_checksum_validation`` configuration file section.
247+
239248

240249
Using a configuration file
241250
--------------------------
@@ -476,6 +485,31 @@ in the ``~/.aws/config`` file.
476485
the SDK will check if the service has modeled a default; if none is found, this will
477486
default to ``*``.
478487

488+
``request_checksum_calculation``
489+
Determines when a checksum will be calculated for request payloads. Valid values are:
490+
491+
* ``when_supported`` -- When set, a checksum will be calculated for
492+
all request payloads of operations modeled with the ``httpChecksum``
493+
trait where ``requestChecksumRequired`` is ``true`` or a
494+
``requestAlgorithmMember`` is modeled.
495+
496+
* ``when_required`` -- When set, a checksum will only be calculated
497+
for request payloads of operations modeled with the ``httpChecksum``
498+
trait where ``requestChecksumRequired`` is ``true`` or where a
499+
``requestAlgorithmMember`` is modeled and supplied.
500+
501+
``response_checksum_validation``
502+
Determines when checksum validation will be performed on response payloads. Valid values are:
503+
504+
* ``when_supported`` -- When set, checksum validation is performed on
505+
all response payloads of operations modeled with the ``httpChecksum``
506+
trait where ``responseAlgorithms`` is modeled, except when no modeled
507+
checksum algorithms are supported.
508+
509+
* ``when_required`` -- When set, checksum validation is not performed
510+
on response payloads of operations unless the checksum algorithm is
511+
supported and the ``requestValidationModeMember`` member is set to ``ENABLED``.
512+
479513
.. _IAM Roles for Amazon EC2: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html
480514
.. _Using IAM Roles: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html
481515
.. _Sourcing Credentials with an External Process: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sourcing-external.html

setup.cfg

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ universal = 0
33

44
[metadata]
55
requires_dist =
6-
botocore>=1.35.99,<1.36.0
6+
botocore>=1.36.0,<1.37.0
77
jmespath>=0.7.1,<2.0.0
8-
s3transfer>=0.10.0,<0.11.0
8+
s3transfer>=0.11.0,<0.12.0
99

1010
[options.extras_require]
1111
crt = botocore[crt]>=1.21.0,<2.0a0

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515

1616
requires = [
17-
'botocore>=1.35.99,<1.36.0',
17+
'botocore>=1.36.0,<1.37.0',
1818
'jmespath>=0.7.1,<2.0.0',
19-
's3transfer>=0.10.0,<0.11.0',
19+
's3transfer>=0.11.0,<0.12.0',
2020
]
2121

2222

tests/functional/test_s3.py

+27-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import botocore.stub
1717
import pytest
1818
from botocore.config import Config
19+
from botocore.httpchecksum import DEFAULT_CHECKSUM_ALGORITHM
1920
from botocore.stub import Stubber
2021

2122
import boto3.session
@@ -86,7 +87,10 @@ def stub_head(self, content_length=4, expected_params=None):
8687
expected_params=expected_params,
8788
)
8889

89-
def stub_create_multipart_upload(self):
90+
def stub_create_multipart_upload(
91+
self,
92+
extra_expected_params=None,
93+
):
9094
# Add the response and assert params for CreateMultipartUpload
9195
create_upload_response = {
9296
"Bucket": self.bucket,
@@ -97,13 +101,17 @@ def stub_create_multipart_upload(self):
97101
"Bucket": self.bucket,
98102
"Key": self.key,
99103
}
104+
if extra_expected_params:
105+
expected_params.update(extra_expected_params)
100106
self.stubber.add_response(
101107
method='create_multipart_upload',
102108
service_response=create_upload_response,
103109
expected_params=expected_params,
104110
)
105111

106-
def stub_complete_multipart_upload(self, parts):
112+
def stub_complete_multipart_upload(
113+
self, parts, extra_expected_params=None
114+
):
107115
complete_upload_response = {
108116
"Location": "us-west-2",
109117
"Bucket": self.bucket,
@@ -116,6 +124,8 @@ def stub_complete_multipart_upload(self, parts):
116124
"MultipartUpload": {"Parts": parts},
117125
"UploadId": self.upload_id,
118126
}
127+
if extra_expected_params:
128+
expected_params.update(extra_expected_params)
119129

120130
self.stubber.add_response(
121131
method='complete_multipart_upload',
@@ -256,6 +266,7 @@ def stub_put_object(self):
256266
"Bucket": self.bucket,
257267
"Key": self.key,
258268
"Body": botocore.stub.ANY,
269+
"ChecksumAlgorithm": DEFAULT_CHECKSUM_ALGORITHM,
259270
}
260271
self.stubber.add_response(
261272
method='put_object',
@@ -267,13 +278,15 @@ def stub_upload_part(self, part_number):
267278
upload_part_response = {
268279
'ETag': self.etag,
269280
'ResponseMetadata': {'HTTPStatusCode': 200},
281+
'ChecksumCRC32': f'sum{part_number}==',
270282
}
271283
expected_params = {
272284
"Bucket": self.bucket,
273285
"Key": self.key,
274286
"Body": botocore.stub.ANY,
275287
"PartNumber": part_number,
276288
"UploadId": self.upload_id,
289+
'ChecksumAlgorithm': 'CRC32',
277290
}
278291
self.stubber.add_response(
279292
method='upload_part',
@@ -282,15 +295,25 @@ def stub_upload_part(self, part_number):
282295
)
283296

284297
def stub_multipart_upload(self, num_parts):
285-
self.stub_create_multipart_upload()
298+
self.stub_create_multipart_upload(
299+
extra_expected_params={
300+
"ChecksumAlgorithm": DEFAULT_CHECKSUM_ALGORITHM,
301+
}
302+
)
286303

287304
# Add the responses for each UploadPartCopy
288305
parts = []
289306
for i in range(num_parts):
290307
# Fill in the parts
291308
part_number = i + 1
292309
self.stub_upload_part(part_number=part_number)
293-
parts.append({'ETag': self.etag, 'PartNumber': part_number})
310+
parts.append(
311+
{
312+
'ETag': self.etag,
313+
'PartNumber': part_number,
314+
'ChecksumCRC32': f'sum{part_number}==',
315+
}
316+
)
294317

295318
self.stub_complete_multipart_upload(parts)
296319

0 commit comments

Comments
 (0)