Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d59e2cc
chore(deps-dev): bump the dev-dependencies group with 3 updates
dependabot[bot] May 18, 2026
746895a
chore(deps-dev): bump cdklabs-generative-ai-cdk-constructs
dependabot[bot] May 18, 2026
3b5a648
chore(deps-dev): bump types-protobuf
dependabot[bot] May 18, 2026
79344a4
chore(deps): bump pydantic-settings from 2.14.0 to 2.14.1
dependabot[bot] May 18, 2026
b5acc57
chore(deps-dev): bump types-requests
dependabot[bot] May 18, 2026
ed893d5
chore(deps-dev): bump aws-cdk in the aws-cdk group
dependabot[bot] May 19, 2026
c215eb0
chore(deps): bump codecov/codecov-action in the github-actions group
dependabot[bot] May 19, 2026
0ed826b
chore(deps): bump idna from 3.10 to 3.15 in /docs
dependabot[bot] May 19, 2026
86a0d83
chore(deps): bump pymdown-extensions from 10.16.1 to 10.21.3 in /docs
dependabot[bot] May 19, 2026
16b35a9
chore(deps-dev): bump pymdown-extensions from 10.16.1 to 10.21.3
dependabot[bot] May 19, 2026
f8418a4
chore(deps): bump idna from 3.10 to 3.15
dependabot[bot] May 19, 2026
5f30773
Merge remote-tracking branch 'origin/dependabot/pip/develop/cdklabs-g…
leandrodamascena May 21, 2026
8e09171
Merge remote-tracking branch 'origin/dependabot/pip/develop/types-pro…
leandrodamascena May 21, 2026
f77f085
Merge remote-tracking branch 'origin/dependabot/pip/develop/pydantic-…
leandrodamascena May 21, 2026
3ca9f85
Merge remote-tracking branch 'origin/dependabot/pip/develop/types-req…
leandrodamascena May 21, 2026
2e70898
Merge remote-tracking branch 'origin/dependabot/npm_and_yarn/develop/…
leandrodamascena May 21, 2026
6490680
Merge remote-tracking branch 'origin/dependabot/github_actions/github…
leandrodamascena May 21, 2026
8a72f2c
Merge remote-tracking branch 'origin/dependabot/pip/docs/idna-3.15' i…
leandrodamascena May 21, 2026
a70cbd2
Merge remote-tracking branch 'origin/dependabot/pip/docs/pymdown-exte…
leandrodamascena May 21, 2026
bff2096
Merge remote-tracking branch 'origin/dependabot/pip/pymdown-extension…
leandrodamascena May 21, 2026
8d76b2a
Merge remote-tracking branch 'origin/dependabot/pip/idna-3.15' into c…
leandrodamascena May 21, 2026
7d41c93
chore: fix ruff lint errors after dependency updates
leandrodamascena May 21, 2026
55c08eb
chore: fix mypy errors from stricter type checking in new version
leandrodamascena May 21, 2026
6e2961a
empty
leandrodamascena May 21, 2026
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/quality_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Complexity baseline
run: make complexity-baseline
- name: Upload coverage to Codecov
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # 6.0.0
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # 6.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from collections.abc import Callable

PRESERVE_CHARS = set("-_. ")
_regex_cache = {}
_regex_cache: dict[str, re.Pattern[str]] = {}

JSON_DUMPS_CALL = functools.partial(json.dumps, ensure_ascii=False)

Expand Down
25 changes: 14 additions & 11 deletions aws_lambda_powertools/utilities/idempotency/persistence/redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import logging
from contextlib import contextmanager
from datetime import timedelta
from typing import Any, Literal, Protocol
from typing import Any, Literal, Protocol, cast

import redis
from typing_extensions import TypeAlias, deprecated
Expand Down Expand Up @@ -76,7 +76,7 @@ def set( # noqa
) -> bool | None:
raise NotImplementedError

def delete(self, keys: bytes | str | memoryview) -> Any:
def delete(self, *names: bytes | str | memoryview) -> Any:
raise NotImplementedError


Expand Down Expand Up @@ -185,22 +185,25 @@ def _init_client(self) -> RedisClientProtocol:
try:
if self.url:
logger.debug(f"Using URL format to connect to Cache: {self.host}")
return client.from_url(url=self.url)
return cast(RedisClientProtocol, client.from_url(url=self.url))
else:
# Cache in cluster mode doesn't support db parameter
extra_param_connection: dict[str, Any] = {}
if self.mode != "cluster":
extra_param_connection = {"db": self.db_index}

