aws-powertools / powertools-lambda-python

A developer toolkit to implement Serverless best practices and increase developer velocity.
https://docs.powertools.aws.dev/lambda/python/latest/
MIT No Attribution
2.8k stars 390 forks source link

Maintenance: Pydantic v1 end of life #4067

Closed leandrodamascena closed 1 month ago

leandrodamascena commented 5 months ago

Why is this needed?

Pydantic plays a critical role in Powertools, working as a key dependency across various utilities. While Powertools is fully compatible with Pydantic v2, the default version remains Pydantic v1. The active development of Pydantic v1 ceased with the launch of v2. Although Pydantic v1 continues to address bug fixes and security problems, development will come to a definitive halt, including security updates, as of 30/06/2024.

I'm opening this issue to keep it on our radar and initiate a discussion about definitively dropping support for Pydantic v1.

https://docs.pydantic.dev/latest/version-policy/#pydantic-v1

Active development of V1 has already stopped, however critical bug fixes and security vulnerabilities will be fixed in V1 for one year after the release of V2 (June 30, 2024).

Which area does this relate to?

Parser

Solution

No response

Acknowledgment

rubenfonseca commented 5 months ago

Thank you for opening this Leandro. I will try to understand the impact this might have on the Bedrock Agents resolver, including timelines.

medley56 commented 1 month ago

This is really messing up my development. I use Pydantic elsewhere in my codebase for direct model validation and I'd like to use a non EOL version of Pydantic but I can't because I have to satisfy the ^1.8.2 pin in the metadata (pyproject.toml) of Powertools.

Please prioritize this. Pydantic is already on 2.8.

sthulb commented 1 month ago

@medley56 Hi there, current versions of Powertools are compatible with Pydantic v2.

There’s a note in the docs on how to do this https://docs.powertools.aws.dev/lambda/python/latest/utilities/parser/#using-pydantic-v2

leandrodamascena commented 1 month ago

We are working to release Powertools v3 soon (hopefully in August) and in this new major release we are removing Pydantic v1.

https://github.com/aws-powertools/powertools-lambda-python/issues/4189

leandrodamascena commented 1 month ago

We are working on the RFC for Powertools V3. Check more information here: https://github.com/aws-powertools/powertools-lambda-python/issues/4189

github-actions[bot] commented 1 month ago

⚠️COMMENT VISIBILITY WARNING⚠️

This issue is now closed. Please be mindful that future comments are hard for our team to see.

If you need more assistance, please either tag a team member or open a new issue that references this one.

If you wish to keep having a conversation with other community members under this issue feel free to do so.