From 46b0d7d5215297e90a0ccaa022816a6d5be5adeb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 11:27:09 +0000 Subject: [PATCH 1/2] chore(deps-dev): bump ty from 0.0.23 to 0.0.26 Bumps [ty](https://github.com/astral-sh/ty) from 0.0.23 to 0.0.26. - [Release notes](https://github.com/astral-sh/ty/releases) - [Changelog](https://github.com/astral-sh/ty/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ty/compare/0.0.23...0.0.26) --- updated-dependencies: - dependency-name: ty dependency-version: 0.0.26 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 38 +++++++++++++++++++------------------- pyproject.toml | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/poetry.lock b/poetry.lock index 380abb3d5ee..e074b55374a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -4620,29 +4620,29 @@ files = [ [[package]] name = "ty" -version = "0.0.23" +version = "0.0.27" description = "An extremely fast Python type checker, written in Rust." optional = false python-versions = ">=3.8" groups = ["dev"] files = [ - {file = "ty-0.0.23-py3-none-linux_armv6l.whl", hash = "sha256:e810eef1a5f1cfc0731a58af8d2f334906a96835829767aed00026f1334a8dd7"}, - {file = "ty-0.0.23-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e43d36bd89a151ddcad01acaeff7dcc507cb73ff164c1878d2d11549d39a061c"}, - {file = "ty-0.0.23-py3-none-macosx_11_0_arm64.whl", hash = "sha256:bd6a340969577b4645f231572c4e46012acba2d10d4c0c6570fe1ab74e76ae00"}, - {file = "ty-0.0.23-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:341441783e626eeb7b1ec2160432956aed5734932ab2d1c26f94d0c98b229937"}, - {file = "ty-0.0.23-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:8ce1dc66c26d4167e2c78d12fa870ef5a7ec9cc344d2baaa6243297cfa88bd52"}, - {file = "ty-0.0.23-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bae1e7a294bf8528836f7617dc5c360ea2dddb63789fc9471ae6753534adca05"}, - {file = "ty-0.0.23-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d2b162768764d9dc177c83fb497a51532bb67cbebe57b8fa0f2668436bf53f3c"}, - {file = "ty-0.0.23-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d28384e48ca03b34e4e2beee0e230c39bbfb68994bb44927fec61ef3642900da"}, - {file = "ty-0.0.23-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:559d9a299df793cb7a7902caed5eda8a720ff69164c31c979673e928f02251ee"}, - {file = "ty-0.0.23-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:32a7b8a14a98e1d20a9d8d2af23637ed7efdb297ac1fa2450b8e465d05b94482"}, - {file = "ty-0.0.23-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:6f803b9b9cca87af793467973b9abdd4b83e6b96d9b5e749d662cff7ead70b6d"}, - {file = "ty-0.0.23-py3-none-musllinux_1_2_i686.whl", hash = "sha256:4a0bf086ec8e2197b7ea7ebfcf4be36cb6a52b235f8be61647ef1b2d99d6ffd3"}, - {file = "ty-0.0.23-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:252539c3fcd7aeb9b8d5c14e2040682c3e1d7ff640906d63fd2c4ce35865a4ba"}, - {file = "ty-0.0.23-py3-none-win32.whl", hash = "sha256:51b591d19eef23bbc3807aef77d38fa1f003c354e1da908aa80ea2dca0993f77"}, - {file = "ty-0.0.23-py3-none-win_amd64.whl", hash = "sha256:1e137e955f05c501cfbb81dd2190c8fb7d01ec037c7e287024129c722a83c9ad"}, - {file = "ty-0.0.23-py3-none-win_arm64.whl", hash = "sha256:a0399bd13fd2cd6683fd0a2d59b9355155d46546d8203e152c556ddbdeb20842"}, - {file = "ty-0.0.23.tar.gz", hash = "sha256:5fb05db58f202af366f80ef70f806e48f5237807fe424ec787c9f289e3f3a4ef"}, + {file = "ty-0.0.27-py3-none-linux_armv6l.whl", hash = "sha256:eb14456b8611c9e8287aa9b633f4d2a0d9f3082a31796969e0b50bdda8930281"}, + {file = "ty-0.0.27-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:02e662184703db7586118df611cf24a000d35dae38d950053d1dd7b6736fd2c4"}, + {file = "ty-0.0.27-py3-none-macosx_11_0_arm64.whl", hash = "sha256:be5fc2899441f7f8f7ef40f9ffd006075a5ff6b06c44e8d2aa30e1b900c12f51"}, + {file = "ty-0.0.27-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30231e652b14742a76b64755e54bf0cb1cd4c128bcaf625222e0ca92a2094887"}, + {file = "ty-0.0.27-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5a119b1168f64261b3205a37e40b5b6c4aac8fd58e4587988f4e4b22c3c79847"}, + {file = "ty-0.0.27-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e38f4e187b6975d2cbebf0f1eb1221f8f64f6e509bad14d7bb2a91afc97e4956"}, + {file = "ty-0.0.27-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a07b1a8fbb23844f6d22091275430d9ac617175f34aa99159b268193de210389"}, + {file = "ty-0.0.27-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d3ec4033031f240836bb0337274bac5c49dde312c7c6d7575451ed719bf8ffa3"}, + {file = "ty-0.0.27-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:924a8849afd500d260bf5b7296165a05b7424fbb6b19113f30f3b999d682873f"}, + {file = "ty-0.0.27-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:d8270026c07e7423a1b3a3fd065b46ed1478748f0662518b523b57744f3fa025"}, + {file = "ty-0.0.27-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:e26e9735d3bdfd95d881111ad1cf570eab8188d8c3be36d6bcaad044d38984d8"}, + {file = "ty-0.0.27-py3-none-musllinux_1_2_i686.whl", hash = "sha256:7c09cc9a699810609acc0090af8d0db68adaee6e60a7c3e05ab80cc954a83db7"}, + {file = "ty-0.0.27-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:2d3e02853bb037221a456e034b1898aaa573e6374fbb53884e33cb7513ccb85a"}, + {file = "ty-0.0.27-py3-none-win32.whl", hash = "sha256:34e7377f2047c14dbbb7bf5322e84114db7a5f2cb470db6bee63f8f3550cfc1e"}, + {file = "ty-0.0.27-py3-none-win_amd64.whl", hash = "sha256:3f7e4145aad8b815ed69b324c93b5b773eb864dda366ca16ab8693ff88ce6f36"}, + {file = "ty-0.0.27-py3-none-win_arm64.whl", hash = "sha256:95bf8d01eb96bb2ba3ffc39faff19da595176448e80871a7b362f4d2de58476c"}, + {file = "ty-0.0.27.tar.gz", hash = "sha256:d7a8de3421d92420b40c94fe7e7d4816037560621903964dd035cf9bd0204a73"}, ] [[package]] @@ -5180,4 +5180,4 @@ valkey = ["valkey-glide"] [metadata] lock-version = "2.1" python-versions = ">=3.10,<4.0.0" -content-hash = "9940232941feeeaf77d11a9021a396418da512e2f825123285bee5b7511bec06" +content-hash = "8ea7e1c9ec1c0ca0d1db0911890d085c1ce4e0d9128d710b3317299600f62154" diff --git a/pyproject.toml b/pyproject.toml index c0ff9174f37..9f23f734dd1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -129,7 +129,7 @@ mkdocs-llmstxt = ">=0.2,<0.5" avro = "^1.12.0" protobuf = ">=6.30.2,<8.0.0" types-protobuf = "^6.30.2.20250516" -ty = "^0.0.23" +ty = ">=0.0.23,<0.0.28" [tool.coverage.run] source = ["aws_lambda_powertools"] From e1890aa9dc7ee4f5c99b97ed70da625fab4112b4 Mon Sep 17 00:00:00 2001 From: Leandro Damascena Date: Thu, 2 Apr 2026 12:51:01 +0100 Subject: [PATCH 2/2] Fix actions braking changes --- .../utilities/data_classes/api_gateway_authorizer_event.py | 6 +++--- aws_lambda_powertools/utilities/data_classes/common.py | 2 +- .../utilities/feature_flags/feature_flags.py | 2 +- .../utilities/kafka/deserializer/protobuf.py | 4 +++- aws_lambda_powertools/utilities/metadata/lambda_metadata.py | 1 + aws_lambda_powertools/utilities/parameters/dynamodb.py | 4 ++-- aws_lambda_powertools/utilities/parameters/secrets.py | 4 ++-- aws_lambda_powertools/utilities/parameters/ssm.py | 4 ++-- 8 files changed, 15 insertions(+), 12 deletions(-) diff --git a/aws_lambda_powertools/utilities/data_classes/api_gateway_authorizer_event.py b/aws_lambda_powertools/utilities/data_classes/api_gateway_authorizer_event.py index f1b9c4f5103..c73eb33b9fe 100644 --- a/aws_lambda_powertools/utilities/data_classes/api_gateway_authorizer_event.py +++ b/aws_lambda_powertools/utilities/data_classes/api_gateway_authorizer_event.py @@ -668,7 +668,7 @@ def from_route_arn( # Note: we need ignore[override] because we are removing the http_method field @override - def _add_route(self, effect: str, resource: str, conditions: list[dict] | None = None): # type: ignore[override] + def _add_route(self, effect: str, resource: str, conditions: list[dict] | None = None): # type: ignore[override] # ty: ignore[invalid-method-override] """Adds a route to the internal lists of allowed or denied routes. Each object in the internal list contains a resource ARN and a condition statement. The condition statement can be null.""" @@ -703,7 +703,7 @@ def deny_all_routes(self, http_method: str = HttpVerb.ALL.value): # type: ignor # Note: we need ignore[override] because we are removing the http_method field @override - def allow_route(self, resource: str, conditions: list[dict] | None = None): # type: ignore[override] + def allow_route(self, resource: str, conditions: list[dict] | None = None): # type: ignore[override] # ty: ignore[invalid-method-override] """ Add an API Gateway Websocket method to the list of allowed methods for the policy. @@ -732,7 +732,7 @@ def allow_route(self, resource: str, conditions: list[dict] | None = None): # t # Note: we need ignore[override] because we are removing the http_method field @override - def deny_route(self, resource: str, conditions: list[dict] | None = None): # type: ignore[override] + def deny_route(self, resource: str, conditions: list[dict] | None = None): # type: ignore[override] # ty: ignore[invalid-method-override] """ Add an API Gateway Websocket method to the list of allowed methods for the policy. diff --git a/aws_lambda_powertools/utilities/data_classes/common.py b/aws_lambda_powertools/utilities/data_classes/common.py index 08fd60f0679..a85d7b2d2a8 100644 --- a/aws_lambda_powertools/utilities/data_classes/common.py +++ b/aws_lambda_powertools/utilities/data_classes/common.py @@ -125,7 +125,7 @@ def _str_helper(self) -> dict[str, Any]: properties = self._properties() sensitive_properties = ["raw_event"] if hasattr(self, "_sensitive_properties"): - sensitive_properties.extend(self._sensitive_properties) # pyright: ignore # type: ignore[arg-type] + sensitive_properties.extend(self._sensitive_properties) # pyright: ignore # type: ignore[arg-type] # ty: ignore[invalid-argument-type] result: dict[str, Any] = {} for property_key in properties: diff --git a/aws_lambda_powertools/utilities/feature_flags/feature_flags.py b/aws_lambda_powertools/utilities/feature_flags/feature_flags.py index 1dfe89a40f7..19e96a8641d 100644 --- a/aws_lambda_powertools/utilities/feature_flags/feature_flags.py +++ b/aws_lambda_powertools/utilities/feature_flags/feature_flags.py @@ -432,5 +432,5 @@ def _lookup_exception_handler(self, exc: BaseException) -> Callable | None: # of an exception for cls in type(exc).__mro__: if cls in self._exception_handlers: - return self._exception_handlers[cls] # type: ignore[index] # index is correct + return self._exception_handlers[cls] # type: ignore[index] # ty: ignore[invalid-argument-type] return None diff --git a/aws_lambda_powertools/utilities/kafka/deserializer/protobuf.py b/aws_lambda_powertools/utilities/kafka/deserializer/protobuf.py index 16bb3bbc6ec..683b8432023 100644 --- a/aws_lambda_powertools/utilities/kafka/deserializer/protobuf.py +++ b/aws_lambda_powertools/utilities/kafka/deserializer/protobuf.py @@ -3,7 +3,9 @@ import logging from typing import Any -from google.protobuf.internal.decoder import _DecodeSignedVarint # type: ignore[attr-defined] +from google.protobuf.internal.decoder import ( # type: ignore[attr-defined] + _DecodeSignedVarint, # ty: ignore[unresolved-import] +) from google.protobuf.json_format import MessageToDict from aws_lambda_powertools.utilities.kafka.deserializer.base import DeserializerBase diff --git a/aws_lambda_powertools/utilities/metadata/lambda_metadata.py b/aws_lambda_powertools/utilities/metadata/lambda_metadata.py index 71bbece3aac..ee9e06dd8c3 100644 --- a/aws_lambda_powertools/utilities/metadata/lambda_metadata.py +++ b/aws_lambda_powertools/utilities/metadata/lambda_metadata.py @@ -9,6 +9,7 @@ import logging import os +import urllib.error import urllib.request from dataclasses import dataclass, field from json import JSONDecodeError diff --git a/aws_lambda_powertools/utilities/parameters/dynamodb.py b/aws_lambda_powertools/utilities/parameters/dynamodb.py index d80fd1b985a..9fe95518b8e 100644 --- a/aws_lambda_powertools/utilities/parameters/dynamodb.py +++ b/aws_lambda_powertools/utilities/parameters/dynamodb.py @@ -202,7 +202,7 @@ def _get(self, name: str, **sdk_options) -> str: # maintenance: look for better ways to correctly type DynamoDB multiple return types # without a breaking change within ABC return type - return self.table.get_item(**sdk_options)["Item"][self.value_attr] # type: ignore[return-value] + return self.table.get_item(**sdk_options)["Item"][self.value_attr] # type: ignore[return-value] # ty: ignore[invalid-return-type] def _get_multiple(self, path: str, **sdk_options) -> dict[str, str]: """ @@ -230,4 +230,4 @@ def _get_multiple(self, path: str, **sdk_options) -> dict[str, str]: # maintenance: look for better ways to correctly type DynamoDB multiple return types # without a breaking change within ABC return type - return {item[self.sort_attr]: item[self.value_attr] for item in items} # type: ignore[misc] + return {item[self.sort_attr]: item[self.value_attr] for item in items} # type: ignore[misc] # ty: ignore[invalid-return-type] diff --git a/aws_lambda_powertools/utilities/parameters/secrets.py b/aws_lambda_powertools/utilities/parameters/secrets.py index 0f80f003920..eff4e745738 100644 --- a/aws_lambda_powertools/utilities/parameters/secrets.py +++ b/aws_lambda_powertools/utilities/parameters/secrets.py @@ -130,7 +130,7 @@ def _get(self, name: str, **sdk_options) -> str | bytes: return secret_value["SecretBinary"] - def _get_multiple(self, names: list[str], **sdk_options) -> dict[str, Any]: # type: ignore[override] + def _get_multiple(self, names: list[str], **sdk_options) -> dict[str, Any]: # type: ignore[override] # ty: ignore[invalid-method-override] """ Retrieve multiple secrets using AWS Secrets Manager batch_get_secret_value API @@ -200,7 +200,7 @@ def _get_multiple(self, names: list[str], **sdk_options) -> dict[str, Any]: # t return secrets - def get_multiple( # type: ignore[override] + def get_multiple( # type: ignore[override] # ty: ignore[invalid-method-override] self, names: list[str], max_age: int | None = None, diff --git a/aws_lambda_powertools/utilities/parameters/ssm.py b/aws_lambda_powertools/utilities/parameters/ssm.py index b4e0de011c4..fde8d980494 100644 --- a/aws_lambda_powertools/utilities/parameters/ssm.py +++ b/aws_lambda_powertools/utilities/parameters/ssm.py @@ -133,7 +133,7 @@ def __init__( super().__init__(client=self.client) - def get_multiple( # type: ignore[override] + def get_multiple( # type: ignore[override] # ty: ignore[invalid-method-override] self, path: str, max_age: int | None = None, @@ -192,7 +192,7 @@ def get_multiple( # type: ignore[override] # We break Liskov substitution principle due to differences in signatures of this method and superclass get method # We ignore mypy error, as changes to the signature here or in a superclass is a breaking change to users - def get( # type: ignore[override] + def get( # type: ignore[override] # ty: ignore[invalid-method-override] self, name: str, max_age: int | None = None,