Skip to content

Feature request: Start Evaluating Pydantic v2 #2427

Closed
@djfurman

Description

@djfurman

Use case

Pydantic is already included in aws-lamdba-powertools as the provider for deep data validation and parsing as an optional dependency. Pydantic V2 is now in beta evaluation, when it becomes a stable version, it should be introduced as an option into powertools without major breaking changes. We need a way to test the integration with the rest of the library and benchmark performance within Lambda.

Solution/User Experience

Today the parser is included as an extra using Pydantic. With the launch of PydanticV2 we could include a second extra, add max version, or identify if we can do this transparently to the user with an optional switch.

To keep powertools lean, having both dependencies on a single extra seems less than ideal.

What is the best way to evaluate an impact like this without falling out of sync with the enhancements to powertools?

Alternative solutions

- Have two extras tagged to Pydantic versions
- Freeze the parser to Pydantic v1
- Identify if there are any breaking implementations within parser for breaking API changes of the Pydantic upgrade (not personally recommended)
- Identify how to handle the version difference in the full install layer as users will choose one version, not both in their function.

Acknowledgment

### Tasks

Metadata

Metadata

Labels

feature-requestfeature requesthelp wantedCould use a second pair of eyes/handsparserParser (Pydantic) utility

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions