Skip to content
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

docs(upgrade_guide): update upgrade guide with Pydantic information #5316

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

leandrodamascena
Copy link
Contributor

Issue number: #5249

Summary

Changes

In Powertools v3 we have dropped support for Pydantic v1 and are only supporting Pydantic v2 which is why we are no longer exporting pydantic types directly and allowing customers to import them directly from Pydantic.

1 - Pydantic V2 was a complete refactoring of the Pydantic project and they made several changes including, but not limited, to the way they export types, classes, methods, and others. If we continue to expose them directly from Powertools and some export in Pydantic has changed, our customers may get the impression that there is some bug in Powertools and that is not the experience we want to have for our customers.

2 - The way we were doing this was by exposing everything exposed from pydantic to our customers, but there is a long discussion in the Pydantic repository about how pydantic/pydantic#6748 when importing and loading things in this new version. We don't want our customers to inadvertently import everything from Pydantic and this could create some slowdown in their functions.

User experience

- #BEFORE - v2
- from aws_lambda_powertools.utilities.parser.pydantic import EmailStr

+ # NOW - v3
+ from pydantic import EmailStr

Checklist

If your change doesn't seem to apply, please leave them unchecked.

Is this a breaking change?

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

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.

@leandrodamascena leandrodamascena requested a review from a team as a code owner October 5, 2024 22:35
@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Oct 5, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 5, 2024
docs/upgrade.md Outdated Show resolved Hide resolved
docs/upgrade.md Outdated Show resolved Hide resolved
@dreamorosi dreamorosi self-requested a review October 7, 2024 09:37
dreamorosi
dreamorosi previously approved these changes Oct 7, 2024
Copy link

sonarqubecloud bot commented Oct 7, 2024

@leandrodamascena leandrodamascena merged commit c12a0d9 into develop Oct 7, 2024
5 checks passed
@leandrodamascena leandrodamascena deleted the docs/add-upgrade-guide-parser branch October 7, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: pydantic imports from aws_lambda_powertools.utilities.parser.pydantic no longer available
2 participants