diff --git a/.changes/1.35.42.json b/.changes/1.35.42.json new file mode 100644 index 0000000000..391a768e36 --- /dev/null +++ b/.changes/1.35.42.json @@ -0,0 +1,12 @@ +[ + { + "category": "``s3``", + "description": "[``botocore``] Add support for the new optional bucket-region and prefix query parameters in the ListBuckets API. For ListBuckets requests that express pagination, Amazon S3 will now return both the bucket names and associated AWS regions in the response.", + "type": "api-change" + }, + { + "category": "Config", + "description": "[``botocore``] Fixed sigv4a_signing_region_set resolution when set in environment or config file.", + "type": "bugfix" + } +] \ No newline at end of file diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b0d71d1538..80d1e5df35 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,13 @@ CHANGELOG ========= +1.35.42 +======= + +* api-change:``s3``: [``botocore``] Add support for the new optional bucket-region and prefix query parameters in the ListBuckets API. For ListBuckets requests that express pagination, Amazon S3 will now return both the bucket names and associated AWS regions in the response. +* bugfix:Config: [``botocore``] Fixed sigv4a_signing_region_set resolution when set in environment or config file. + + 1.35.41 ======= diff --git a/boto3/__init__.py b/boto3/__init__.py index 8b44cfe39b..1fbc8d2665 100644 --- a/boto3/__init__.py +++ b/boto3/__init__.py @@ -17,7 +17,7 @@ from boto3.session import Session __author__ = 'Amazon Web Services' -__version__ = '1.35.41' +__version__ = '1.35.42' # The default Boto3 session; autoloaded when needed. diff --git a/boto3/s3/inject.py b/boto3/s3/inject.py index 860465aec6..bf6e751f38 100644 --- a/boto3/s3/inject.py +++ b/boto3/s3/inject.py @@ -131,7 +131,7 @@ def upload_file( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed upload arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -178,7 +178,7 @@ def download_file( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed download arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -222,7 +222,7 @@ def bucket_upload_file( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed upload arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -266,7 +266,7 @@ def bucket_download_file( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed download arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -307,7 +307,7 @@ def object_upload_file( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed upload arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -348,7 +348,7 @@ def object_download_file( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed download arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -409,7 +409,7 @@ def copy( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed download arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -488,7 +488,7 @@ def bucket_copy( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed download arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -551,7 +551,7 @@ def object_copy( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed download arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -610,7 +610,7 @@ def upload_fileobj( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed upload arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -671,7 +671,7 @@ def bucket_upload_fileobj( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed upload arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -718,7 +718,7 @@ def object_upload_fileobj( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed upload arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_UPLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -769,7 +769,7 @@ def download_fileobj( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed download arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -830,7 +830,7 @@ def bucket_download_fileobj( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed download arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to @@ -877,7 +877,7 @@ def object_download_fileobj( :type ExtraArgs: dict :param ExtraArgs: Extra arguments that may be passed to the client operation. For allowed download arguments see - boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS. + :py:attr:`boto3.s3.transfer.S3Transfer.ALLOWED_DOWNLOAD_ARGS`. :type Callback: function :param Callback: A method which takes a number of bytes transferred to diff --git a/docs/source/guide/configuration.rst b/docs/source/guide/configuration.rst index 7134c179e4..12877debcb 100644 --- a/docs/source/guide/configuration.rst +++ b/docs/source/guide/configuration.rst @@ -232,6 +232,11 @@ You can set configuration settings using system-wide environment variables. Thes When set it will be appended to the User-Agent header of every request in the form of App/{AppId}. +``AWS_SIGV4A_SIGNING_REGION_SET`` + A comma-delimited list of regions to sign when signing with SigV4a. For more + information, see the ``sigv4a_signing_region_set`` configuration file section. + + Using a configuration file -------------------------- @@ -259,7 +264,7 @@ in the ``~/.aws/config`` file. [default] region = us-east-1 - api_versions = + api_versions = ec2 = 2015-03-01 cloudfront = 2015-09-17 @@ -283,10 +288,10 @@ in the ``~/.aws/config`` file. an IAM role attached to either an EC2 instance profile or an Amazon ECS container. In such a scenario, use the ``credential_source`` setting to specify where to find the credentials. - + The ``credential_source`` and ``source_profile`` settings are mutually exclusive. - + The following values are supported. ``Ec2InstanceMetadata`` @@ -316,7 +321,7 @@ in the ``~/.aws/config`` file. Serial number of the Amazon Resource Name (ARN) of a multi-factor authentication (MFA) device to use when assuming a role. ``parameter_validation`` Disable parameter validation (default is true, parameters are - validated). This is a Boolean value that + validated). This is a Boolean value that is either ``true`` or ``false``. Whenever you make an API call using a client, the parameters you provide are run through a set of validation checks, including (but not limited to) required @@ -340,7 +345,7 @@ in the ``~/.aws/config`` file. ``s3`` Set Amazon S3-specific configuration data. Typically, these values do not need to be set. - + The ``s3`` settings are nested configuration values that require special formatting in the AWS configuration file. If the values are set by the AWS CLI or programmatically by an SDK, the formatting is handled @@ -351,7 +356,7 @@ in the ``~/.aws/config`` file. [default] region = us-east-1 - s3 = + s3 = addressing_style = path signature_version = s3v4 @@ -360,25 +365,25 @@ in the ``~/.aws/config`` file. The following values are supported. ``auto`` - (Default) Attempts to use ``virtual``, but falls back to ``path`` + (Default) Attempts to use ``virtual``, but falls back to ``path`` if necessary. - + ``path`` Bucket name is included in the URI path. ``virtual`` Bucket name is included in the hostname. - * ``payload_signing_enabled``: Specifies whether to include an SHA-256 + * ``payload_signing_enabled``: Specifies whether to include an SHA-256 checksum with Amazon Signature Version 4 payloads. Valid settings are ``true`` or ``false``. For streaming uploads (``UploadPart`` and ``PutObject``) that use HTTPS and include a ``content-md5`` header, this setting is disabled by default. - * ``signature_version``: The AWS signature version to use when signing + * ``signature_version``: The AWS signature version to use when signing requests. When necessary, Boto automatically switches the signature version to an appropriate value. The following values are recognized. - + ``s3v4`` (Default) Signature Version 4 @@ -466,6 +471,10 @@ in the ``~/.aws/config`` file. functionality of ``standard`` mode with automatic client-side throttling. This is a provisional mode whose behavior might change. +``sigv4a_signing_region_set`` + A comma-delimited list of regions use when signing with SigV4a. If this is not set, + the SDK will check if the service has modeled a default; if none is found, this will + default to ``*``. .. _IAM Roles for Amazon EC2: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html .. _Using IAM Roles: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_use.html diff --git a/docs/source/guide/dynamodb.rst b/docs/source/guide/dynamodb.rst index 6818aa82e0..7a1380fcb8 100644 --- a/docs/source/guide/dynamodb.rst +++ b/docs/source/guide/dynamodb.rst @@ -137,7 +137,8 @@ Expected output:: Updating an item ---------------- -You can then update attributes of the item in the table:: +You can then update attributes of the item in the table +using :py:meth:`DynamoDB.Table.update_item`:: table.update_item( Key={ diff --git a/setup.cfg b/setup.cfg index cc3e720fb9..b1593e52a1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -3,7 +3,7 @@ universal = 0 [metadata] requires_dist = - botocore>=1.35.41,<1.36.0 + botocore>=1.35.42,<1.36.0 jmespath>=0.7.1,<2.0.0 s3transfer>=0.10.0,<0.11.0 diff --git a/setup.py b/setup.py index a85d641913..7a8c7c669a 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ requires = [ - 'botocore>=1.35.41,<1.36.0', + 'botocore>=1.35.42,<1.36.0', 'jmespath>=0.7.1,<2.0.0', 's3transfer>=0.10.0,<0.11.0', ]