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
RFC: Powertools for AWS Lambda (Python) v3 #4189
Comments
There's a lot of overlap between the Event Handler, Event Source Data Classes, Parser, and Validation Is there a nice way to unify it all somehow? |
I agree. Since v3 will use pydantic by default, is there a need to maintain event source data classes? why not move to the parser's pydantic schemas exclusively? I suppose there are some gaps in coverage and missing schemas, but that can be fixed :) |
i contributed REST API event handler , GraphQL API eventhandler and Event Source Data Classes If what can be done here is not a major breaking change or a regression in performance it would be greatly appreciated, as we use Powertools for many internal tools at Fiserv. |
Hey Michael 🙏🏻 |
Hey everyone! Thanks for the contribution and for bringing ideas/suggestions to this RFC. We have no plans to remove features or do extreme refactoring to Powertools V3 utilities/codebase. This release mainly aims to drop Pydantic v1 in favor of v2 and resolve some pain points. When it comes to event source, we will be refactoring and introducing a small breaking change, but still using the same concept of creating objects from events and without any additional dependencies. Removing utilities such as Event Source or making Pydantic mandatory for the Event Handler, for example, could be a huge breaking change and would make it extremely hard for our customers to migrate from v2 to v3. I agree that we have some overlap between some utilities and could consider merging/removing them, but we can evaluate this in future releases, not in v3. Thanks |
Is this related to an existing feature request or issue?
#4067
Which Powertools for AWS Lambda (Python) utility does this relate to?
Other
Summary
We are excited to announce that we are starting a new major version (v3) for Powertools for AWS Lambda (Python). We are expediting a new major version to align with the scheduled Pydantic v1 end-of-life on June 30th, signalling the switch to much anticipated Pydantic v2. Pydantic plays a vital role and we care deeply about supply chain security. This release highlights our dedication to providing a secure and stable library that our customers trust.
Today, we already support both Pydantic v1 and v2. In this new major version, we will make Pydantic v2 the default, removing Pydantic v1. We will take this opportunity to introduce minor breaking changes to address common pain points. As always, we will provide an extensive upgrade guide to make this transition as smooth as possible.
Community
We invite the entire Powertools community, including users and contributors, to actively participate in this RFC. We greatly value the community's contribution, ideas, and willingness to solve problems or validate proposed changes.
Use case
The primary use case is to offer Pydantic v2. That includes a new Lambda Layer for each Python version since Pydantic v2 contains non-Python code (Rust). It future-proof Layers to contain any additional compiled dependency (like cryptography) without a new major version.
Additional key items on v3 backlog
Optional
in Event Source Data Classes to further reduce customers codeProposal
The action plan for this release with scope and tasks is as follows:
Quick summary (Work in progress - Items can be added or removed):
SSMProvider
class to implement theget_multiple
methodDict
orList
in Event Source Data Classes instead ofNone
event_parser
envelopes should handle unions of BaseModelstracing.base.BaseProvider
resolved_headers_field
is not Optionalaws-encryption-sdk
dependency in the Powertools layerextract_data_from_envelope
in JMESPath Functionsapi_gateway.py
file into several other files to ease maintenanceDynamoDBStreamModel
log_uncaught_exceptions
in the Logger utilityDeadlines
We plan to release the first version of v3 by the end of June/beginning of July.
Out of scope
We will not include in v3:
Potential challenges
Adding Pydantic v2 in the Powertools layer requires layers per Python version, so the effort to implement this is not yet clear.
Dependencies and Integrations
No response
Alternative solutions
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: