Skip to content

Commit 3c94529

Browse files
committed
Release: AWS SDK Transcribe Streaming 0.3.0
1 parent e34e131 commit 3c94529

6 files changed

Lines changed: 35 additions & 90 deletions

File tree

clients/aws-sdk-python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies = []
2424
[project.optional-dependencies]
2525
bedrock_runtime = ["aws_sdk_bedrock_runtime==0.3.0"]
2626
sagemaker_runtime_http2 = ["aws_sdk_sagemaker_runtime_http2==0.1.0"]
27-
transcribe_streaming = ["aws_sdk_transcribe_streaming==0.2.0"]
27+
transcribe_streaming = ["aws_sdk_transcribe_streaming==0.3.0"]
2828
all = [
2929
"aws_sdk_python[bedrock_runtime]",
3030
"aws_sdk_python[sagemaker_runtime_http2]",

clients/aws-sdk-transcribe-streaming/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
## Unreleased
44

5+
* None yet.
6+
7+
## v0.3.0
8+
9+
### Breaking
10+
* Function signature for `resolve_retry_strategy` has been changed to prevent unnecessary code duplication in operation methods. This will affect all 0.3.0 clients.
11+
12+
### Dependencies
13+
* **Updated**: `smithy_aws_core[eventstream, json]` from `~=0.2.0` to `~=0.3.0`.
14+
* **Updated**: `smithy_core` from `~=0.2.0` to `~=0.3.0`.
15+
516
## v0.2.0
617

718
### API Changes

clients/aws-sdk-transcribe-streaming/docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
project = "Amazon Transcribe Streaming Service"
99
author = "Amazon Web Services"
10-
release = "0.2.0"
10+
release = "0.3.0"
1111

1212
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
1313

clients/aws-sdk-transcribe-streaming/pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
[project]
55
name = "aws_sdk_transcribe_streaming"
6-
version = "0.2.0"
6+
version = "0.3.0"
77
description = "aws_sdk_transcribe_streaming client"
88
readme = "README.md"
99
requires-python = ">=3.12"
@@ -24,15 +24,15 @@ classifiers = [
2424
]
2525

2626
dependencies = [
27-
"smithy_aws_core[eventstream, json]~=0.2.0",
28-
"smithy_core~=0.2.0",
27+
"smithy_aws_core[eventstream, json]~=0.3.0",
28+
"smithy_core~=0.3.0",
2929
"smithy_http[awscrt]~=0.3.0"
3030
]
3131

3232
[dependency-groups]
3333
test = [
34-
"pytest>=7.2.0,<8.0.0",
35-
"pytest-asyncio>=0.20.3,<0.21.0"
34+
"pytest>=9.0.1,<10.0.0",
35+
"pytest-asyncio>=1.3.0,<1.4.0"
3636
]
3737

3838
docs = [
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Code generated by smithy-python-codegen DO NOT EDIT.
22

3-
__version__: str = "0.2.0"
3+
__version__: str = "0.3.0"

clients/aws-sdk-transcribe-streaming/src/aws_sdk_transcribe_streaming/client.py

Lines changed: 16 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
from smithy_core.aio.eventstream import DuplexEventStream
88
from smithy_core.exceptions import ExpectationNotMetError
99
from smithy_core.interceptors import InterceptorChain
10-
from smithy_core.interfaces.retries import RetryStrategy
11-
from smithy_core.retries import RetryStrategyOptions, RetryStrategyResolver
10+
from smithy_core.retries import RetryStrategyResolver
1211
from smithy_core.types import TypedProperties
1312
from smithy_http.plugins import user_agent_plugin
1413

@@ -105,22 +104,9 @@ async def get_medical_scribe_stream(
105104
"protocol and transport MUST be set on the config to make calls."
106105
)
107106

108-
# Resolve retry strategy from config
109-
if isinstance(config.retry_strategy, RetryStrategy):
110-
retry_strategy = config.retry_strategy
111-
elif isinstance(config.retry_strategy, RetryStrategyOptions):
112-
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
113-
options=config.retry_strategy
114-
)
115-
elif config.retry_strategy is None:
116-
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
117-
options=RetryStrategyOptions()
118-
)
119-
else:
120-
raise TypeError(
121-
f"retry_strategy must be RetryStrategy, RetryStrategyOptions, or None, "
122-
f"got {type(config.retry_strategy).__name__}"
123-
)
107+
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
108+
retry_strategy=config.retry_strategy
109+
)
124110

