Skip to content

Commit

Permalink
Merge branch 'release-1.35.66'
Browse files Browse the repository at this point in the history
* release-1.35.66:
  Bumping version to 1.35.66
  Add changelog entries from botocore
  Add client exceptions to boto3 docs (#4343)
  • Loading branch information
aws-sdk-python-automation committed Nov 20, 2024
2 parents fb7ac9a + cf90c62 commit 22d4088
Show file tree
Hide file tree
Showing 9 changed files with 232 additions and 3 deletions.
102 changes: 102 additions & 0 deletions .changes/1.35.66.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
[
{
"category": "``autoscaling``",
"description": "[``botocore``] With this release, customers can prioritize launching instances into ODCRs using targets from ASGs or Launch Templates. Customers can express their baseline instances' CPU-performance in attribute-based Instance Requirements configuration by referencing an instance family that meets their needs.",
"type": "api-change"
},
{
"category": "``bedrock-agent-runtime``",
"description": "[``botocore``] Releasing new Prompt Optimization to enhance your prompts for improved performance",
"type": "api-change"
},
{
"category": "``cloudfront``",
"description": "[``botocore``] Add support for gRPC, VPC origins, and Anycast IP Lists. Allow LoggingConfig IncludeCookies to be set regardless of whether the LoggingConfig is enabled.",
"type": "api-change"
},
{
"category": "``compute-optimizer``",
"description": "[``botocore``] This release enables AWS Compute Optimizer to analyze and generate optimization recommendations for Amazon Aurora database instances. It also enables Compute Optimizer to identify idle Amazon EC2 instances, Amazon EBS volumes, Amazon ECS services running on Fargate, and Amazon RDS databases.",
"type": "api-change"
},
{
"category": "``controltower``",
"description": "[``botocore``] Adds support for child enabled baselines which allow you to see the enabled baseline status for individual accounts.",
"type": "api-change"
},
{
"category": "``cost-optimization-hub``",
"description": "[``botocore``] This release adds action type \"Delete\" to the GetRecommendation, ListRecommendations and ListRecommendationSummaries APIs to support new EBS and ECS recommendations with action type \"Delete\".",
"type": "api-change"
},
{
"category": "``datazone``",
"description": "[``botocore``] This release supports Metadata Enforcement Rule feature for Create Subscription Request action.",
"type": "api-change"
},
{
"category": "``discovery``",
"description": "[``botocore``] Add support to import data from commercially available discovery tools without file manipulation.",
"type": "api-change"
},
{
"category": "``ec2``",
"description": "[``botocore``] With this release, customers can express their desire to launch instances only in an ODCR or ODCR group rather than OnDemand capacity. Customers can express their baseline instances' CPU-performance in attribute-based Instance Requirements configuration by referencing an instance family.",
"type": "api-change"
},
{
"category": "``ecs``",
"description": "[``botocore``] This release adds support for the Availability Zone rebalancing feature on Amazon ECS.",
"type": "api-change"
},
{
"category": "``elbv2``",
"description": "[``botocore``] This release adds support for configuring Load balancer Capacity Unit reservations",
"type": "api-change"
},
{
"category": "``lambda``",
"description": "[``botocore``] Add Node 22.x (node22.x) support to AWS Lambda",
"type": "api-change"
},
{
"category": "``mediaconvert``",
"description": "[``botocore``] This release adds the ability to reconfigure concurrent job settings for existing queues and create queues with custom concurrent job settings.",
"type": "api-change"
},
{
"category": "``mediapackagev2``",
"description": "[``botocore``] MediaPackage v2 now supports the Media Quality Confidence Score (MQCS) published from MediaLive. Customers can control input switching based on the MQCS and publishing HTTP Headers for the MQCS via the API.",
"type": "api-change"
},
{
"category": "``omics``",
"description": "[``botocore``] Enabling call caching feature that allows customers to reuse previously computed results from a set of completed tasks in a new workflow run.",
"type": "api-change"
},
{
"category": "``rbin``",
"description": "[``botocore``] This release adds support for exclusion tags for Recycle Bin, which allows you to identify resources that are to be excluded, or ignored, by a Region-level retention rule.",
"type": "api-change"
},
{
"category": "``rds``",
"description": "[``botocore``] This release adds support for scale storage on the DB instance using a Blue/Green Deployment.",
"type": "api-change"
},
{
"category": "``timestream-query``",
"description": "[``botocore``] This release adds support for Provisioning Timestream Compute Units (TCUs), a new feature that allows provisioning dedicated compute resources for your queries, providing predictable and cost-effective query performance.",
"type": "api-change"
},
{
"category": "``workspaces``",
"description": "[``botocore``] Added support for Rocky Linux 8 on Amazon WorkSpaces Personal.",
"type": "api-change"
},
{
"category": "``workspaces-web``",
"description": "[``botocore``] Added data protection settings with support for inline data redaction.",
"type": "api-change"
}
]
25 changes: 25 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@
CHANGELOG
=========

1.35.66
=======

* api-change:``autoscaling``: [``botocore``] With this release, customers can prioritize launching instances into ODCRs using targets from ASGs or Launch Templates. Customers can express their baseline instances' CPU-performance in attribute-based Instance Requirements configuration by referencing an instance family that meets their needs.
* api-change:``bedrock-agent-runtime``: [``botocore``] Releasing new Prompt Optimization to enhance your prompts for improved performance
* api-change:``cloudfront``: [``botocore``] Add support for gRPC, VPC origins, and Anycast IP Lists. Allow LoggingConfig IncludeCookies to be set regardless of whether the LoggingConfig is enabled.
* api-change:``compute-optimizer``: [``botocore``] This release enables AWS Compute Optimizer to analyze and generate optimization recommendations for Amazon Aurora database instances. It also enables Compute Optimizer to identify idle Amazon EC2 instances, Amazon EBS volumes, Amazon ECS services running on Fargate, and Amazon RDS databases.
* api-change:``controltower``: [``botocore``] Adds support for child enabled baselines which allow you to see the enabled baseline status for individual accounts.
* api-change:``cost-optimization-hub``: [``botocore``] This release adds action type "Delete" to the GetRecommendation, ListRecommendations and ListRecommendationSummaries APIs to support new EBS and ECS recommendations with action type "Delete".
* api-change:``datazone``: [``botocore``] This release supports Metadata Enforcement Rule feature for Create Subscription Request action.
* api-change:``discovery``: [``botocore``] Add support to import data from commercially available discovery tools without file manipulation.
* api-change:``ec2``: [``botocore``] With this release, customers can express their desire to launch instances only in an ODCR or ODCR group rather than OnDemand capacity. Customers can express their baseline instances' CPU-performance in attribute-based Instance Requirements configuration by referencing an instance family.
* api-change:``ecs``: [``botocore``] This release adds support for the Availability Zone rebalancing feature on Amazon ECS.
* api-change:``elbv2``: [``botocore``] This release adds support for configuring Load balancer Capacity Unit reservations
* api-change:``lambda``: [``botocore``] Add Node 22.x (node22.x) support to AWS Lambda
* api-change:``mediaconvert``: [``botocore``] This release adds the ability to reconfigure concurrent job settings for existing queues and create queues with custom concurrent job settings.
* api-change:``mediapackagev2``: [``botocore``] MediaPackage v2 now supports the Media Quality Confidence Score (MQCS) published from MediaLive. Customers can control input switching based on the MQCS and publishing HTTP Headers for the MQCS via the API.
* api-change:``omics``: [``botocore``] Enabling call caching feature that allows customers to reuse previously computed results from a set of completed tasks in a new workflow run.
* api-change:``rbin``: [``botocore``] This release adds support for exclusion tags for Recycle Bin, which allows you to identify resources that are to be excluded, or ignored, by a Region-level retention rule.
* api-change:``rds``: [``botocore``] This release adds support for scale storage on the DB instance using a Blue/Green Deployment.
* api-change:``timestream-query``: [``botocore``] This release adds support for Provisioning Timestream Compute Units (TCUs), a new feature that allows provisioning dedicated compute resources for your queries, providing predictable and cost-effective query performance.
* api-change:``workspaces``: [``botocore``] Added support for Rocky Linux 8 on Amazon WorkSpaces Personal.
* api-change:``workspaces-web``: [``botocore``] Added data protection settings with support for inline data redaction.


1.35.65
=======

Expand Down
2 changes: 1 addition & 1 deletion boto3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from boto3.session import Session

__author__ = 'Amazon Web Services'
__version__ = '1.35.65'
__version__ = '1.35.66'


# The default Boto3 session; autoloaded when needed.
Expand Down
2 changes: 2 additions & 0 deletions boto3/docs/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def __init__(self, service_name, session, root_docs_path):
self.sections = [
'title',
'client',
'client-exceptions',
'paginators',
'waiters',
'resources',
Expand All @@ -65,6 +66,7 @@ def document_service(self):
self.title(doc_structure.get_section('title'))

self.client_api(doc_structure.get_section('client'))
self.client_exceptions(doc_structure.get_section('client-exceptions'))
self.paginator_api(doc_structure.get_section('paginators'))
self.waiter_api(doc_structure.get_section('waiters'))
if self._service_resource:
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ universal = 0

[metadata]
requires_dist =
botocore>=1.35.65,<1.36.0
botocore>=1.35.66,<1.36.0
jmespath>=0.7.1,<2.0.0
s3transfer>=0.10.0,<0.11.0

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


requires = [
'botocore>=1.35.65,<1.36.0',
'botocore>=1.35.66,<1.36.0',
'jmespath>=0.7.1,<2.0.0',
's3transfer>=0.10.0,<0.11.0',
]
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/docs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,12 @@ def add_shape_to_params(
required_list.append(param_name)
params_shape['required'] = required_list

def add_shape_to_errors(self, shape_name):
operation = self.json_model['operations']['SampleOperation']
errors = operation.get('errors', [])
errors.append({'shape': shape_name})
operation['errors'] = errors

def assert_contains_lines_in_order(self, lines, contents=None):
if contents is None:
contents = self.doc_structure.flush_structure().decode('utf-8')
Expand Down
86 changes: 86 additions & 0 deletions tests/unit/docs/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,25 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
from botocore.docs.client import ClientExceptionsDocumenter

from boto3.docs.client import Boto3ClientDocumenter
from tests.unit.docs import BaseDocsTest


class TestBoto3ClientDocumenter(BaseDocsTest):
def setUp(self):
super().setUp()
exception_shape = {
'SomeException': {
'exception': True,
'type': 'structure',
'members': {'Message': {'shape': 'String'}},
}
}
self.add_shape(exception_shape)
self.add_shape_to_errors('SomeException')
self.setup_client_and_resource()
self.client_documenter = Boto3ClientDocumenter(
self.client, self.root_services_path
)
Expand Down Expand Up @@ -96,8 +108,82 @@ def test_document_client(self):
' - *(dict) --*',
' - **Foo** *(string) --*',
' - **Bar** *(string) --*',
'**Exceptions**',
'* :py:class:`MyService.Client.exceptions.SomeException`',
],
self.get_nested_service_contents(
'myservice', 'client', 'sample_operation'
),
)


class TestClientExceptionsDocumenter(BaseDocsTest):
def setup_documenter(self):
self.setup_client_and_resource()
self.exceptions_documenter = ClientExceptionsDocumenter(
self.client, self.root_services_path
)

def test_no_modeled_exceptions(self):
self.setup_documenter()
self.exceptions_documenter.document_exceptions(self.doc_structure)
self.assert_contains_lines_in_order(
[
'=================',
'Client Exceptions',
'=================',
'Client exceptions are available',
'This client has no modeled exception classes.',
]
)

def test_modeled_exceptions(self):
exception_shape = {
'SomeException': {
'exception': True,
'type': 'structure',
'members': {'Message': {'shape': 'String'}},
}
}
self.add_shape(exception_shape)
self.setup_documenter()
self.exceptions_documenter.document_exceptions(self.doc_structure)
self.assert_contains_lines_in_order(
[
'=================',
'Client Exceptions',
'=================',
'Client exceptions are available',
'The available client exceptions are:',
'.. toctree::',
':maxdepth: 1',
':titlesonly:',
' myservice/client/exceptions/SomeException',
]
)
self.assert_contains_lines_in_order(
[
'.. py:class:: MyService.Client.exceptions.SomeException',
'**Example**',
'::',
'except client.exceptions.SomeException as e:',
'.. py:attribute:: response',
'**Syntax**',
'{',
"'Message': 'string',",
"'Error': {",
"'Code': 'string',",
"'Message': 'string'",
'}',
'}',
'**Structure**',
'- *(dict) --*',
'- **Message** *(string) --* ',
'- **Error** *(dict) --* ',
'- **Code** *(string) --* ',
'- **Message** *(string) --* ',
],
self.get_nested_service_contents(
'myservice', 'client/exceptions', 'SomeException'
),
)
8 changes: 8 additions & 0 deletions tests/unit/docs/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ def test_document_service(self):
'.. py:class:: MyService.Client',
'These are the available methods:',
' myservice/client/sample_operation',
'=================',
'Client Exceptions',
'=================',
'Client exceptions are available on a client instance ',
'via the ``exceptions`` property. For more detailed instructions ',
'and examples on the exact usage of client exceptions, see the ',
'error handling ',
'This client has no modeled exception classes.',
'==========',
'Paginators',
'==========',
Expand Down

0 comments on commit 22d4088

Please sign in to comment.