From 06eca593543470f2fba15a5a8e746871104121d2 Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Tue, 25 Nov 2025 01:19:06 -0600 Subject: [PATCH 1/3] Replace deprecated asyncio.iscoroutinefunction with inspect.iscoroutinefunction --- packages/aws-sdk-signers/src/aws_sdk_signers/_io.py | 2 +- packages/aws-sdk-signers/src/aws_sdk_signers/signers.py | 2 +- packages/smithy-core/src/smithy_core/aio/types.py | 2 +- packages/smithy-core/src/smithy_core/interfaces/__init__.py | 2 +- packages/smithy-http/src/smithy_http/serializers.py | 2 +- packages/smithy-http/tests/unit/test_serializers.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/aws-sdk-signers/src/aws_sdk_signers/_io.py b/packages/aws-sdk-signers/src/aws_sdk_signers/_io.py index ba50f3c4d..9a88ea756 100644 --- a/packages/aws-sdk-signers/src/aws_sdk_signers/_io.py +++ b/packages/aws-sdk-signers/src/aws_sdk_signers/_io.py @@ -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, diff --git a/packages/aws-sdk-signers/src/aws_sdk_signers/signers.py b/packages/aws-sdk-signers/src/aws_sdk_signers/signers.py index 29ba02894..f74179be5 100644 --- a/packages/aws-sdk-signers/src/aws_sdk_signers/signers.py +++ b/packages/aws-sdk-signers/src/aws_sdk_signers/signers.py @@ -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 diff --git a/packages/smithy-core/src/smithy_core/aio/types.py b/packages/smithy-core/src/smithy_core/aio/types.py index d175e7e25..3b84317cd 100644 --- a/packages/smithy-core/src/smithy_core/aio/types.py +++ b/packages/smithy-core/src/smithy_core/aio/types.py @@ -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 diff --git a/packages/smithy-core/src/smithy_core/interfaces/__init__.py b/packages/smithy-core/src/smithy_core/interfaces/__init__.py index 39be88d23..558c4c15e 100644 --- a/packages/smithy-core/src/smithy_core/interfaces/__init__.py +++ b/packages/smithy-core/src/smithy_core/interfaces/__init__.py @@ -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: diff --git a/packages/smithy-http/src/smithy_http/serializers.py b/packages/smithy-http/src/smithy_http/serializers.py index acac7ac75..11a5f18ea 100644 --- a/packages/smithy-http/src/smithy_http/serializers.py +++ b/packages/smithy-http/src/smithy_http/serializers.py @@ -1,11 +1,11 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 -from asyncio import iscoroutinefunction from base64 import b64encode from collections.abc import Callable, Iterator, Sized from contextlib import contextmanager from datetime import datetime from decimal import Decimal +from inspect import iscoroutinefunction from io import BytesIO from typing import TYPE_CHECKING from urllib.parse import quote as urlquote diff --git a/packages/smithy-http/tests/unit/test_serializers.py b/packages/smithy-http/tests/unit/test_serializers.py index 83e291b21..7f52da070 100644 --- a/packages/smithy-http/tests/unit/test_serializers.py +++ b/packages/smithy-http/tests/unit/test_serializers.py @@ -1,10 +1,10 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 import datetime -from asyncio import iscoroutinefunction from dataclasses import dataclass, field from datetime import UTC from decimal import Decimal +from inspect import iscoroutinefunction from io import BytesIO from typing import Any, ClassVar, Protocol, Self From 75bfc3ee42a30d51fc069efa9d2031444fdf313a Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Tue, 25 Nov 2025 01:33:26 -0600 Subject: [PATCH 2/3] add changelog entries --- .../aws-sdk-signers-enhancement-20251125013131.json | 4 ++++ .../next-release/smithy-core-enhancement-20251125013247.json | 4 ++++ .../next-release/smithy-http-enhancement-20251125013302.json | 4 ++++ 3 files changed, 12 insertions(+) create mode 100644 packages/aws-sdk-signers/.changes/next-release/aws-sdk-signers-enhancement-20251125013131.json create mode 100644 packages/smithy-core/.changes/next-release/smithy-core-enhancement-20251125013247.json create mode 100644 packages/smithy-http/.changes/next-release/smithy-http-enhancement-20251125013302.json diff --git a/packages/aws-sdk-signers/.changes/next-release/aws-sdk-signers-enhancement-20251125013131.json b/packages/aws-sdk-signers/.changes/next-release/aws-sdk-signers-enhancement-20251125013131.json new file mode 100644 index 000000000..6a914dac2 --- /dev/null +++ b/packages/aws-sdk-signers/.changes/next-release/aws-sdk-signers-enhancement-20251125013131.json @@ -0,0 +1,4 @@ +{ + "type": "enhancement", + "description": "Replaced deprecated `asyncio.iscoroutinefunction` with `inspect.iscoroutinefunction` to address Python deprecation warnings." +} \ No newline at end of file diff --git a/packages/smithy-core/.changes/next-release/smithy-core-enhancement-20251125013247.json b/packages/smithy-core/.changes/next-release/smithy-core-enhancement-20251125013247.json new file mode 100644 index 000000000..6a914dac2 --- /dev/null +++ b/packages/smithy-core/.changes/next-release/smithy-core-enhancement-20251125013247.json @@ -0,0 +1,4 @@ +{ + "type": "enhancement", + "description": "Replaced deprecated `asyncio.iscoroutinefunction` with `inspect.iscoroutinefunction` to address Python deprecation warnings." +} \ No newline at end of file diff --git a/packages/smithy-http/.changes/next-release/smithy-http-enhancement-20251125013302.json b/packages/smithy-http/.changes/next-release/smithy-http-enhancement-20251125013302.json new file mode 100644 index 000000000..6a914dac2 --- /dev/null +++ b/packages/smithy-http/.changes/next-release/smithy-http-enhancement-20251125013302.json @@ -0,0 +1,4 @@ +{ + "type": "enhancement", + "description": "Replaced deprecated `asyncio.iscoroutinefunction` with `inspect.iscoroutinefunction` to address Python deprecation warnings." +} \ No newline at end of file From 412d3859ef6210f860558025bb1233dfc97415a0 Mon Sep 17 00:00:00 2001 From: jonathan343 Date: Tue, 25 Nov 2025 11:24:08 -0600 Subject: [PATCH 3/3] Revert "add changelog entries" This reverts commit 75bfc3ee42a30d51fc069efa9d2031444fdf313a. --- .../aws-sdk-signers-enhancement-20251125013131.json | 4 ---- .../next-release/smithy-core-enhancement-20251125013247.json | 4 ---- .../next-release/smithy-http-enhancement-20251125013302.json | 4 ---- 3 files changed, 12 deletions(-) delete mode 100644 packages/aws-sdk-signers/.changes/next-release/aws-sdk-signers-enhancement-20251125013131.json delete mode 100644 packages/smithy-core/.changes/next-release/smithy-core-enhancement-20251125013247.json delete mode 100644 packages/smithy-http/.changes/next-release/smithy-http-enhancement-20251125013302.json diff --git a/packages/aws-sdk-signers/.changes/next-release/aws-sdk-signers-enhancement-20251125013131.json b/packages/aws-sdk-signers/.changes/next-release/aws-sdk-signers-enhancement-20251125013131.json deleted file mode 100644 index 6a914dac2..000000000 --- a/packages/aws-sdk-signers/.changes/next-release/aws-sdk-signers-enhancement-20251125013131.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "enhancement", - "description": "Replaced deprecated `asyncio.iscoroutinefunction` with `inspect.iscoroutinefunction` to address Python deprecation warnings." -} \ No newline at end of file diff --git a/packages/smithy-core/.changes/next-release/smithy-core-enhancement-20251125013247.json b/packages/smithy-core/.changes/next-release/smithy-core-enhancement-20251125013247.json deleted file mode 100644 index 6a914dac2..000000000 --- a/packages/smithy-core/.changes/next-release/smithy-core-enhancement-20251125013247.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "enhancement", - "description": "Replaced deprecated `asyncio.iscoroutinefunction` with `inspect.iscoroutinefunction` to address Python deprecation warnings." -} \ No newline at end of file diff --git a/packages/smithy-http/.changes/next-release/smithy-http-enhancement-20251125013302.json b/packages/smithy-http/.changes/next-release/smithy-http-enhancement-20251125013302.json deleted file mode 100644 index 6a914dac2..000000000 --- a/packages/smithy-http/.changes/next-release/smithy-http-enhancement-20251125013302.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "type": "enhancement", - "description": "Replaced deprecated `asyncio.iscoroutinefunction` with `inspect.iscoroutinefunction` to address Python deprecation warnings." -} \ No newline at end of file