-
Notifications
You must be signed in to change notification settings - Fork 25
Pydantic v2 #199
Pydantic v2 #199
Conversation
|
please review |
|
Hey, consider other people using this library and straighten with fastapi's approach on this subject Since fastapi 0.100 supports pydantic v1 and v2 we should as well |
|
@yuval9313 Ok - I've updated the PR to support both v1 and v2. I've added into the test suite to test both v1 and v2 installs. I've also tested locally and looks okay to me. There is also a separate package install to get V2 required packages. |
|
Alright, I assume it's OK Just one question, why didn't you include v2 in all? Also I assume default behavior should use pydantic 2, is there a way to not install dependencies when we want the v1? Does that makes sense? Maybe it means that pydantic-settings should be installed for both v1 and v2? What do you think? |
I kinda assumed we'd want v2 to be explicitly optin - i can move this though
I'm honestly not sure - i can take a look?
pydantic-settings requires V2, so can only be installed when v2 is present. |
|
I think the default option should be v2. I wish I could ask you to separate pydantic from this lib exactly like fastapi but unfortunately I'd call that out of scope Can you please find out if it possible to install v1 via extras? |
|
I know it's confusing but don't change the PR yet Tell me if you think there is a solution to the v2/v1 issue prior to changing the lib |
|
Hey can you make sure you pass the ci? |
Thanks - I've updated:
|
|
Right @yuval9313 , sorry, that should now pass ci 😆 |
|
Thanks for approving @yuval9313! is it possible to get a release with this in soon? 🙏🏻 |
|
Yes, can you merge? |
|
@yuval9313 I dont have write permissions so can't merge, unfortunately. |
Bumps to pydantic v2. Please advise on any other updates needed, as we would like to start using v2 in our projects. thanks.