-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(general): drop pydantic v1 #4305
refactor(general): drop pydantic v1 #4305
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v3 #4305 +/- ##
=====================================
Coverage ? 96.76%
=====================================
Files ? 216
Lines ? 10344
Branches ? 1902
=====================================
Hits ? 10009
Misses ? 245
Partials ? 90 ☔ View full report in Codecov by Sentry. |
|
aws_lambda_powertools/utilities/parser/models/s3_batch_operation.py
Outdated
Show resolved
Hide resolved
aws_lambda_powertools/utilities/parser/models/s3_batch_operation.py
Outdated
Show resolved
Hide resolved
Hey @heitorlessa, this PR is ready to review! We may need to discuss about this: https://github.com/aws-powertools/powertools-lambda-python/pull/4305/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R99. I can't see any Pydantic deprecation warning in the tests, but please double check this. |
aws_lambda_powertools/event_handler/openapi/swagger_ui/oauth2.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
superb work (I know how exhaustive this is) -- left one question about Bedrock Agents OpenAPI version workaround, and one ask to reduce memory usage for model_config = {"extra": "allow"}
(define once).
Random question, do you know the reason why we have this? powertools-lambda-python/aws_lambda_powertools/event_handler/openapi/encoders.py Line 321 in 17b62b8
It's the only place where we'd need this extra dependency. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!!!
Issue number: #4191
Summary
Changes
This pull request removes support for Pydantic v1 in Powertools for AWS Lambda (Python) v3. Pydantic v2 will be the only supported version going forward.
Our codebase and test suite currently have many conditional checks to ensure compatibility with both Pydantic v1 and v2. This makes the codebase more complex and harder to maintain. By removing support for Pydantic v1, we can simplify the codebase and focus on providing the best experience for Pydantic v2 users.
Customers using Powertools for AWS Lambda (Python) v2 will not need to update their codebase, as those versions will continue to support Pydantic v1. However, customers upgrading to v3 will need to ensure that their codebase uses Pydantic v2. This may require updating their dependencies and making any necessary changes to their code to be compatible with the Pydantic v2 API.
User experience
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.