-
Notifications
You must be signed in to change notification settings - Fork 58
Adds a pydantic V2 compatibility layer #218
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
Conversation
7212f67
to
329a99b
Compare
Signed-off-by: Federico Busetti <729029+febus982@users.noreply.github.com>
329a99b
to
13a61ae
Compare
There’s a typing issue, I think it’s safe to ignore it, is it fine to ignore it? (don't want to trigger too many minutes on workers) I have started working on the native Pydantic V2 implementation.
|
@febus982, thx for the PR! It's awesome that you jumped in and prepared one. I believe that's the best possible approach to bring v2 support fast. IDK whether the As for the tests, with the change you made, I believe our CI is now only running tests against v2 and is not running tests against v1 anymore. Having tests with both v1 and v2 versions of Pydantic is gonna require quite some more changes to the way the repo is managed. Regarding the typings issue, I believe we'll need to suppress that one, but not just ignore it. Can you please suppress it with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@febus982 please let me know if you'd add ignores for MyPy or whether I should jump in and add them.
Hey @xSAVIKx
Yes, I meant ignore for us humans, and suppress it. I'll add
If this is very important I can try to see if I can configure different tox environments, however as pydantic V1 development is stopped (except for critical bug fixes and security issues) the double time required for tests is something to be considered. Let me know if you want me to address this as well. |
Neah, I just checked the internals of the v1 compatibility layer and it feels like they just copied over the whole v1 library 😅 just fixing typings to please mypy and make the check pass is good enough |
Signed-off-by: Federico Busetti <729029+febus982@users.noreply.github.com>
@xSAVIKx I think it's ready to go (hopefully tests will pass, tox is happy on my local machine) |
Fixes #215
Changes
Adds a compatibility layer allowing to install the SDK together with pydantic v2, while still using the v1 implementation. Further improvements would be a native pydantic v2 implementation.
One line description for the changelog
Allows to install the SDK together with pydantic v2.