[WIP] Upgrade to support both Pydantic v1 and v2#699
Closed
AntonDeMeester wants to merge 29 commits intofastapi:mainfrom
Closed
[WIP] Upgrade to support both Pydantic v1 and v2#699AntonDeMeester wants to merge 29 commits intofastapi:mainfrom
AntonDeMeester wants to merge 29 commits intofastapi:mainfrom
Conversation
Co-authored-by: Stefan Borer <stefan.borer@gmail.com>
Change imports Undefined => PydanticUndefined Update SQLModelMetaclass and SQLModel __init__ and __new__ functions Update SQL Alchemy type inference
Only need to fix OPEN API things I think
Contributor
|
📝 Docs preview for commit e2d4d1f at: https://003fc64c.sqlmodel.pages.dev |
|
Hey, we're currently investigating to use SQLModel in Willow Application Server. As we're doing some latency sensitive stuff in there, we'd really like to use Pydantic 2, so I gave this PR a try. Creating a table and inserting records seems to work, but when trying a select we hit the following exception: I understand this is a WIP, so my question is: do you have a rough estimate of when this would be ready? |
Contributor
Author
Member
|
Thank you for your work @AntonDeMeester! I included your commits in #722 (you can see your badge now says "Contributor" 😎 ), I changed a few extra things, more details in that PR. It's now released and available as SQLModel 0.0.14! 🎉 🌮 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades to Pydantic 2, using the new pydantic models. This also includes support for Pydantic v1.