You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parser (Pydantic) re-export Pydantic errors for data model validation #1687
When writing validators and root validators it is useful to keep error formats consistent with the Pydantic TypeErrors and ValueErrors from the Pydantic errors module
Just read Pydantic V2 plan and the only breaking change it seems to apply here is parse_raw that we use in Parser. I couldn't find a specific mention on errors packaging.
I'll go ahead and merge the errors exposing, since parser.pydantic.errors wouldn't work as it's not a package and doesn't seem to need to be.
Because it's a major version, we will come to that when we need to cross that bridge. I think there's a great chance in the future to make Pydantic built-in in Powertools to ease developing certain features like Feature Flags - the benchmarks and reduced package size look fantastic, but we need to apply due-diligence and weigh its pros/cons as usual.
Activity
heitorlessa commentedon Nov 16, 2022
Hey @kPOWz, would this work?
Looking at Pydantic exported symbols, there doesn't seem to be any clash so I can export them directly too.
https://github.com/awslabs/aws-lambda-powertools-python/pull/1728/files#diff-802361d017af63e8fc18b5df568bbdfc17800ab8b90ef502a64a907ce4ef917bR9
heitorlessa commentedon Nov 17, 2022
Just read Pydantic V2 plan and the only breaking change it seems to apply here is
parse_rawthat we use in Parser. I couldn't find a specific mention on errors packaging.I'll go ahead and merge the errors exposing, since
parser.pydantic.errorswouldn't work as it's not a package and doesn't seem to need to be.Because it's a major version, we will come to that when we need to cross that bridge. I think there's a great chance in the future to make Pydantic built-in in Powertools to ease developing certain features like Feature Flags - the benchmarks and reduced package size look fantastic, but we need to apply due-diligence and weigh its pros/cons as usual.
github-actions commentedon Nov 17, 2022
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.
github-actions commentedon Nov 17, 2022
This is now released under 2.3.0 version!