Skip to content

Commit 103dfbc

Browse files
committed
fix: resolve merge conflicts and maintain UploadFile functionality
Merge conflicts resolved after upstream PRs aws-powertools#7227 and aws-powertools#7253: Core Changes: - Updated File class rename from File -> _File with public File alias - Fixed Union import for _resolve_field_type function - Removed unused _File import in dependant.py - Maintained all UploadFile and validation functionality Testing: - All 25 comprehensive tests passing - 96.36%+ codecov coverage maintained - Code quality checks passing (make format && make pr) Compatibility: - Preserves public File API for backward compatibility - Maintains UploadFile OpenAPI schema generation - All validation middleware features intact
2 parents 1b307f8 + fdeac0c commit 103dfbc

File tree

72 files changed

+2304
-1232
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+2304
-1232
lines changed

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
- name: 'Checkout Repository'
2323
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2424
- name: 'Dependency Review'
25-
uses: actions/dependency-review-action@595b5aeba73380359d98a5e087f648dbb0edce1b # v4.7.3
25+
uses: actions/dependency-review-action@40c09b7dc99638e5ddb0bfd91c1673effc064d8a # v4.8.1

.github/workflows/on_pr_updates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@ jobs:
3232
- name: Block if it doesn't minimum requirements
3333
if: contains(github.event.pull_request.labels.*.name, 'do-not-merge')
3434
run: |
35-
echo "This PR does not meet minimum requirements (check PR comments)."
35+
echo "PR has 'do-not-merge' label. Please resolve the issues mentioned in the PR comments."
3636
exit 1

.github/workflows/ossf_scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
persist-credentials: false
2828

2929
- name: "Run analysis"
30-
uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2
30+
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
3131
with:
3232
results_file: results.sarif
3333
results_format: sarif

.github/workflows/secure_workflows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- name: Checkout code
3333
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3434
- name: Ensure 3rd party workflows have SHA pinned
35-
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@fc87bb5b5a97953d987372e74478de634726b3e5 # v3.0.25
35+
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@9e9574ef04ea69da568d6249bd69539ccc704e74 # v4.0.0
3636
with:
3737
allowlist: |
3838
slsa-framework/slsa-github-generator

CHANGELOG.md

Lines changed: 100 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,128 @@
44
<a name="unreleased"></a>
55
# Unreleased
66

