fix(event_handler): add tests for PEP 563 compatibility with OpenAPI#5886
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5886 +/- ##
===========================================
+ Coverage 96.17% 96.19% +0.02%
===========================================
Files 232 232
Lines 10941 10941
Branches 2023 2023
===========================================
+ Hits 10522 10525 +3
+ Misses 329 327 -2
+ Partials 90 89 -1 ☔ View full report in Codecov by Sentry. |
|
e2e is green: https://github.com/aws-powertools/powertools-lambda-python/actions/runs/12867394165/job/35873665498 This error is not relevant at this time and happened randomly in Python 3.13:
|



Issue number: #5098
Summary
Changes
This pull request add tests to make sure that OpenAPI is working when data validation feature of event resolvers and the use of
from __future__ import annotations, as introduced by PEP 563 (Postponed Evaluation of Annotations).Some additional information
__globals__.While this PR make sure this is working, I'm working in additional PR's to make sure Powertools is full compatible with Pydantic 2.10+.
User experience
Before this PR the following code could fail with:
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change?
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.