FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[Original HTTPS Page]
✨ Add support for Pydantic v2 (while keeping support for v1 if v2 is not available), including initial work by AntonDeMeester by tiangolo · Pull Request #722 · fastapi/sqlmodel · GitHub
fastapi
sqlmodel
Repository navigation
Code
Issues
1
(1)
Pull requests
52
(52)
Discussions
Actions
Projects
Security and quality
Insights
✨ Add support for Pydantic v2 (while keeping support for v1 if v2 is not available), including initial work by AntonDeMeester
- #722
#722
Merged
tiangolo
merged 109 commits into
main
fastapi/sqlmodel:main
from
pv2-c
fastapi/sqlmodel:pv2-c
Copy head branch name to clipboard
Dec 4, 2023
Conversation
Commits
109
(109)
Checks
Files changed
Merged
✨ Add support for Pydantic v2 (while keeping support for v1 if v2 is not available), including initial work by AntonDeMeester
#722
tiangolo
merged 109 commits into
main
fastapi/sqlmodel:main
from
pv2-c
fastapi/sqlmodel:pv2-c
Copy head branch name to clipboard
Commits
Commits on Nov 13, 2023
migration to sqlalchemy 2.0
farahats9
authored and
AntonDeMeester
committed
d0ae3e8
View commit details
Copy full SHA for d0ae3e8
Browse repository at this point
fix some linting errors
farahats9
authored and
AntonDeMeester
committed
8a27655
View commit details
Copy full SHA for 8a27655
Browse repository at this point
reflecting python 3.6 deprecation in docs and tests
farahats9
authored and
AntonDeMeester
committed
a2b3c14
View commit details
Copy full SHA for a2b3c14
Browse repository at this point
Update sqlmodel/sql/expression.py
Show description for 4760dbd
authored and
AntonDeMeester
committed
4760dbd
View commit details
Copy full SHA for 4760dbd
Browse repository at this point
resolving @sbor23 comments
farahats9
authored and
AntonDeMeester
committed
ad76a88
View commit details
Copy full SHA for ad76a88
Browse repository at this point
add the new Subquery class
farahats9
authored and
AntonDeMeester
committed
96e44e5
View commit details
Copy full SHA for 96e44e5
Browse repository at this point
fix jinja2 template
farahats9
authored and
AntonDeMeester
committed
9e72750
View commit details
Copy full SHA for 9e72750
Browse repository at this point
`Result` expects a type `Tuple[_T]`
peterlandry
authored and
AntonDeMeester
committed
b19a709
View commit details
Copy full SHA for b19a709
Browse repository at this point
Remove unused type ignore
peterlandry
authored and
AntonDeMeester
committed
ae369ed
View commit details
Copy full SHA for ae369ed
Browse repository at this point
Result seems well enough typed in SqlAlchemy now we can simply shim over
peterlandry
authored and
AntonDeMeester
committed
2ff42db
View commit details
Copy full SHA for 2ff42db
Browse repository at this point
_Select expects a `Tuple[Any, ...]`
peterlandry
authored and
AntonDeMeester
committed
b6bd94f
View commit details
Copy full SHA for b6bd94f
Browse repository at this point
Use Dict type instead of Mapping for SqlAlchemy compat
peterlandry
authored and
AntonDeMeester
committed
1dbce4d
View commit details
Copy full SHA for 1dbce4d
Browse repository at this point
Execution options are not Optional in SA
peterlandry
authored and
AntonDeMeester
committed
c2d310e
View commit details
Copy full SHA for c2d310e
Browse repository at this point
Another instance of non-optional execution_options
peterlandry
authored and
AntonDeMeester
committed
05a1352
View commit details
Copy full SHA for 05a1352
Browse repository at this point
Fix Tuple in jinja template as well
peterlandry
authored and
AntonDeMeester
committed
bd00a2b
View commit details
Copy full SHA for bd00a2b
Browse repository at this point
Use ForUpdateArg from sqlalchemy
peterlandry
authored and
AntonDeMeester
committed
c65f018
View commit details
Copy full SHA for c65f018
Browse repository at this point
Fix signature for `Session.get`
peterlandry
authored and
AntonDeMeester
committed
4e29e00
View commit details
Copy full SHA for 4e29e00
Browse repository at this point
formatting and remove unused type
farahats9
authored and
AntonDeMeester
committed
fd85d02
View commit details
Copy full SHA for fd85d02
Browse repository at this point
Upgrade to Pydantic 2
Show description for d556059
AntonDeMeester
committed
d556059
View commit details
Copy full SHA for d556059
Browse repository at this point
Formatting
AntonDeMeester
committed
e92a52e
View commit details
Copy full SHA for e92a52e
Browse repository at this point
Linting
AntonDeMeester
committed
61d5d8d
View commit details
Copy full SHA for 61d5d8d
Browse repository at this point
Make all tests but fastapi work
AntonDeMeester
committed
cb494b7
View commit details
Copy full SHA for cb494b7
Browse repository at this point
Get all tests except for openapi working
AntonDeMeester
committed
f590548
View commit details
Copy full SHA for f590548
Browse repository at this point
Write for pydantic v1 and v2 compat
AntonDeMeester
committed
7ecbc38
View commit details
Copy full SHA for 7ecbc38
Browse repository at this point
Commits on Nov 14, 2023
Make pydantic v1 work again
AntonDeMeester
committed
c21ff69
View commit details
Copy full SHA for c21ff69
Browse repository at this point
Liniting
AntonDeMeester
committed
254fb13
View commit details
Copy full SHA for 254fb13
Browse repository at this point
Linter
AntonDeMeester
committed
ab07514
View commit details
Copy full SHA for ab07514
Browse repository at this point
Move lint to after tests to see tests
AntonDeMeester
committed
4a4161a
View commit details
Copy full SHA for 4a4161a
Browse repository at this point
Commits on Nov 16, 2023
Make most tests succeed
Show description for e2d4d1f
AntonDeMeester
committed
e2d4d1f
View commit details
Copy full SHA for e2d4d1f
Browse repository at this point
Commits on Nov 23, 2023
🔀 Merge branch 'main' into pv2-b
tiangolo
committed
725c6ac
View commit details
Copy full SHA for 725c6ac
Browse repository at this point
💡 Add TODO comments
tiangolo
committed
4c358b2
View commit details
Copy full SHA for 4c358b2
Browse repository at this point
👷 Update CI from main
tiangolo
committed
0029193
View commit details
Copy full SHA for 0029193
Browse repository at this point
📝 Update index.md with Python versions
tiangolo
committed
8a13945
View commit details
Copy full SHA for 8a13945
Browse repository at this point
⏪️ Revert changing model order in examples to account for previous lack of support for forward references in SQLAlchemy (from a previous PR this was based of)
tiangolo
committed
bebd5d8
View commit details
Copy full SHA for bebd5d8
Browse repository at this point
⏪️ Revert example changing the order of models to account for the lack of support for forward references in SQLAlchemy in a previous PR this was based of
tiangolo
committed
d229a87
View commit details
Copy full SHA for d229a87
Browse repository at this point
🔥 Remove import removed in __init__ from main
tiangolo
committed
29e372b
View commit details
Copy full SHA for 29e372b
Browse repository at this point
Commits on Nov 24, 2023
⏪️ Revert renaming Undefined to PydanticUndefined, limit the changes and difff
tiangolo
committed
665902c
View commit details
Copy full SHA for 665902c
Browse repository at this point
♻️ Refactor compat, rename PydanticUndefined to Undefined as before
tiangolo
committed
b5460f9
View commit details
Copy full SHA for b5460f9
Browse repository at this point
🐛 Fix type of model.__fields__ in Pydantic v1 and add compatibility class for Pydantic v2
tiangolo
committed
d9bafa3
View commit details
Copy full SHA for d9bafa3
Browse repository at this point
🐛 Use compat ModelField for type annotation in model.__fields__ for Pydantic v1
tiangolo
committed
6e29b22
View commit details
Copy full SHA for 6e29b22
Browse repository at this point
🐛 Fix removed Pydantic v1 field post init
tiangolo
committed
835cbc8
View commit details
Copy full SHA for 835cbc8
Browse repository at this point
Commits on Nov 25, 2023
🚚 Move get_sqlalchemy_type and get_column_from_field back to main
tiangolo
committed
dbaef53
View commit details
Copy full SHA for dbaef53
Browse repository at this point
♻️ Refactor parameters for set_config_value
tiangolo
committed
dcbc084
View commit details
Copy full SHA for dcbc084
Browse repository at this point
♻️ Update calls for get_relationship_to with keyword args, remove done related TODOs
tiangolo
committed
c836ec1
View commit details
Copy full SHA for c836ec1
Browse repository at this point
♻️ Revert import renaming of BaseConfig, to reduce the diff
tiangolo
committed
3c6b7a9
View commit details
Copy full SHA for 3c6b7a9
Browse repository at this point
✏️ Fix typos in warning texts
tiangolo
committed
c7390e1
View commit details
Copy full SHA for c7390e1
Browse repository at this point
🔥 Remove unused imports
tiangolo
committed
3e45276
View commit details
Copy full SHA for 3e45276
Browse repository at this point
🔥 Remove unused utils
tiangolo
committed
eadf5bc
View commit details
Copy full SHA for eadf5bc
Browse repository at this point
🚚 Move NoArgAnyCallable type to main
tiangolo
committed
d35989a
View commit details
Copy full SHA for d35989a
Browse repository at this point
♻️ Refactor signature of get_config_value, require all keyword arguments
tiangolo
committed
ef8bbc6
View commit details
Copy full SHA for ef8bbc6
Browse repository at this point
🔥 Remove unused import
tiangolo
committed
9ba2e59
View commit details
Copy full SHA for 9ba2e59
Browse repository at this point
🔥 Remove unused type
tiangolo
committed
63a55a8
View commit details
Copy full SHA for 63a55a8
Browse repository at this point
⏪️ Revert removing class_dict_is_table until it's clear if it's needed or not
tiangolo
committed
f754390
View commit details
Copy full SHA for f754390
Browse repository at this point
💡 Add comments for next tasks
tiangolo
committed
4a3fea8
View commit details
Copy full SHA for 4a3fea8
Browse repository at this point
♻️ Refactor imports in main
tiangolo
committed
b763668
View commit details
Copy full SHA for b763668
Browse repository at this point
♻️ Tweak names and imports
tiangolo
committed
fb11285
View commit details
Copy full SHA for fb11285
Browse repository at this point
♻️ Refactor get_relationship_to to support more than one level of type unwrapping/origins
tiangolo
committed
aeabcf2
View commit details
Copy full SHA for aeabcf2
Browse repository at this point
🐛 Fix recursion for forward refs
tiangolo
committed
d6de622
View commit details
Copy full SHA for d6de622
Browse repository at this point
Commits on Nov 29, 2023
🔀 Merge branch 'main' into pv2-c
tiangolo
committed
1ee0482
View commit details
Copy full SHA for 1ee0482
Browse repository at this point
🐛 Fix detection of unions, detected by new Python 3.10 tests
tiangolo
committed
cb02fb2
View commit details
Copy full SHA for cb02fb2
Browse repository at this point
🔥 Remove unnecessary checks and overrides for class defaults
tiangolo
committed
0460f05
View commit details
Copy full SHA for 0460f05
Browse repository at this point
♻️ Refactor compat to run all conditionals at import time and not at every execution
tiangolo
committed
0187c36
View commit details
Copy full SHA for 0187c36
Browse repository at this point
🚚 Rename compat.py to _compat.py
tiangolo
committed
9249021
View commit details
Copy full SHA for 9249021
Browse repository at this point
Commits on Nov 30, 2023
🐛 Fix handling of Nonable unions
tiangolo
committed
d400fd7
View commit details
Copy full SHA for d400fd7
Browse repository at this point
✅ Simplify test that shoudln't require Pydantic v1 or v2
tiangolo
committed
9bb29aa
View commit details
Copy full SHA for 9bb29aa
Browse repository at this point
⬆️ Set minimum Pydantic version to 1.10.13
tiangolo
committed
edb051e
View commit details
Copy full SHA for edb051e
Browse repository at this point
Commits on Dec 3, 2023
🚚 Rename compat to _compat
tiangolo
committed
65d6b3e
View commit details
Copy full SHA for 65d6b3e
Browse repository at this point
🚚 Rename test
tiangolo
committed
f879c77
View commit details
Copy full SHA for f879c77
Browse repository at this point
✅ Refactor and update test
tiangolo
committed
baf8f47
View commit details
Copy full SHA for baf8f47
Browse repository at this point
✅ Update tests, revert broken JSON Schema as a workaround for new models without defaults
tiangolo
committed
8c603f1
View commit details
Copy full SHA for 8c603f1
Browse repository at this point
➕ Add dirty_equals to testing dependencies
tiangolo
committed
9f388f1
View commit details
Copy full SHA for 9f388f1
Browse repository at this point
✅ Update tests with compatibility for Pydantic v2 JSON Schema changes
tiangolo
committed
8d763da
View commit details
Copy full SHA for 8d763da
Browse repository at this point
✅ Update additional tests for compatibility with Pydantic v2
tiangolo
committed
553a3c5
View commit details
Copy full SHA for 553a3c5
Browse repository at this point
♻️ Refactor main and compat, restructure, simplify, and fix implementation, supporting table models without defaults, SQLAlchemy __init__ overrides
tiangolo
committed
f0d088c
View commit details
Copy full SHA for f0d088c
Browse repository at this point
♻️ Re-export Representation from _compat
tiangolo
committed
2806b38
View commit details
Copy full SHA for 2806b38
Browse repository at this point
♻️ Refactor imports
tiangolo
committed
08bd1ef
View commit details
Copy full SHA for 08bd1ef
Browse repository at this point
🚚 Update and rename symbols
tiangolo
committed
e07ada1
View commit details
Copy full SHA for e07ada1
Browse repository at this point
📝 Update docs, use Model.model_validate everywhere
tiangolo
committed
349a374
View commit details
Copy full SHA for 349a374
Browse repository at this point
♻️ Refactor and simplify main.py
tiangolo
committed
577ebb9
View commit details
Copy full SHA for 577ebb9
Browse repository at this point
♻️ Reimplement _calculate_keys in _compat.py
tiangolo
committed
f39bd8f
View commit details
Copy full SHA for f39bd8f
Browse repository at this point
🗑️ Add deprecation markers for methods
tiangolo
committed
4c38fb0
View commit details
Copy full SHA for 4c38fb0
Browse repository at this point
📝 Update reference to from_orm() in docs
tiangolo
committed
5eb99a3
View commit details
Copy full SHA for 5eb99a3
Browse repository at this point
♻️ Refactor source examples to use model_validate instead of from_orm
tiangolo
committed
b7f27aa
View commit details
Copy full SHA for b7f27aa
Browse repository at this point
🔀 Merge branch 'main' into pv2-c
tiangolo
committed
224e4ef
View commit details
Copy full SHA for 224e4ef
Browse repository at this point
📝 Add note about from_orm to the docs
tiangolo
committed
3070a1e
View commit details
Copy full SHA for 3070a1e
Browse repository at this point
✅ Tweak unreachable code coverage
tiangolo
committed
8ac7804
View commit details
Copy full SHA for 8ac7804
Browse repository at this point
♻️ Simplify logic for is_table_model_class
tiangolo
committed
ad5eb08
View commit details
Copy full SHA for ad5eb08
Browse repository at this point
✅ Add tests for deprecations
tiangolo
committed
0e74c50
View commit details
Copy full SHA for 0e74c50
Browse repository at this point
🐛 Fix implementation of sqlmodel_validate for Pydantic v1 with deprecated parse_obj with a dict
tiangolo
committed
cac622a
View commit details
Copy full SHA for cac622a
Browse repository at this point
✅ Tweak coverage for unreachable tests
tiangolo
committed
9d883f5
View commit details
Copy full SHA for 9d883f5
Browse repository at this point
Commits on Dec 4, 2023
🔀 Merge branch 'main' into pv2-c
tiangolo
committed
f28109f
View commit details
Copy full SHA for f28109f
Browse repository at this point
♻️ Update references to version 0.0.13 as latest
tiangolo
committed
cac349c
View commit details
Copy full SHA for cac349c
Browse repository at this point
🎨 Fix type annotations
tiangolo
committed
8d5e62b
View commit details
Copy full SHA for 8d5e62b
Browse repository at this point
✨ Add method model_dump for compatibility with Pydantic v1 while keeping v2 method names
tiangolo
committed
d03c233
View commit details
Copy full SHA for d03c233
Browse repository at this point
✨ Add override for .dict() only to deprecate it and help people migrate to model_dump, even (if) before they migrate to Pydantic v2
tiangolo
committed
be49ad5
View commit details
Copy full SHA for be49ad5
Browse repository at this point
📝 Update docs to use new method obj.model_dump() instead of obj.dict()
tiangolo
committed
10e4356
View commit details
Copy full SHA for 10e4356
Browse repository at this point
✅ Update tests
tiangolo
committed
30dbd40
View commit details
Copy full SHA for 30dbd40
Browse repository at this point
✅ Add tests for deprecated obj.dict()
tiangolo
committed
47d473d
View commit details
Copy full SHA for 47d473d
Browse repository at this point
🐛 Fix recursion in Pydantic v1
tiangolo
committed
fca1101
View commit details
Copy full SHA for fca1101
Browse repository at this point
👷 Run lints only on Pydantic v2
tiangolo
committed
f1ab6a6
View commit details
Copy full SHA for f1ab6a6
Browse repository at this point
🎨 Fix type annotations for Python 3.7
tiangolo
committed
f68e93e
View commit details
Copy full SHA for f68e93e
Browse repository at this point
⬇️ Downgrade dirty-equals for compatibility with Python 3.7
tiangolo
committed
3b2f955
View commit details
Copy full SHA for 3b2f955
Browse repository at this point
✅ Update tests to check for deprecation
tiangolo
committed
5f4d502
View commit details
Copy full SHA for 5f4d502
Browse repository at this point
🎨 Fix type annotation for Python 3.7
tiangolo
committed
b995766
View commit details
Copy full SHA for b995766
Browse repository at this point
🎨 Fix type annotations in _compat
tiangolo
committed
b3fcaf0
View commit details
Copy full SHA for b3fcaf0
Browse repository at this point
🎨 Fix type annotations for Python 3.7 in _compat
tiangolo
committed
7ab2fdc
View commit details
Copy full SHA for 7ab2fdc
Browse repository at this point
📌 Fix pin for Pydantic v1
tiangolo
committed
43fba36
View commit details
Copy full SHA for 43fba36
Browse repository at this point
🎨 Fix type ignores after fixing type annotations
tiangolo
committed
115d439
View commit details
Copy full SHA for 115d439
Browse repository at this point
🎨 Fix more type annotations
tiangolo
committed
f121b00
View commit details
Copy full SHA for f121b00
Browse repository at this point
Back
|
FazBrowse Home
|
New Git URL