Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
86c0508
Update ClientGenerator.java
SamRemis Nov 24, 2025
bbdc668
Replace deprecated asyncio.iscoroutinefunction with inspect.iscorouti…
jonathan343 Nov 25, 2025
9c0225b
Add functional tests for standard retries (#601)
alexgromero Nov 25, 2025
ffc6587
Bump actions/checkout from 5 to 6
dependabot[bot] Nov 26, 2025
90e8969
Bump com.autonomousapps:dependency-analysis-gradle-plugin
dependabot[bot] Nov 26, 2025
7d47543
Merge pull request #610 from smithy-lang/dependabot/gradle/codegen/gr…
nateprewitt Nov 26, 2025
c88bbb9
Merge pull request #609 from smithy-lang/dependabot/github_actions/ac…
nateprewitt Nov 26, 2025
2fe8d3c
Update test dependencies (Smithy Python & AWS SDKs) (#611)
jonathan343 Dec 1, 2025
d8c00c5
Bump com.autonomousapps:dependency-analysis-gradle-plugin
dependabot[bot] Dec 3, 2025
4c9a554
Merge pull request #613 from smithy-lang/dependabot/gradle/codegen/gr…
nateprewitt Dec 3, 2025
685f749
Add perms and pins to github actions (#612)
nateprewitt Dec 3, 2025
12c3e0a
Update error messages for timeout errors (#607)
SamRemis Dec 5, 2025
50845eb
Updates from feedback
SamRemis Dec 9, 2025
ea2a4d0
Bump the github group with 3 updates
dependabot[bot] Dec 10, 2025
2426de4
Merge pull request #615 from smithy-lang/dependabot/github_actions/gi…
nateprewitt Dec 10, 2025
2257f56
Merge pull request #606 from SamRemis/retries-minor-refactor
SamRemis Dec 10, 2025
a767931
Remove version constraint for smithy-core in intermediate smithy pack…
jonathan343 Dec 11, 2025
fb0fcea
Bump astral-sh/setup-uv from 7.1.5 to 7.1.6 in the github group
dependabot[bot] Dec 17, 2025
3c742f0
Bump the gradle group in /codegen with 6 updates
dependabot[bot] Dec 17, 2025
c82cf04
Merge pull request #618 from smithy-lang/dependabot/github_actions/gi…
nateprewitt Dec 17, 2025
f006ffe
Merge pull request #619 from smithy-lang/dependabot/gradle/codegen/gr…
nateprewitt Dec 17, 2025
4f85bb6
Bump apache/skywalking-eyes
dependabot[bot] Dec 24, 2025
ba9e532
Merge pull request #620 from smithy-lang/dependabot/github_actions/ap…
nateprewitt Dec 24, 2025
142a92c
Use UUID instead of timestamp for changelog entry filenames (#621)
jonathan343 Dec 24, 2025
4bf9860
Release: smithy-core-0.3.0
nateprewitt Dec 11, 2025
46fc25f
Release: smithy_aws_core-0.3.0
nateprewitt Dec 11, 2025
b0b0a86
Release: smithy_http-0.3.1
nateprewitt Dec 11, 2025
011d0b4
Release: smithy_aws_event_stream-0.2.1
nateprewitt Dec 30, 2025
0126c02
Release: smithy_json-0.2.1
nateprewitt Dec 30, 2025
95e6040
Release: smithy-python codegen 0.2.0
nateprewitt Dec 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/check-license.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@ name: License Header Check

on:
pull_request:
branches:
- develop
push:
branches:
- develop

permissions:
contents: read

jobs:
check-license-header:
name: Check License Header
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

- uses: apache/skywalking-eyes/header@main
- uses: apache/skywalking-eyes/header@55373684d1b70e5f8fd9fc8ec114a89ad11a56a3
with:
mode: check
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: CI

on:
pull_request:
push:
branches:
- develop
- main

pull_request:
branches:
- develop
permissions:
contents: read

jobs:
ci:
Expand All @@ -20,19 +20,19 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v5
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

- name: Set up JDK 17
uses: actions/setup-java@v5
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e
with:
java-version: 17
distribution: 'corretto'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2

- name: Install uv and set the Python version
uses: astral-sh/setup-uv@v7
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867
with:
python-version: ${{ matrix.python-version }}
activate-environment: true
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/update-gradle-wrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,21 @@ on:
# Run at midnight (UTC) every wednesday
- cron: "0 0 * * 3"

permissions:
contents: read

jobs:
update-gradle-wrapper:
runs-on: ubuntu-latest

permissions:
# allow job to open a pull request with changes
pull-requests: write

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8

- name: Update Gradle Wrapper
uses: gradle-update/update-gradle-wrapper-action@v2
uses: gradle-update/update-gradle-wrapper-action@512b1875f3b6270828abfe77b247d5895a2da1e5
with:
paths: codegen/**
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private AwsPythonDependency() {}
*/
public static final PythonDependency SMITHY_AWS_CORE = new PythonDependency(
"smithy_aws_core",
"~=0.2.0",
"~=0.3.0",
PythonDependency.Type.DEPENDENCY,
false);
}
2 changes: 1 addition & 1 deletion codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@

allprojects {
group = "software.amazon.smithy.python"
version = "0.1.0"
version = "0.2.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -207,22 +207,9 @@ private void writeSharedOperationInit(PythonWriter writer, OperationShape operat
if config.protocol is None or config.transport is None:
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__}"
)
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
retry_strategy=config.retry_strategy
)

pipeline = RequestPipeline(
protocol=config.protocol,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public final class SmithyPythonDependency {
*/
public static final PythonDependency SMITHY_CORE = new PythonDependency(
"smithy_core",
"~=0.2.0",
"~=0.3.0",
Type.DEPENDENCY,
false);

Expand Down Expand Up @@ -78,7 +78,7 @@ public final class SmithyPythonDependency {
*/
public static final PythonDependency SMITHY_AWS_CORE = new PythonDependency(
"smithy_aws_core",
"~=0.2.0",
"~=0.3.0",
Type.DEPENDENCY,
false);

Expand All @@ -87,7 +87,7 @@ public final class SmithyPythonDependency {
*/
public static final PythonDependency PYTEST = new PythonDependency(
"pytest",
">=7.2.0,<8.0.0",
">=9.0.1,<10.0.0",
Type.TEST_DEPENDENCY,
false);

Expand All @@ -96,7 +96,7 @@ public final class SmithyPythonDependency {
*/
public static final PythonDependency PYTEST_ASYNCIO = new PythonDependency(
"pytest-asyncio",
">=0.20.3,<0.21.0",
">=1.3.0,<1.4.0",
Type.TEST_DEPENDENCY,
false);

Expand Down
4 changes: 2 additions & 2 deletions codegen/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[versions]
junit5 = "6.0.1"
smithy = "1.64.0"
smithy = "1.65.0"
test-logger-plugin = "4.0.0"
spotbugs = "6.0.22"
spotless = "8.1.0"
smithy-gradle-plugins = "1.3.0"
dep-analysis = "3.4.1"
dep-analysis = "3.5.1"
jsoup = "1.21.2"
commonmark = "0.17.0"

Expand Down
2 changes: 1 addition & 1 deletion packages/aws-sdk-signers/src/aws_sdk_signers/_io.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

from asyncio import iscoroutinefunction
from collections.abc import AsyncIterable, AsyncIterator, Awaitable, Callable
from inspect import iscoroutinefunction
from io import BytesIO
from typing import (
Self,
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-sdk-signers/src/aws_sdk_signers/signers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import hmac
import io
import warnings
from asyncio import iscoroutinefunction
from binascii import hexlify
from collections.abc import AsyncIterable, Iterable
from copy import deepcopy
from hashlib import sha256
from inspect import iscoroutinefunction
from typing import TYPE_CHECKING, Required, TypedDict, TypeGuard
from urllib.parse import parse_qsl, quote

Expand Down
8 changes: 8 additions & 0 deletions packages/smithy-aws-core/.changes/0.3.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"changes": [
{
"type": "dependency",
"description": "Bump `smithy-core` from `~=0.2.0` to `~=0.3.0`."
}
]
}
5 changes: 5 additions & 0 deletions packages/smithy-aws-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v0.3.0

### Dependencies
* Bump `smithy-core` from `~=0.2.0` to `~=0.3.0`.

## v0.2.0

### Dependencies
Expand Down
2 changes: 1 addition & 1 deletion packages/smithy-aws-core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ classifiers = [
"Topic :: Software Development :: Libraries"
]
dependencies = [
"smithy-core~=0.2.0",
"smithy-core~=0.3.0",
"smithy-http~=0.3.0",
"aws-sdk-signers~=0.1.0"
]
Expand Down
2 changes: 1 addition & 1 deletion packages/smithy-aws-core/src/smithy_aws_core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

__version__ = "0.2.0"
__version__ = "0.3.0"
8 changes: 8 additions & 0 deletions packages/smithy-aws-event-stream/.changes/0.2.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"changes": [
{
"type": "dependency",
"description": "Removed strict pinning on `smithy-core` in favor of client managed versions."
}
]
}
5 changes: 5 additions & 0 deletions packages/smithy-aws-event-stream/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v0.2.1

### Dependencies
* Removed strict pinning on `smithy-core` in favor of client managed versions.

## v0.2.0

### Dependencies
Expand Down
2 changes: 1 addition & 1 deletion packages/smithy-aws-event-stream/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ classifiers = [
"Topic :: Software Development :: Libraries"
]
dependencies = [
"smithy-core~=0.2.0",
"smithy-core",
]

[project.urls]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

__version__ = "0.2.0"
__version__ = "0.2.1"
12 changes: 12 additions & 0 deletions packages/smithy-core/.changes/0.3.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"changes": [
{
"type": "enhancement",
"description": "Improved default error message for instances of ClientTimeoutError."
},
{
"type": "breaking",
"description": "Refactored `resolve_retry_strategy` to avoid code duplication per operation."
}
]
}
8 changes: 8 additions & 0 deletions packages/smithy-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v0.3.0

### Breaking Changes
* Refactored `resolve_retry_strategy` to avoid code duplication per operation.

### Enhancements
* Improved default error message for instances of ClientTimeoutError.

## v0.2.0

### Features
Expand Down
2 changes: 1 addition & 1 deletion packages/smithy-core/src/smithy_core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from . import interfaces, rfc3986
from .exceptions import SmithyError

__version__ = "0.2.0"
__version__ = "0.3.0"


class HostType(Enum):
Expand Down
4 changes: 1 addition & 3 deletions packages/smithy-core/src/smithy_core/aio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,9 +469,7 @@ async def _handle_attempt[I: SerializeableShape, O: DeserializeableShape](
)
except Exception as e:
if isinstance(e, self.transport.TIMEOUT_EXCEPTIONS):
raise ClientTimeoutError(
message=f"Client timeout occurred: {e}"
) from e
raise ClientTimeoutError(message="A timeout error occurred.") from e
raise

_LOGGER.debug("Received response: %s", transport_response)
Expand Down
2 changes: 1 addition & 1 deletion packages/smithy-core/src/smithy_core/aio/types.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import asyncio
from asyncio import iscoroutinefunction
from collections import deque
from collections.abc import AsyncIterable, AsyncIterator, Awaitable, Callable
from inspect import iscoroutinefunction
from io import BytesIO
from typing import Any, Self, cast

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from asyncio import iscoroutinefunction
from collections.abc import ItemsView, Iterator, KeysView, ValuesView
from inspect import iscoroutinefunction
from typing import TYPE_CHECKING, Any, Protocol, TypeGuard, overload, runtime_checkable

if TYPE_CHECKING:
Expand Down
17 changes: 14 additions & 3 deletions packages/smithy-core/src/smithy_core/retries.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,24 @@ class RetryStrategyResolver:
"""

async def resolve_retry_strategy(
self, *, options: RetryStrategyOptions
self, *, retry_strategy: RetryStrategy | RetryStrategyOptions | None
) -> RetryStrategy:
"""Resolve a retry strategy from the provided options, using cache when possible.

:param options: The retry strategy options to use for creating the strategy.
:param retry_strategy: An explicitly configured retry strategy or options for creating one.
"""
return self._create_retry_strategy(options.retry_mode, options.max_attempts)
if isinstance(retry_strategy, RetryStrategy):
return retry_strategy
elif retry_strategy is None:
retry_strategy = RetryStrategyOptions()
elif not isinstance(retry_strategy, RetryStrategyOptions): # type: ignore[reportUnnecessaryIsInstance]
raise TypeError(
f"retry_strategy must be RetryStrategy, RetryStrategyOptions, or None, "
f"got {type(retry_strategy).__name__}"
)
return self._create_retry_strategy(
retry_strategy.retry_mode, retry_strategy.max_attempts
)

@lru_cache
def _create_retry_strategy(
Expand Down
2 changes: 2 additions & 0 deletions packages/smithy-core/tests/functional/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
Loading
Loading