diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f4322b03..44e3381b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,8 @@ jobs: - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - name: Set up JDK 17 uses: actions/setup-java@v4 diff --git a/.python-version b/.python-version deleted file mode 100644 index e4fba2183..000000000 --- a/.python-version +++ /dev/null @@ -1 +0,0 @@ -3.12 diff --git a/packages/smithy-aws-event-stream/src/smithy_aws_event_stream/_private/serializers.py b/packages/smithy-aws-event-stream/src/smithy_aws_event_stream/_private/serializers.py index a96d38b5c..63e2b0ac1 100644 --- a/packages/smithy-aws-event-stream/src/smithy_aws_event_stream/_private/serializers.py +++ b/packages/smithy-aws-event-stream/src/smithy_aws_event_stream/_private/serializers.py @@ -59,10 +59,8 @@ def begin_struct(self, schema: "Schema") -> Iterator[ShapeSerializer]: # Note that if we're serializing an operation input or output, it won't be a # union at all, so this won't get triggered. Thankfully, that's what we want. if schema.shape_type is ShapeType.UNION: - try: - yield self - finally: - return + yield self + return headers: dict[str, HEADER_VALUE] = {} diff --git a/packages/smithy-core/src/smithy_core/aio/client.py b/packages/smithy-core/src/smithy_core/aio/client.py index bf27c440c..49e6eab51 100644 --- a/packages/smithy-core/src/smithy_core/aio/client.py +++ b/packages/smithy-core/src/smithy_core/aio/client.py @@ -310,7 +310,7 @@ async def _handle_execution[I: SerializeableShape, O: DeserializeableShape]( transport_request=interceptor.modify_before_retry_loop(request_context), ) - return await self._retry(call, request_context, request_future) + return await self._retry(call, request_context, request_future) # type: ignore[return-value] except Exception as e: return OutputContext( request=request_context.request, @@ -325,7 +325,7 @@ async def _retry[I: SerializeableShape, O: DeserializeableShape]( call: ClientCall[I, O], request_context: RequestContext[I, TRequest], request_future: Future[RequestContext[I, TRequest]] | None, - ) -> OutputContext[I, O, TRequest | None, TResponse | None]: + ) -> OutputContext[I, O, TRequest, TResponse | None]: if not call.retryable(): return await self._handle_attempt(call, request_context, request_future)