-
Notifications
You must be signed in to change notification settings - Fork 5
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
Start supporting pydantic v2 #382
Comments
Fully moving to pydantic v2 depends on machow/quartodoc#211 |
And on Pandera, which has a Pydantic V2 compatible version coming in October at the earliest (and we'll have to test it first). |
Pandera now supports pydantic v2 as of v0.17: https://github.com/unionai-oss/pandera/releases/tag/v0.17.0 |
Ok our dependencies are ready, now we just need to update. I tried
I don't really understand why since these are declared as Optional. Probably best to wait until @evetion tackled #630. @evetion I don't know if you plan to upgrade as part of the redesign, but it's good to know that you could start using pydantic v2 features. You could use d736371 for the dependency upgrade if needed. |
Optional (or T | None) behaves differently with pydantic 2 (another reason why we should drop the misleading Optional and use the new syntax instead) |
@visr that is the change: https://docs.pydantic.dev/latest/migration/#required-optional-and-nullable-fields TLDR: just add a default value of |
Fixed in #731 |
pydantic v2 is now out with a lot of nice things, most notably higher speed.
I think we will want to support v2 as fast as possible, but depending on the amount of work, it would be nice to continue supporting v1 as well.
If we don't do that, packaging Ribasim Python on Deltaforge will be hard to do in the near future because of version requirement conflicts.
The migration guide can be found here: https://docs.pydantic.dev/latest/migration/
The text was updated successfully, but these errors were encountered: