Replies: 1 comment 2 replies
-
no need at all - it was a poor judgement's decision to help non-developers use models among other things. In a future v4/v5 version, I'd love to a custom Python's import hook to start addressing this in a backwards compatible fashion, deprecate it, and get rid of it. If you've bandwidth, we'd love help in updating the docs to use a |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I noticed in the docs some examples use
from aws_lambda_powertools.utilities.parser import BaseModel
. Normally, I'd just usefrom pydantic import BaseModel
. In my understanding, it is fairly atypical for a 3rd-party library to re-export another library's objects. I know this library relies on pydantic and with v2 there are several breaking changes, so I'm wondering if it is necessary to usefrom aws_lambda_powertools.utilities.parser import BaseModel
in production code, or if it makes no difference to import directly from pydantic? The latter is far preferable (it confused me when I first dug into my new team's codebase). Is this some sort of shim?We are currently on pydanticV1 but I want our team to rip off the bandaid sooner rather than later to upgrade to v2.
This seems to be the commit where there's a comment on the wildcard import/export, which is a bit of a headscratcher.
Beta Was this translation helpful? Give feedback.
All reactions