From 50eabe3dc7c6803cb27707c68da12c325b62b244 Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Fri, 21 Nov 2025 18:58:00 -0500 Subject: [PATCH 1/4] Update to the latest Amazon Transcribe Streaming service model --- codegen/aws-models/transcribe-streaming.json | 270 +++++++++++++++++++ 1 file changed, 270 insertions(+) diff --git a/codegen/aws-models/transcribe-streaming.json b/codegen/aws-models/transcribe-streaming.json index d636846..b5e6ff0 100644 --- a/codegen/aws-models/transcribe-streaming.json +++ b/codegen/aws-models/transcribe-streaming.json @@ -1195,6 +1195,276 @@ "traits": { "smithy.api#enumValue": "zu-ZA" } + }, + "AM_ET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "am-ET" + } + }, + "BE_BY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "be-BY" + } + }, + "BG_BG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bg-BG" + } + }, + "BN_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bn-IN" + } + }, + "BS_BA": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "bs-BA" + } + }, + "CKB_IQ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ckb-IQ" + } + }, + "CKB_IR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ckb-IR" + } + }, + "CY_WL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "cy-WL" + } + }, + "ES_MX": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "es-MX" + } + }, + "ET_ET": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "et-ET" + } + }, + "FA_AF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "fa-AF" + } + }, + "GU_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "gu-IN" + } + }, + "HT_HT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ht-HT" + } + }, + "HU_HU": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hu-HU" + } + }, + "HY_AM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "hy-AM" + } + }, + "IS_IS": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "is-IS" + } + }, + "JV_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "jv-ID" + } + }, + "KA_GE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ka-GE" + } + }, + "KAB_DZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "kab-DZ" + } + }, + "KK_KZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "kk-KZ" + } + }, + "KM_KH": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "km-KH" + } + }, + "KN_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "kn-IN" + } + }, + "LG_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lg-IN" + } + }, + "LT_LT": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "lt-LT" + } + }, + "MK_MK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mk-MK" + } + }, + "ML_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ml-IN" + } + }, + "MR_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "mr-IN" + } + }, + "MY_MM": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "my-MM" + } + }, + "NE_NP": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ne-NP" + } + }, + "OR_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "or-IN" + } + }, + "PA_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "pa-IN" + } + }, + "PS_AF": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ps-AF" + } + }, + "SI_LK": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "si-LK" + } + }, + "SL_SI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sl-SI" + } + }, + "SQ_AL": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sq-AL" + } + }, + "SU_ID": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "su-ID" + } + }, + "SW_BI": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sw-BI" + } + }, + "SW_KE": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sw-KE" + } + }, + "SW_RW": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sw-RW" + } + }, + "SW_TZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sw-TZ" + } + }, + "SW_UG": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "sw-UG" + } + }, + "TA_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "ta-IN" + } + }, + "TE_IN": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "te-IN" + } + }, + "TR_TR": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "tr-TR" + } + }, + "UZ_UZ": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "uz-UZ" + } } } }, From 0874fb6a11c14b61373d8942a09e01b4a5fa425c Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Fri, 21 Nov 2025 18:58:39 -0500 Subject: [PATCH 2/4] Update got aws-sdk-transcribe-streaming v0.2.0 --- .../aws-sdk-transcribe-streaming/CHANGELOG.md | 5 + .../aws-sdk-transcribe-streaming/docs/conf.py | 2 +- .../pyproject.toml | 8 +- .../aws_sdk_transcribe_streaming/__init__.py | 2 +- .../_private/schemas.py | 180 ++++++++++++++++++ .../aws_sdk_transcribe_streaming/client.py | 104 +++++++++- .../aws_sdk_transcribe_streaming/config.py | 11 +- .../aws_sdk_transcribe_streaming/models.py | 45 +++++ .../tests/test_protocol.py | 4 + 9 files changed, 345 insertions(+), 16 deletions(-) diff --git a/clients/aws-sdk-transcribe-streaming/CHANGELOG.md b/clients/aws-sdk-transcribe-streaming/CHANGELOG.md index 44e0818..c596c83 100644 --- a/clients/aws-sdk-transcribe-streaming/CHANGELOG.md +++ b/clients/aws-sdk-transcribe-streaming/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +## v0.2.0 + +### API Changes +* This release adds support for additional locales in AWS transcribe streaming. + ## v0.1.0 ### Features diff --git a/clients/aws-sdk-transcribe-streaming/docs/conf.py b/clients/aws-sdk-transcribe-streaming/docs/conf.py index c6b9c11..e746b4c 100644 --- a/clients/aws-sdk-transcribe-streaming/docs/conf.py +++ b/clients/aws-sdk-transcribe-streaming/docs/conf.py @@ -7,7 +7,7 @@ project = "Amazon Transcribe Streaming Service" author = "Amazon Web Services" -release = "0.0.1" +release = "0.2.0" extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"] diff --git a/clients/aws-sdk-transcribe-streaming/pyproject.toml b/clients/aws-sdk-transcribe-streaming/pyproject.toml index 116e150..17e258a 100644 --- a/clients/aws-sdk-transcribe-streaming/pyproject.toml +++ b/clients/aws-sdk-transcribe-streaming/pyproject.toml @@ -3,7 +3,7 @@ [project] name = "aws_sdk_transcribe_streaming" -version = "0.1.0" +version = "0.2.0" description = "aws_sdk_transcribe_streaming client" readme = "README.md" requires-python = ">=3.12" @@ -24,9 +24,9 @@ classifiers = [ ] dependencies = [ - "smithy_aws_core[eventstream, json]~=0.1.0", - "smithy_core~=0.1.0", - "smithy_http[awscrt]~=0.2.0" + "smithy_aws_core[eventstream, json]~=0.2.0", + "smithy_core~=0.2.0", + "smithy_http[awscrt]~=0.3.0" ] [dependency-groups] diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/__init__.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/__init__.py index e1ee049..c8417da 100644 --- a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/__init__.py +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/__init__.py @@ -1,3 +1,3 @@ # Code generated by smithy-python-codegen DO NOT EDIT. -__version__: str = "0.1.0" +__version__: str = "0.2.0" diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/_private/schemas.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/_private/schemas.py index 0cfb2aa..57841b8 100644 --- a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/_private/schemas.py +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/_private/schemas.py @@ -1241,6 +1241,186 @@ "target": UNIT, "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="zu-ZA")], }, + "AM_ET": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="am-ET")], + }, + "BE_BY": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="be-BY")], + }, + "BG_BG": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="bg-BG")], + }, + "BN_IN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="bn-IN")], + }, + "BS_BA": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="bs-BA")], + }, + "CKB_IQ": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ckb-IQ")], + }, + "CKB_IR": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ckb-IR")], + }, + "CY_WL": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="cy-WL")], + }, + "ES_MX": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="es-MX")], + }, + "ET_ET": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="et-ET")], + }, + "FA_AF": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="fa-AF")], + }, + "GU_IN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="gu-IN")], + }, + "HT_HT": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ht-HT")], + }, + "HU_HU": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="hu-HU")], + }, + "HY_AM": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="hy-AM")], + }, + "IS_IS": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="is-IS")], + }, + "JV_ID": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="jv-ID")], + }, + "KA_GE": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ka-GE")], + }, + "KAB_DZ": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="kab-DZ")], + }, + "KK_KZ": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="kk-KZ")], + }, + "KM_KH": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="km-KH")], + }, + "KN_IN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="kn-IN")], + }, + "LG_IN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="lg-IN")], + }, + "LT_LT": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="lt-LT")], + }, + "MK_MK": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mk-MK")], + }, + "ML_IN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ml-IN")], + }, + "MR_IN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="mr-IN")], + }, + "MY_MM": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="my-MM")], + }, + "NE_NP": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ne-NP")], + }, + "OR_IN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="or-IN")], + }, + "PA_IN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="pa-IN")], + }, + "PS_AF": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ps-AF")], + }, + "SI_LK": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="si-LK")], + }, + "SL_SI": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="sl-SI")], + }, + "SQ_AL": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="sq-AL")], + }, + "SU_ID": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="su-ID")], + }, + "SW_BI": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="sw-BI")], + }, + "SW_KE": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="sw-KE")], + }, + "SW_RW": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="sw-RW")], + }, + "SW_TZ": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="sw-TZ")], + }, + "SW_UG": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="sw-UG")], + }, + "TA_IN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="ta-IN")], + }, + "TE_IN": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="te-IN")], + }, + "TR_TR": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="tr-TR")], + }, + "UZ_UZ": { + "target": UNIT, + "traits": [Trait.new(id=ShapeID("smithy.api#enumValue"), value="uz-UZ")], + }, }, ) diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/client.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/client.py index 9c56080..d8155f9 100644 --- a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/client.py +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/client.py @@ -7,6 +7,8 @@ from smithy_core.aio.eventstream import DuplexEventStream from smithy_core.exceptions import ExpectationNotMetError from smithy_core.interceptors import InterceptorChain +from smithy_core.interfaces.retries import RetryStrategy +from smithy_core.retries import RetryStrategyOptions, RetryStrategyResolver from smithy_core.types import TypedProperties from smithy_http.plugins import user_agent_plugin @@ -75,6 +77,8 @@ def __init__( for plugin in client_plugins: plugin(self._config) + self._retry_strategy_resolver = RetryStrategyResolver() + async def get_medical_scribe_stream( self, input: GetMedicalScribeStreamInput, plugins: list[Plugin] | None = None ) -> GetMedicalScribeStreamOutput: @@ -100,6 +104,24 @@ async def get_medical_scribe_stream( raise ExpectationNotMetError( "protocol and transport MUST be set on the config to make calls." ) + + # Resolve retry strategy from config + if isinstance(config.retry_strategy, RetryStrategy): + retry_strategy = config.retry_strategy + elif isinstance(config.retry_strategy, RetryStrategyOptions): + retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy( + options=config.retry_strategy + ) + elif config.retry_strategy is None: + retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy( + options=RetryStrategyOptions() + ) + else: + raise TypeError( + f"retry_strategy must be RetryStrategy, RetryStrategyOptions, or None, " + f"got {type(config.retry_strategy).__name__}" + ) + pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport) call = ClientCall( input=input, @@ -109,7 +131,7 @@ async def get_medical_scribe_stream( auth_scheme_resolver=config.auth_scheme_resolver, supported_auth_schemes=config.auth_schemes, endpoint_resolver=config.endpoint_resolver, - retry_strategy=config.retry_strategy, + retry_strategy=retry_strategy, ) return await pipeline(call) @@ -156,6 +178,24 @@ async def start_call_analytics_stream_transcription( raise ExpectationNotMetError( "protocol and transport MUST be set on the config to make calls." ) + + # Resolve retry strategy from config + if isinstance(config.retry_strategy, RetryStrategy): + retry_strategy = config.retry_strategy + elif isinstance(config.retry_strategy, RetryStrategyOptions): + retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy( + options=config.retry_strategy + ) + elif config.retry_strategy is None: + retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy( + options=RetryStrategyOptions() + ) + else: + raise TypeError( + f"retry_strategy must be RetryStrategy, RetryStrategyOptions, or None, " + f"got {type(config.retry_strategy).__name__}" + ) + pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport) call = ClientCall( input=input, @@ -165,7 +205,7 @@ async def start_call_analytics_stream_transcription( auth_scheme_resolver=config.auth_scheme_resolver, supported_auth_schemes=config.auth_schemes, endpoint_resolver=config.endpoint_resolver, - retry_strategy=config.retry_strategy, + retry_strategy=retry_strategy, ) return await pipeline.duplex_stream( @@ -236,6 +276,24 @@ async def start_medical_scribe_stream( raise ExpectationNotMetError( "protocol and transport MUST be set on the config to make calls." ) + + # Resolve retry strategy from config + if isinstance(config.retry_strategy, RetryStrategy): + retry_strategy = config.retry_strategy + elif isinstance(config.retry_strategy, RetryStrategyOptions): + retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy( + options=config.retry_strategy + ) + elif config.retry_strategy is None: + retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy( + options=RetryStrategyOptions() + ) + else: + raise TypeError( + f"retry_strategy must be RetryStrategy, RetryStrategyOptions, or None, " + f"got {type(config.retry_strategy).__name__}" + ) + pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport) call = ClientCall( input=input, @@ -245,7 +303,7 @@ async def start_medical_scribe_stream( auth_scheme_resolver=config.auth_scheme_resolver, supported_auth_schemes=config.auth_schemes, endpoint_resolver=config.endpoint_resolver, - retry_strategy=config.retry_strategy, + retry_strategy=retry_strategy, ) return await pipeline.duplex_stream( @@ -297,6 +355,24 @@ async def start_medical_stream_transcription( raise ExpectationNotMetError( "protocol and transport MUST be set on the config to make calls." ) + + # Resolve retry strategy from config + if isinstance(config.retry_strategy, RetryStrategy): + retry_strategy = config.retry_strategy + elif isinstance(config.retry_strategy, RetryStrategyOptions): + retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy( + options=config.retry_strategy + ) + elif config.retry_strategy is None: + retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy( + options=RetryStrategyOptions() + ) + else: + raise TypeError( + f"retry_strategy must be RetryStrategy, RetryStrategyOptions, or None, " + f"got {type(config.retry_strategy).__name__}" + ) + pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport) call = ClientCall( input=input, @@ -306,7 +382,7 @@ async def start_medical_stream_transcription( auth_scheme_resolver=config.auth_scheme_resolver, supported_auth_schemes=config.auth_schemes, endpoint_resolver=config.endpoint_resolver, - retry_strategy=config.retry_strategy, + retry_strategy=retry_strategy, ) return await pipeline.duplex_stream( @@ -353,6 +429,24 @@ async def start_stream_transcription( raise ExpectationNotMetError( "protocol and transport MUST be set on the config to make calls." ) + + # Resolve retry strategy from config + if isinstance(config.retry_strategy, RetryStrategy): + retry_strategy = config.retry_strategy + elif isinstance(config.retry_strategy, RetryStrategyOptions): + retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy( + options=config.retry_strategy + ) + elif config.retry_strategy is None: + retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy( + options=RetryStrategyOptions() + ) + else: + raise TypeError( + f"retry_strategy must be RetryStrategy, RetryStrategyOptions, or None, " + f"got {type(config.retry_strategy).__name__}" + ) + pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport) call = ClientCall( input=input, @@ -362,7 +456,7 @@ async def start_stream_transcription( auth_scheme_resolver=config.auth_scheme_resolver, supported_auth_schemes=config.auth_schemes, endpoint_resolver=config.endpoint_resolver, - retry_strategy=config.retry_strategy, + retry_strategy=retry_strategy, ) return await pipeline.duplex_stream( diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/config.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/config.py index 2685f7b..054c513 100644 --- a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/config.py +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/config.py @@ -19,7 +19,7 @@ from smithy_core.interceptors import Interceptor from smithy_core.interfaces import URI from smithy_core.interfaces.retries import RetryStrategy -from smithy_core.retries import SimpleRetryStrategy +from smithy_core.retries import RetryStrategyOptions from smithy_core.shapes import ShapeID from smithy_http.aio.crt import AWSCRTHTTPClient from smithy_http.interfaces import HTTPRequestConfiguration @@ -81,7 +81,7 @@ class Config: interceptors: list[_ServiceInterceptor] protocol: ClientProtocol[Any, Any] | None region: str | None - retry_strategy: RetryStrategy + retry_strategy: RetryStrategy | RetryStrategyOptions | None sdk_ua_app_id: str | None transport: ClientTransport[Any, Any] | None user_agent_extra: str | None @@ -104,7 +104,7 @@ def __init__( interceptors: list[_ServiceInterceptor] | None = None, protocol: ClientProtocol[Any, Any] | None = None, region: str | None = None, - retry_strategy: RetryStrategy | None = None, + retry_strategy: RetryStrategy | RetryStrategyOptions | None = None, sdk_ua_app_id: str | None = None, transport: ClientTransport[Any, Any] | None = None, user_agent_extra: str | None = None, @@ -152,7 +152,8 @@ def __init__( service endpoint. :param retry_strategy: - The retry strategy for issuing retry tokens and computing retry delays. + The retry strategy or options for configuring retry behavior. Can be either a + configured RetryStrategy or RetryStrategyOptions to create one. :param sdk_ua_app_id: A unique and opaque application ID that is appended to the User-Agent header. @@ -179,7 +180,7 @@ def __init__( self.interceptors = interceptors or [] self.protocol = protocol or RestJsonClientProtocol(_SCHEMA_TRANSCRIBE) self.region = region - self.retry_strategy = retry_strategy or SimpleRetryStrategy() + self.retry_strategy = retry_strategy self.sdk_ua_app_id = sdk_ua_app_id self.transport = transport or AWSCRTHTTPClient() self.user_agent_extra = user_agent_extra diff --git a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/models.py b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/models.py index 446f210..be1d07f 100644 --- a/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/models.py +++ b/clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/models.py @@ -3622,6 +3622,51 @@ class LanguageCode(StrEnum): UK_UA = "uk-UA" VI_VN = "vi-VN" ZU_ZA = "zu-ZA" + AM_ET = "am-ET" + BE_BY = "be-BY" + BG_BG = "bg-BG" + BN_IN = "bn-IN" + BS_BA = "bs-BA" + CKB_IQ = "ckb-IQ" + CKB_IR = "ckb-IR" + CY_WL = "cy-WL" + ES_MX = "es-MX" + ET_ET = "et-ET" + FA_AF = "fa-AF" + GU_IN = "gu-IN" + HT_HT = "ht-HT" + HU_HU = "hu-HU" + HY_AM = "hy-AM" + IS_IS = "is-IS" + JV_ID = "jv-ID" + KA_GE = "ka-GE" + KAB_DZ = "kab-DZ" + KK_KZ = "kk-KZ" + KM_KH = "km-KH" + KN_IN = "kn-IN" + LG_IN = "lg-IN" + LT_LT = "lt-LT" + MK_MK = "mk-MK" + ML_IN = "ml-IN" + MR_IN = "mr-IN" + MY_MM = "my-MM" + NE_NP = "ne-NP" + OR_IN = "or-IN" + PA_IN = "pa-IN" + PS_AF = "ps-AF" + SI_LK = "si-LK" + SL_SI = "sl-SI" + SQ_AL = "sq-AL" + SU_ID = "su-ID" + SW_BI = "sw-BI" + SW_KE = "sw-KE" + SW_RW = "sw-RW" + SW_TZ = "sw-TZ" + SW_UG = "sw-UG" + TA_IN = "ta-IN" + TE_IN = "te-IN" + TR_TR = "tr-TR" + UZ_UZ = "uz-UZ" @dataclass(kw_only=True) diff --git a/clients/aws-sdk-transcribe-streaming/tests/test_protocol.py b/clients/aws-sdk-transcribe-streaming/tests/test_protocol.py index 8d3d501..484ba2c 100644 --- a/clients/aws-sdk-transcribe-streaming/tests/test_protocol.py +++ b/clients/aws-sdk-transcribe-streaming/tests/test_protocol.py @@ -19,6 +19,8 @@ def __init__(self, request: HTTPRequest): class RequestTestHTTPClient: """An asynchronous HTTP client solely for testing purposes.""" + TIMEOUT_EXCEPTIONS = () + def __init__(self, *, client_config: HTTPClientConfiguration | None = None): self._client_config = client_config @@ -35,6 +37,8 @@ async def send( class ResponseTestHTTPClient: """An asynchronous HTTP client solely for testing purposes.""" + TIMEOUT_EXCEPTIONS = () + def __init__( self, *, From 59db17764878f2e0ca0f524bef739e830edf05f2 Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Fri, 21 Nov 2025 19:11:49 -0500 Subject: [PATCH 3/4] add changelog entries --- clients/aws-sdk-transcribe-streaming/CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/clients/aws-sdk-transcribe-streaming/CHANGELOG.md b/clients/aws-sdk-transcribe-streaming/CHANGELOG.md index c596c83..1ee50ce 100644 --- a/clients/aws-sdk-transcribe-streaming/CHANGELOG.md +++ b/clients/aws-sdk-transcribe-streaming/CHANGELOG.md @@ -7,6 +7,15 @@ ### API Changes * This release adds support for additional locales in AWS transcribe streaming. +### Enhancements +* Add Standard Retry Mode + +### Dependencies +* **Updated**: `smithy_aws_core[eventstream, json]` from `~=0.1.0` to `~=0.2.0`. +* **Updated**: `smithy_core` from `~=0.1.0` to `~=0.2.0`. +* **Updated**: `smithy_http[awscrt]~=0.3.0` from `~=0.2.0` to `~=0.3.0`. + + ## v0.1.0 ### Features From 7a466360efb3069df5622071bfe5061bcc8175ea Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Fri, 21 Nov 2025 19:12:42 -0500 Subject: [PATCH 4/4] nit - remove extra newline --- clients/aws-sdk-transcribe-streaming/CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/clients/aws-sdk-transcribe-streaming/CHANGELOG.md b/clients/aws-sdk-transcribe-streaming/CHANGELOG.md index 1ee50ce..e2ec005 100644 --- a/clients/aws-sdk-transcribe-streaming/CHANGELOG.md +++ b/clients/aws-sdk-transcribe-streaming/CHANGELOG.md @@ -15,7 +15,6 @@ * **Updated**: `smithy_core` from `~=0.1.0` to `~=0.2.0`. * **Updated**: `smithy_http[awscrt]~=0.3.0` from `~=0.2.0` to `~=0.3.0`. - ## v0.1.0 ### Features