| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
(incl. `max_digits`, `decimal_places`, `unique_items`, `discriminator`, and `repr`); add tests for Pydantic capabilities; bump Pydantic dependency to `1.9.0`
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files @@ Coverage Diff @@
## main #440 +/- ##
==========================================
- Coverage 98.49% 97.81% -0.69%
==========================================
Files 185 188 +3
Lines 5856 6315 +459
==========================================
+ Hits 5768 6177 +409
- Misses 88 138 +50
... and 1 file with indirect coverage changes ☔ View full report in Codecov by Sentry. |
Sorry, something went wrong.
|
📝 Docs preview for commit 6728c25 at: https://63186d6a24607c220a2e25b4--sqlmodel.netlify.app |
Sorry, something went wrong.
|
📝 Docs preview for commit 57e05ab at: https://63187ebf24607c32762e235c--sqlmodel.netlify.app |
Sorry, something went wrong.
|
📝 Docs preview for commit 45d5eb1 at: https://639ce0c089c20f00aba4cd75--sqlmodel.netlify.app |
Sorry, something went wrong.
|
@tiangolo Is there any planned timeline to merge this PR? Discriminator is a need for many developers (that's why pydantic released a support for it). Thanks |
Sorry, something went wrong.
|
++ on updates |
Sorry, something went wrong.
|
📝 Docs preview for commit 5ff6d2a at: https://de370077.sqlmodel.pages.dev |
Sorry, something went wrong.
|
Awesome, thank you @daniil-berg! 🚀 This will be available in the next version: 0.0.10 🎉 |
Sorry, something went wrong.
| with pytest.raises(ValidationError): | ||
| Model(unique_strings=["x", "y", "x"]) | ||
|
|
||
|
|
There was a problem hiding this comment.
why remove and not skipif, as pydantic v2 support is not present now?
Please note that if that means Pydantic v2 support in few days, I'm fine with it ;-)
Sorry, something went wrong.
There was a problem hiding this comment.
Yep, the plan is to support SQLAlchemy 2.0 and Pydantic 2.0 as soon as possible. 🤓
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
The proposed changes add support for the following Field parameters:
This makes the SQLModel Field constructor support all Pydantic field parameters as of version 1.9.0 up until the current one (1.10.2).
Tests sub-package for Pydantic capabilities was added and tests for the new field parameters were included.
The Pydantic dependency was bumped to 1.9.0.
Fixes