125111
pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport)
126112
call = ClientCall(
@@ -179,22 +165,9 @@ async def start_call_analytics_stream_transcription(
179165
"protocol and transport MUST be set on the config to make calls."
180166
)
181167

182-
# Resolve retry strategy from config
183-
if isinstance(config.retry_strategy, RetryStrategy):
184-
retry_strategy = config.retry_strategy
185-
elif isinstance(config.retry_strategy, RetryStrategyOptions):
186-
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
187-
options=config.retry_strategy
188-
)
189-
elif config.retry_strategy is None:
190-
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
191-
options=RetryStrategyOptions()
192-
)
193-
else:
194-
raise TypeError(
195-
f"retry_strategy must be RetryStrategy, RetryStrategyOptions, or None, "
196-
f"got {type(config.retry_strategy).__name__}"
197-
)
168+
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
169+
retry_strategy=config.retry_strategy
170+
)
198171

199172
pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport)
200173
call = ClientCall(
@@ -277,22 +250,9 @@ async def start_medical_scribe_stream(
277250
"protocol and transport MUST be set on the config to make calls."
278251
)
279252

280-
# Resolve retry strategy from config
281-
if isinstance(config.retry_strategy, RetryStrategy):
282-
retry_strategy = config.retry_strategy
283-
elif isinstance(config.retry_strategy, RetryStrategyOptions):
284-
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
285-
options=config.retry_strategy
286-
)
287-
elif config.retry_strategy is None:
288-
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
289-
options=RetryStrategyOptions()
290-
)
291-
else:
292-
raise TypeError(
293-
f"retry_strategy must be RetryStrategy, RetryStrategyOptions, or None, "
294-
f"got {type(config.retry_strategy).__name__}"
295-
)
253+
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
254+
retry_strategy=config.retry_strategy
255+
)
296256

297257
pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport)
298258
call = ClientCall(
@@ -356,22 +316,9 @@ async def start_medical_stream_transcription(
356316
"protocol and transport MUST be set on the config to make calls."
357317
)
358318

359-
# Resolve retry strategy from config
360-
if isinstance(config.retry_strategy, RetryStrategy):
361-
retry_strategy = config.retry_strategy
362-
elif isinstance(config.retry_strategy, RetryStrategyOptions):
363-
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
364-
options=config.retry_strategy
365-
)
366-
elif config.retry_strategy is None:
367-
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
368-
options=RetryStrategyOptions()
369-
)
370-
else:
371-
raise TypeError(
372-
f"retry_strategy must be RetryStrategy, RetryStrategyOptions, or None, "
373-
f"got {type(config.retry_strategy).__name__}"
374-
)
319+
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
320+
retry_strategy=config.retry_strategy
321+
)
375322

376323
pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport)
377324
call = ClientCall(
@@ -430,22 +377,9 @@ async def start_stream_transcription(
430377
"protocol and transport MUST be set on the config to make calls."
431378
)
432379

433-
# Resolve retry strategy from config
434-
if isinstance(config.retry_strategy, RetryStrategy):
435-
retry_strategy = config.retry_strategy
436-
elif isinstance(config.retry_strategy, RetryStrategyOptions):
437-
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
438-
options=config.retry_strategy
439-
)
440-
elif config.retry_strategy is None:
441-
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
442-
options=RetryStrategyOptions()
443-
)
444-
else:
445-
raise TypeError(
446-
f"retry_strategy must be RetryStrategy, RetryStrategyOptions, or None, "
447-
f"got {type(config.retry_strategy).__name__}"
448-
)
380+
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
381+
retry_strategy=config.retry_strategy
382+
)
449383

450384
pipeline = RequestPipeline(protocol=config.protocol, transport=config.transport)
451385
call = ClientCall(

0 commit comments

Comments
 (0)