Skip to content

Commit 6718031

Browse files
authored
Merge pull request #623 from smithy-lang/develop
Sync main with latest releases
2 parents fed1e58 + 95e6040 commit 6718031

File tree

41 files changed

+425
-116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+425
-116
lines changed

.github/workflows/check-license.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@ name: License Header Check
22

33
on:
44
pull_request:
5-
branches:
6-
- develop
75
push:
86
branches:
97
- develop
108

9+
permissions:
10+
contents: read
11+
1112
jobs:
1213
check-license-header:
1314
name: Check License Header
1415
runs-on: ubuntu-latest
1516
steps:
16-
- uses: actions/checkout@v5
17+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
1718

18-
- uses: apache/skywalking-eyes/header@main
19+
- uses: apache/skywalking-eyes/header@55373684d1b70e5f8fd9fc8ec114a89ad11a56a3
1920
with:
2021
mode: check

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: CI
22

33
on:
4+
pull_request:
45
push:
56
branches:
67
- develop
78
- main
89

9-
pull_request:
10-
branches:
11-
- develop
10+
permissions:
11+
contents: read
1212

1313
jobs:
1414
ci:
@@ -20,19 +20,19 @@ jobs:
2020

2121
steps:
2222
- name: Checkout Repository
23-
uses: actions/checkout@v5
23+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
2424

2525
- name: Set up JDK 17
26-
uses: actions/setup-java@v5
26+
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e
2727
with:
2828
java-version: 17
2929
distribution: 'corretto'
3030

3131
- name: Setup Gradle
32-
uses: gradle/actions/setup-gradle@v5
32+
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2
3333

3434
- name: Install uv and set the Python version
35-
uses: astral-sh/setup-uv@v7
35+
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867
3636
with:
3737
python-version: ${{ matrix.python-version }}
3838
activate-environment: true

.github/workflows/update-gradle-wrapper.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,21 @@ on:
77
# Run at midnight (UTC) every wednesday
88
- cron: "0 0 * * 3"
99

10+
permissions:
11+
contents: read
12+
1013
jobs:
1114
update-gradle-wrapper:
1215
runs-on: ubuntu-latest
1316

17+
permissions:
18+
# allow job to open a pull request with changes
19+
pull-requests: write
20+
1421
steps:
15-
- uses: actions/checkout@v5
22+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8
1623

1724
- name: Update Gradle Wrapper
18-
uses: gradle-update/update-gradle-wrapper-action@v2
25+
uses: gradle-update/update-gradle-wrapper-action@512b1875f3b6270828abfe77b247d5895a2da1e5
1926
with:
2027
paths: codegen/**

codegen/aws/core/src/main/java/software/amazon/smithy/python/aws/codegen/AwsPythonDependency.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ private AwsPythonDependency() {}
2222
*/
2323
public static final PythonDependency SMITHY_AWS_CORE = new PythonDependency(
2424
"smithy_aws_core",
25-
"~=0.2.0",
25+
"~=0.3.0",
2626
PythonDependency.Type.DEPENDENCY,
2727
false);
2828
}

codegen/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515

1616
allprojects {
1717
group = "software.amazon.smithy.python"
18-
version = "0.1.0"
18+
version = "0.2.0"
1919
}

codegen/core/src/main/java/software/amazon/smithy/python/codegen/ClientGenerator.java

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -207,22 +207,9 @@ private void writeSharedOperationInit(PythonWriter writer, OperationShape operat
207207
if config.protocol is None or config.transport is None:
208208
raise ExpectationNotMetError("protocol and transport MUST be set on the config to make calls.")
209209
210-
# Resolve retry strategy from config
211-
if isinstance(config.retry_strategy, RetryStrategy):
212-
retry_strategy = config.retry_strategy
213-
elif isinstance(config.retry_strategy, RetryStrategyOptions):
214-
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
215-
options=config.retry_strategy
216-
)
217-
elif config.retry_strategy is None:
218-
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
219-
options=RetryStrategyOptions()
220-
)
221-
else:
222-
raise TypeError(
223-
f"retry_strategy must be RetryStrategy, RetryStrategyOptions, or None, "
224-
f"got {type(config.retry_strategy).__name__}"
225-
)
210+
retry_strategy = await self._retry_strategy_resolver.resolve_retry_strategy(
211+
retry_strategy=config.retry_strategy
212+
)
226213
227214
pipeline = RequestPipeline(
228215
protocol=config.protocol,

codegen/core/src/main/java/software/amazon/smithy/python/codegen/SmithyPythonDependency.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public final class SmithyPythonDependency {
2222
*/
2323
public static final PythonDependency SMITHY_CORE = new PythonDependency(
2424
"smithy_core",
25-
"~=0.2.0",
25+
"~=0.3.0",
2626
Type.DEPENDENCY,
2727
false);
2828

@@ -78,7 +78,7 @@ public final class SmithyPythonDependency {
7878
*/
7979
public static final PythonDependency SMITHY_AWS_CORE = new PythonDependency(
8080
"smithy_aws_core",
81-
"~=0.2.0",
81+
"~=0.3.0",
8282
Type.DEPENDENCY,
8383
false);
8484

@@ -87,7 +87,7 @@ public final class SmithyPythonDependency {
8787
*/
8888
public static final PythonDependency PYTEST = new PythonDependency(
8989
"pytest",
90-
">=7.2.0,<8.0.0",
90+
">=9.0.1,<10.0.0",
9191
Type.TEST_DEPENDENCY,
9292
false);
9393

@@ -96,7 +96,7 @@ public final class SmithyPythonDependency {
9696
*/
9797
public static final PythonDependency PYTEST_ASYNCIO = new PythonDependency(
9898
"pytest-asyncio",
99-
">=0.20.3,<0.21.0",
99+
">=1.3.0,<1.4.0",
100100
Type.TEST_DEPENDENCY,
101101
false);
102102

codegen/gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[versions]
22
junit5 = "6.0.1"
3-
smithy = "1.64.0"
3+
smithy = "1.65.0"
44
test-logger-plugin = "4.0.0"
55
spotbugs = "6.0.22"
66
spotless = "8.1.0"
77
smithy-gradle-plugins = "1.3.0"
8-
dep-analysis = "3.4.1"
8+
dep-analysis = "3.5.1"
99
jsoup = "1.21.2"
1010
commonmark = "0.17.0"
1111

packages/aws-sdk-signers/src/aws_sdk_signers/_io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
22
# SPDX-License-Identifier: Apache-2.0
33

4-
from asyncio import iscoroutinefunction
54
from collections.abc import AsyncIterable, AsyncIterator, Awaitable, Callable
5+
from inspect import iscoroutinefunction
66
from io import BytesIO
77
from typing import (
88
Self,

packages/aws-sdk-signers/src/aws_sdk_signers/signers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import hmac
77
import io
88
import warnings
9-
from asyncio import iscoroutinefunction
109
from binascii import hexlify
1110
from collections.abc import AsyncIterable, Iterable
1211
from copy import deepcopy
1312
from hashlib import sha256
13+
from inspect import iscoroutinefunction
1414
from typing import TYPE_CHECKING, Required, TypedDict, TypeGuard
1515
from urllib.parse import parse_qsl, quote
1616

0 commit comments

Comments
 (0)