logger.debug(f"Using arguments to connect to Cache: {self.host}")
return client(
host=self.host,
port=self.port,
username=self.username,
password=self.password,
decode_responses=True,
ssl=self.ssl,
**extra_param_connection,
return cast(
RedisClientProtocol,
client(
host=self.host,
port=self.port,
username=self.username,
password=self.password,
decode_responses=True,
ssl=self.ssl,
**extra_param_connection,
),
)
except redis.exceptions.ConnectionError as exc:
logger.debug(f"Cannot connect to Cache endpoint: {self.host}")
Expand Down
7 changes: 3 additions & 4 deletions benchmark/src/instrumented/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from aws_lambda_powertools import (Logger, Metrics, Tracer)

from aws_lambda_powertools import Logger, Metrics, Tracer

# Initialize core utilities
logger = Logger()
Expand All @@ -13,5 +12,5 @@
@tracer.capture_lambda_handler
def handler(event, context):
return {
"message": "success"
}
"message": "success",
}
4 changes: 2 additions & 2 deletions benchmark/src/reference/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def handler(event, context):
return {
"message": "success"
}
"message": "success",
}
12 changes: 6 additions & 6 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ griffe==1.13.0 \
--hash=sha256:246ea436a5e78f7fbf5f24ca8a727bb4d2a4b442a2959052eea3d0bfe9a076e0 \
--hash=sha256:470fde5b735625ac0a36296cd194617f039e9e83e301fcbd493e2b58382d0559
# via mkdocstrings-python
idna==3.10 \
--hash=sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9 \
--hash=sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3
idna==3.15 \
--hash=sha256:048adeaf8c2d788c40fee287673ccaa74c24ffd8dcf09ffa555a2fbb59f10ac8 \
--hash=sha256:ca962446ea538f7092a95e057da437618e886f4d349216d2b1e294abfdb65fdc
# via requests
jinja2==3.1.6 \
--hash=sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d \
Expand Down Expand Up @@ -324,9 +324,9 @@ pygments==2.19.2 \
--hash=sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887 \
--hash=sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b
# via mkdocs-material
pymdown-extensions==10.16.1 \
--hash=sha256:aace82bcccba3efc03e25d584e6a22d27a8e17caa3f4dd9f207e49b787aa9a91 \
--hash=sha256:d6ba157a6c03146a7fb122b2b9a121300056384eafeec9c9f9e584adfdb2a32d
pymdown-extensions==10.21.3 \
--hash=sha256:72cfcf55f07aea0d4af2c4f11dd4e52466ddfb1bb819673146398e0bd3a77354 \
--hash=sha256:d7a5d08014fc571e80ca21dd6f854e31f94c489800350564d55d15b3c41e76b6
# via
# mkdocs-material
# mkdocstrings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
max_connections=1000,
)

persistence_layer = CachePersistenceLayer(client=client)
persistence_layer = CachePersistenceLayer(client=client) # type: ignore[arg-type]


@dataclass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
ssl_ca_certs=f"{abs_lambda_path()}/certs/cache_ca.pem", # (4)!
)

persistence_layer = CachePersistenceLayer(client=redis_client)
persistence_layer = CachePersistenceLayer(client=redis_client) # type: ignore[arg-type]
config = IdempotencyConfig(
expires_after_seconds=2 * 60, # 2 minutes
)
Expand Down
1 change: 0 additions & 1 deletion layer_v3/app.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python3

import aws_cdk as cdk

from layer.canary_stack import CanaryStack
from layer.layer_stack import LayerStack

Expand Down
2 changes: 1 addition & 1 deletion layer_v3/layer/canary/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def on_event(event, context):

def on_create(event):
props = event["ResourceProperties"]
logger.info("create new resource with properties %s" % props)
logger.info(f"create new resource with properties {props}")
handler(event)


Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"name": "aws-lambda-powertools-python-e2e",
"version": "1.0.0",
"devDependencies": {
"aws-cdk": "^2.1121.0"
"aws-cdk": "^2.1122.0"
}
}
5 changes: 3 additions & 2 deletions parallel_run_e2e.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Calculate how many parallel workers are needed to complete E2E infrastructure jobs across available CPU Cores """
"""Calculate how many parallel workers are needed to complete E2E infrastructure jobs across available CPU Cores"""

import subprocess
import sys
from pathlib import Path
Expand All @@ -9,7 +10,7 @@ def main():
workers = len(list(features)) - 1

command = f"poetry run pytest -n {workers} -o log_cli=true tests/e2e"
result = subprocess.run(command.split(), shell=False)
result = subprocess.run(command.split(), shell=False, check=False)
sys.exit(result.returncode)


Expand Down
Loading