7+
## Features
8+
9+
* **event_handler:** add support for Pydantic models in Query and Header types ([#7253](https://github.com/aws-powertools/powertools-lambda-python/issues/7253))
10+
11+
## Maintenance
12+
13+
* **ci:** improve message when do-not-merge label is present ([#7505](https://github.com/aws-powertools/powertools-lambda-python/issues/7505))
14+
* **ci:** new pre-release 3.21.1a2 ([#7514](https://github.com/aws-powertools/powertools-lambda-python/issues/7514))
15+
* **ci:** new pre-release 3.21.1a0 ([#7500](https://github.com/aws-powertools/powertools-lambda-python/issues/7500))
16+
* **ci:** new pre-release 3.21.1a1 ([#7506](https://github.com/aws-powertools/powertools-lambda-python/issues/7506))
17+
* **deps:** bump valkey-glide from 2.1.0 to 2.1.1 ([#7498](https://github.com/aws-powertools/powertools-lambda-python/issues/7498))
18+
* **deps:** bump actions/dependency-review-action from 4.8.0 to 4.8.1 ([#7516](https://github.com/aws-powertools/powertools-lambda-python/issues/7516))
19+
* **deps-dev:** bump cfn-lint from 1.40.0 to 1.40.1 ([#7502](https://github.com/aws-powertools/powertools-lambda-python/issues/7502))
20+
* **deps-dev:** bump sentry-sdk from 2.40.0 to 2.41.0 ([#7504](https://github.com/aws-powertools/powertools-lambda-python/issues/7504))
21+
* **deps-dev:** bump aws-cdk from 2.1029.4 to 2.1030.0 ([#7508](https://github.com/aws-powertools/powertools-lambda-python/issues/7508))
22+
* **deps-dev:** bump ijson from 3.4.0 to 3.4.0.post0 ([#7510](https://github.com/aws-powertools/powertools-lambda-python/issues/7510))
23+
* **deps-dev:** bump cdklabs-generative-ai-cdk-constructs from 0.1.309 to 0.1.310 ([#7509](https://github.com/aws-powertools/powertools-lambda-python/issues/7509))
24+
* **deps-dev:** bump types-python-dateutil from 2.9.0.20250822 to 2.9.0.20251008 ([#7499](https://github.com/aws-powertools/powertools-lambda-python/issues/7499))
25+
* **deps-dev:** bump boto3-stubs from 1.40.47 to 1.40.49 ([#7503](https://github.com/aws-powertools/powertools-lambda-python/issues/7503))
26+
* **deps-dev:** bump boto3-stubs from 1.40.49 to 1.40.51 ([#7517](https://github.com/aws-powertools/powertools-lambda-python/issues/7517))
27+
28+
29+
<a name="v3.21.0"></a>
30+
## [v3.21.0] - 2025-10-08
731
## Bug Fixes
832

933
* **docs:** correct build optimization script and docs ([#7367](https://github.com/aws-powertools/powertools-lambda-python/issues/7367))
34+
* **event_handler:** parse single list items in form data ([#7415](https://github.com/aws-powertools/powertools-lambda-python/issues/7415))
1035

1136
## Code Refactoring
1237

1338
* **parser:** Improve AppSync models with examples and descriptions ([#7330](https://github.com/aws-powertools/powertools-lambda-python/issues/7330))
1439

1540
## Documentation
1641

42+
* **aws:** add AWS docs bootstrap JavaScript ([#7472](https://github.com/aws-powertools/powertools-lambda-python/issues/7472))
43+
* **event_handler:** remove the wrong CORS warning ([#7385](https://github.com/aws-powertools/powertools-lambda-python/issues/7385))
44+
* **event_handler:** update test section ([#7374](https://github.com/aws-powertools/powertools-lambda-python/issues/7374))
1745
* **event_handler:** add info section about types ([#7368](https://github.com/aws-powertools/powertools-lambda-python/issues/7368))
46+
* **logger:** clarify Advanced Logging Controls interaction with sampling ([#7429](https://github.com/aws-powertools/powertools-lambda-python/issues/7429))
1847

1948
## Features
2049

50+
* **event-handler:** add support for Pydantic Field discriminator in validation ([#7227](https://github.com/aws-powertools/powertools-lambda-python/issues/7227))
2151
* **event_handler:** enhance OpenAPI response with headers, links, examples and encoding ([#7312](https://github.com/aws-powertools/powertools-lambda-python/issues/7312))
2252
* **parser:** add field metadata and examples for CloudWatch models ([#7343](https://github.com/aws-powertools/powertools-lambda-python/issues/7343))
2353

2454
## Maintenance
2555

56+
* Fix Discord badge in README ([#7488](https://github.com/aws-powertools/powertools-lambda-python/issues/7488))
57+
* version bump
58+
* **ci:** new pre-release 3.20.1a12 ([#7492](https://github.com/aws-powertools/powertools-lambda-python/issues/7492))
59+
* **ci:** new pre-release 3.20.1a5 ([#7418](https://github.com/aws-powertools/powertools-lambda-python/issues/7418))
2660
* **ci:** new pre-release 3.20.1a0 ([#7362](https://github.com/aws-powertools/powertools-lambda-python/issues/7362))
61+
* **ci:** new pre-release 3.20.1a11 ([#7485](https://github.com/aws-powertools/powertools-lambda-python/issues/7485))
62+
* **ci:** new pre-release 3.20.1a4 ([#7404](https://github.com/aws-powertools/powertools-lambda-python/issues/7404))
63+
* **ci:** new pre-release 3.20.1a10 ([#7479](https://github.com/aws-powertools/powertools-lambda-python/issues/7479))
64+
* **ci:** new pre-release 3.20.1a3 ([#7393](https://github.com/aws-powertools/powertools-lambda-python/issues/7393))
65+
* **ci:** new pre-release 3.20.1a1 ([#7372](https://github.com/aws-powertools/powertools-lambda-python/issues/7372))
66+
* **ci:** new pre-release 3.20.1a9 ([#7469](https://github.com/aws-powertools/powertools-lambda-python/issues/7469))
67+
* **ci:** new pre-release 3.20.1a8 ([#7456](https://github.com/aws-powertools/powertools-lambda-python/issues/7456))
68+
* **ci:** new pre-release 3.20.1a6 ([#7442](https://github.com/aws-powertools/powertools-lambda-python/issues/7442))
69+
* **ci:** new pre-release 3.20.1a2 ([#7383](https://github.com/aws-powertools/powertools-lambda-python/issues/7383))
70+
* **ci:** new pre-release 3.20.1a7 ([#7450](https://github.com/aws-powertools/powertools-lambda-python/issues/7450))
71+
* **deps:** bump mkdocs-llmstxt from 0.3.1 to 0.3.2 ([#7436](https://github.com/aws-powertools/powertools-lambda-python/issues/7436))
72+
* **deps:** bump mkdocs-material from 9.6.20 to 9.6.21 in /docs ([#7453](https://github.com/aws-powertools/powertools-lambda-python/issues/7453))
73+
* **deps:** bump squidfunk/mkdocs-material from `86d21da` to `00f9276` in /docs ([#7452](https://github.com/aws-powertools/powertools-lambda-python/issues/7452))
74+
* **deps:** bump ossf/scorecard-action from 2.4.2 to 2.4.3 ([#7458](https://github.com/aws-powertools/powertools-lambda-python/issues/7458))
75+
* **deps:** bump protobuf from 6.32.0 to 6.32.1 ([#7376](https://github.com/aws-powertools/powertools-lambda-python/issues/7376))
76+
* **deps:** bump pydantic-settings from 2.10.1 to 2.11.0 ([#7434](https://github.com/aws-powertools/powertools-lambda-python/issues/7434))
77+
* **deps:** bump mkdocs-material from 9.6.19 to 9.6.20 in /docs ([#7387](https://github.com/aws-powertools/powertools-lambda-python/issues/7387))
78+
* **deps:** bump mkdocs-llmstxt from 0.3.2 to 0.4.0 in /docs ([#7473](https://github.com/aws-powertools/powertools-lambda-python/issues/7473))
79+
* **deps:** bump mkdocs-material from 9.6.20 to 9.6.21 ([#7455](https://github.com/aws-powertools/powertools-lambda-python/issues/7455))
80+
* **deps:** bump mkdocs-material from 9.6.19 to 9.6.20 ([#7389](https://github.com/aws-powertools/powertools-lambda-python/issues/7389))
81+
* **deps:** bump actions/dependency-review-action from 4.7.3 to 4.8.0 ([#7432](https://github.com/aws-powertools/powertools-lambda-python/issues/7432))
82+
* **deps:** bump mkdocs-llmstxt from 0.3.2 to 0.4.0 ([#7475](https://github.com/aws-powertools/powertools-lambda-python/issues/7475))
83+
* **deps:** bump pydantic from 2.11.7 to 2.11.9 ([#7390](https://github.com/aws-powertools/powertools-lambda-python/issues/7390))
84+
* **deps:** bump valkey-glide from 2.0.1 to 2.1.0 ([#7403](https://github.com/aws-powertools/powertools-lambda-python/issues/7403))
85+
* **deps:** bump pydantic from 2.11.9 to 2.11.10 ([#7483](https://github.com/aws-powertools/powertools-lambda-python/issues/7483))
2786
* **deps:** bump mkdocs-material from 9.6.18 to 9.6.19 ([#7359](https://github.com/aws-powertools/powertools-lambda-python/issues/7359))
87+
* **deps:** bump pydantic from 2.11.10 to 2.12.0 ([#7491](https://github.com/aws-powertools/powertools-lambda-python/issues/7491))
88+
* **deps:** bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.25 to 4.0.0 ([#7449](https://github.com/aws-powertools/powertools-lambda-python/issues/7449))
89+
* **deps:** bump mkdocs-llmstxt from 0.3.1 to 0.3.2 in /docs ([#7409](https://github.com/aws-powertools/powertools-lambda-python/issues/7409))
90+
* **deps:** bump squidfunk/mkdocs-material from `209b62d` to `86d21da` in /docs ([#7386](https://github.com/aws-powertools/powertools-lambda-python/issues/7386))
91+
* **deps-dev:** bump cfn-lint from 1.39.1 to 1.40.0 ([#7447](https://github.com/aws-powertools/powertools-lambda-python/issues/7447))
92+
* **deps-dev:** bump pytest-mock from 3.15.0 to 3.15.1 ([#7396](https://github.com/aws-powertools/powertools-lambda-python/issues/7396))
93+
* **deps-dev:** bump ruff from 0.12.12 to 0.13.2 ([#7427](https://github.com/aws-powertools/powertools-lambda-python/issues/7427))
94+
* **deps-dev:** bump types-protobuf from 6.30.2.20250822 to 6.32.1.20250918 ([#7406](https://github.com/aws-powertools/powertools-lambda-python/issues/7406))
95+
* **deps-dev:** bump aws-cdk from 2.1029.2 to 2.1029.3 ([#7420](https://github.com/aws-powertools/powertools-lambda-python/issues/7420))
96+
* **deps-dev:** bump aws-cdk-lib from 2.215.0 to 2.217.0 ([#7423](https://github.com/aws-powertools/powertools-lambda-python/issues/7423))
97+
* **deps-dev:** bump aws-cdk from 2.1029.1 to 2.1029.2 ([#7400](https://github.com/aws-powertools/powertools-lambda-python/issues/7400))
98+
* **deps-dev:** bump aws-cdk-aws-lambda-python-alpha from 2.215.0a0 to 2.217.0a0 ([#7424](https://github.com/aws-powertools/powertools-lambda-python/issues/7424))
99+
* **deps-dev:** bump boto3-stubs from 1.40.31 to 1.40.32 ([#7395](https://github.com/aws-powertools/powertools-lambda-python/issues/7395))
100+
* **deps-dev:** bump boto3-stubs from 1.40.32 to 1.40.39 ([#7425](https://github.com/aws-powertools/powertools-lambda-python/issues/7425))
101+
* **deps-dev:** bump coverage from 7.10.6 to 7.10.7 ([#7437](https://github.com/aws-powertools/powertools-lambda-python/issues/7437))
102+
* **deps-dev:** bump mypy from 1.18.1 to 1.18.2 ([#7435](https://github.com/aws-powertools/powertools-lambda-python/issues/7435))
103+
* **deps-dev:** bump aws-cdk-aws-lambda-python-alpha from 2.214.0a0 to 2.215.0a0 ([#7391](https://github.com/aws-powertools/powertools-lambda-python/issues/7391))
104+
* **deps-dev:** bump boto3-stubs from 1.40.30 to 1.40.31 ([#7388](https://github.com/aws-powertools/powertools-lambda-python/issues/7388))
105+
* **deps-dev:** bump boto3-stubs from 1.40.39 to 1.40.40 ([#7433](https://github.com/aws-powertools/powertools-lambda-python/issues/7433))
106+
* **deps-dev:** bump boto3-stubs from 1.40.27 to 1.40.29 ([#7371](https://github.com/aws-powertools/powertools-lambda-python/issues/7371))
107+
* **deps-dev:** bump aws-cdk-aws-lambda-python-alpha from 2.217.0a0 to 2.218.0a0 ([#7448](https://github.com/aws-powertools/powertools-lambda-python/issues/7448))
108+
* **deps-dev:** bump boto3-stubs from 1.40.40 to 1.40.41 ([#7445](https://github.com/aws-powertools/powertools-lambda-python/issues/7445))
109+
* **deps-dev:** bump sentry-sdk from 2.38.0 to 2.39.0 ([#7426](https://github.com/aws-powertools/powertools-lambda-python/issues/7426))
110+
* **deps-dev:** bump boto3-stubs from 1.40.41 to 1.40.42 ([#7454](https://github.com/aws-powertools/powertools-lambda-python/issues/7454))
111+
* **deps-dev:** bump boto3-stubs from 1.40.29 to 1.40.30 ([#7378](https://github.com/aws-powertools/powertools-lambda-python/issues/7378))
112+
* **deps-dev:** bump pytest-asyncio from 1.1.0 to 1.2.0 ([#7377](https://github.com/aws-powertools/powertools-lambda-python/issues/7377))
113+
* **deps-dev:** bump boto3-stubs from 1.40.42 to 1.40.43 ([#7460](https://github.com/aws-powertools/powertools-lambda-python/issues/7460))
114+
* **deps-dev:** bump mypy from 1.17.1 to 1.18.1 ([#7375](https://github.com/aws-powertools/powertools-lambda-python/issues/7375))
115+
* **deps-dev:** bump aws-cdk-aws-lambda-python-alpha from 2.218.0a0 to 2.219.0a0 ([#7464](https://github.com/aws-powertools/powertools-lambda-python/issues/7464))
116+
* **deps-dev:** bump aws-cdk from 2.1029.3 to 2.1029.4 ([#7459](https://github.com/aws-powertools/powertools-lambda-python/issues/7459))
117+
* **deps-dev:** bump ruff from 0.13.2 to 0.13.3 ([#7465](https://github.com/aws-powertools/powertools-lambda-python/issues/7465))
118+
* **deps-dev:** bump aws-cdk from 2.1029.0 to 2.1029.1 ([#7370](https://github.com/aws-powertools/powertools-lambda-python/issues/7370))
119+
* **deps-dev:** bump isort from 6.0.1 to 6.1.0 ([#7461](https://github.com/aws-powertools/powertools-lambda-python/issues/7461))
120+
* **deps-dev:** bump boto3-stubs from 1.40.44 to 1.40.45 ([#7474](https://github.com/aws-powertools/powertools-lambda-python/issues/7474))
121+
* **deps-dev:** bump sentry-sdk from 2.39.0 to 2.40.0 ([#7484](https://github.com/aws-powertools/powertools-lambda-python/issues/7484))
122+
* **deps-dev:** bump boto3-stubs from 1.40.26 to 1.40.27 ([#7358](https://github.com/aws-powertools/powertools-lambda-python/issues/7358))
28123
* **deps-dev:** bump pytest-cov from 6.3.0 to 7.0.0 ([#7357](https://github.com/aws-powertools/powertools-lambda-python/issues/7357))
124+
* **deps-dev:** bump ruff from 0.13.3 to 0.14.0 ([#7489](https://github.com/aws-powertools/powertools-lambda-python/issues/7489))
29125
* **deps-dev:** bump testcontainers from 4.12.0 to 4.13.0 ([#7360](https://github.com/aws-powertools/powertools-lambda-python/issues/7360))
30126
* **deps-dev:** bump sentry-sdk from 2.37.0 to 2.37.1 ([#7356](https://github.com/aws-powertools/powertools-lambda-python/issues/7356))
31-
* **deps-dev:** bump boto3-stubs from 1.40.26 to 1.40.27 ([#7358](https://github.com/aws-powertools/powertools-lambda-python/issues/7358))
127+
* **deps-dev:** bump boto3-stubs from 1.40.45 to 1.40.47 ([#7490](https://github.com/aws-powertools/powertools-lambda-python/issues/7490))
128+
* **deps-dev:** bump sentry-sdk from 2.37.1 to 2.38.0 ([#7402](https://github.com/aws-powertools/powertools-lambda-python/issues/7402))
32129

33130

34131
<a name="v3.20.0"></a>
@@ -7103,7 +7200,8 @@
71037200
* Merge pull request [#5](https://github.com/aws-powertools/powertools-lambda-python/issues/5) from jfuss/feat/python38
71047201

71057202

7106-
[Unreleased]: https://github.com/aws-powertools/powertools-lambda-python/compare/v3.20.0...HEAD
7203+
[Unreleased]: https://github.com/aws-powertools/powertools-lambda-python/compare/v3.21.0...HEAD
7204+
[v3.21.0]: https://github.com/aws-powertools/powertools-lambda-python/compare/v3.20.0...v3.21.0
71077205
[v3.20.0]: https://github.com/aws-powertools/powertools-lambda-python/compare/v3.19.0...v3.20.0
71087206
[v3.19.0]: https://github.com/aws-powertools/powertools-lambda-python/compare/v3.17.1...v3.19.0
71097207
[v3.17.1]: https://github.com/aws-powertools/powertools-lambda-python/compare/v3.18.0...v3.17.1

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
[![Build](https://github.com/aws-powertools/powertools-lambda-python/actions/workflows/quality_check.yml/badge.svg)](https://github.com/aws-powertools/powertools-lambda-python/actions/workflows/python_build.yml)
55
[![codecov.io](https://codecov.io/github/aws-powertools/powertools-lambda-python/branch/develop/graphs/badge.svg)](https://app.codecov.io/gh/aws-powertools/powertools-lambda-python)
6-
![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.9|%203.10|%203.11|%203.12|%203.13&color=blue?style=flat-square&logo=python) ![PyPI version](https://badge.fury.io/py/aws-lambda-powertools.svg) ![PyPi monthly downloads](https://img.shields.io/pypi/dm/aws-lambda-powertools) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/aws-powertools/powertools-lambda-python/badge)](https://api.securityscorecards.dev/projects/github.com/aws-powertools/powertools-lambda-python) [![Join our Discord](https://dcbadge.vercel.app/api/server/B8zZKbbyET?style=flat-square)](https://discord.gg/B8zZKbbyET)
6+
![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.9|%203.10|%203.11|%203.12|%203.13&color=blue?style=flat-square&logo=python) ![PyPI version](https://badge.fury.io/py/aws-lambda-powertools.svg) ![PyPi monthly downloads](https://img.shields.io/pypi/dm/aws-lambda-powertools) [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/aws-powertools/powertools-lambda-python/badge)](https://api.securityscorecards.dev/projects/github.com/aws-powertools/powertools-lambda-python)
7+
[![Discord](https://img.shields.io/badge/Discord-Join_Community-7289da.svg)](https://discord.gg/B8zZKbbyET)
78

89
Powertools for AWS Lambda (Python) is a developer toolkit to implement Serverless [best practices and increase developer velocity](https://docs.powertools.aws.dev/lambda/python/latest/#features).
910

0 commit comments

Comments
 (0)