Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.13"]
python-version: ["3.11","3.12","3.13","3.14"]

steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ name = "aws-durable-execution-sdk-python"
dynamic = ["version"]
description = 'This the Python SDK for AWS Lambda Durable Functions.'
readme = "README.md"
requires-python = ">=3.13"
requires-python = ">=3.11"
license = "Apache-2.0"
keywords = []
authors = [{ name = "yaythomas", email = "tgaigher@amazon.com" }]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
Expand Down
8 changes: 4 additions & 4 deletions src/aws_durable_execution_sdk_python/lambda_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@

from aws_durable_execution_sdk_python.identifier import OperationIdentifier

ReplayChildren: TypeAlias = bool # noqa UP040 ignore due to python3.11 minimum version
OperationPayload: TypeAlias = str # noqa UP040 ignore due to python3.11 minimum version
TimeoutSeconds: TypeAlias = int # noqa UP040 ignore due to python3.11 minimum version

# Replace with `type` it when dropping support to Python 3.11
ReplayChildren: TypeAlias = bool
OperationPayload: TypeAlias = str
TimeoutSeconds: TypeAlias = int

logger = logging.getLogger(__name__)

Expand Down
10 changes: 7 additions & 3 deletions src/aws_durable_execution_sdk_python/serdes.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,14 @@ def deserialize(self, data: str, context: SerDesContext | None = None) -> Any:
if not (isinstance(obj, dict) and TYPE_TOKEN in obj and VALUE_TOKEN in obj):
msg = 'Malformed envelope: missing "t" or "v" at root.'
raise SerDesError(msg)
if obj[TYPE_TOKEN] not in TypeTag:
# Python 3.11 compatibility: Using try-except instead of 'in' operator
# because checking 'str in EnumType' raises TypeError in Python 3.11
try:
tag = TypeTag(obj[TYPE_TOKEN])
except ValueError:
msg = f'Unknown type tag: "{obj[TYPE_TOKEN]}"'
raise SerDesError(msg)
tag = TypeTag(obj[TYPE_TOKEN])
raise SerDesError(msg) from None

return self._codec.decode(tag, obj[VALUE_TOKEN])

def _to_json_serializable(self, obj: Any) -> Any:
Expand Down