-
Notifications
You must be signed in to change notification settings - Fork 104
Pydantic contrib module #757
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
Merged
Merged
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
5ccd08e
Copy of pydantic v1 converter from samples-python
dandavison afa8184
Cleanup
dandavison 5ccd203
update pydantic to v2
dandavison e8b6f01
Drive-by: use zip_longest
dandavison 33b7980
Get rid of pydantic sandbox hack
dandavison 7af32c1
Expand test coverage
dandavison f071373
Implement type converter and __get_pydantic_core_schema__
dandavison 32b74da
Rename
dandavison 24f89de
Clean up
dandavison cc1d8f5
Extend test coverage
dandavison adea382
Add test of mixed type inputs
dandavison 0a9e3f6
Use v2 API to_jsonable_python
dandavison 3c0a857
Use JSONEncoder
dandavison b853549
Cleanup
dandavison 4e95208
README
dandavison e769fe8
Retain hack for backwards compatiblity
dandavison aa4affb
Hack: unbreak instantiation of pydantic models
dandavison 9e4d0a1
Test pydantic usage in workflow
dandavison 62bdfcc
Don't restrict datetime instances
dandavison 941065d
Only use pydantic in sandbox if it can be imported
dandavison bd22c07
Expand tests
dandavison 781e080
Fix __get_pydantic_core_schema__ implementation
dandavison eb60fe6
TEST FAILURE: Refactor tests and use two models
dandavison ccdbe0f
One model
dandavison c1ba55b
Refactor tests
dandavison 2811d64
test date
dandavison 825fec4
Don't restrict date instances
dandavison e1da664
Test timedelta
dandavison d39ce6e
Revert "Test timedelta"
dandavison 3287edf
Rename
dandavison 5d0a3e4
test timedelta
dandavison c31569b
test union field
dandavison 3f44ffa
test type hints
dandavison 1928274
Test dunder methods
dandavison 11ee007
Organize tests
dandavison dbba4ce
Test pathlib.Path
dandavison c92486d
Fix pathlib.Path usage
dandavison f52c2e8
Delete redundant fix
dandavison 298ee64
Remove redundant isinstance check
dandavison d2a956a
Deduplicate tests
dandavison 725792f
Clean up
dandavison 7032a70
Expand
dandavison 4005a65
Clean up
dandavison 815fa84
Disable field types that don't work
dandavison aa4ad22
Expand
dandavison 6b1bfd1
Test special instead of standard model
dandavison 7534a7d
datetime variants
dandavison 2f1e17e
Add date datetime
dandavison 747454b
Time fields
dandavison f94acf0
Revert "Test special instead of standard model"
dandavison 3959a83
namedtuple
dandavison 9ec4c34
sequence field
dandavison 8508be5
iterable field
dandavison 3df3c92
TypedDict
dandavison 15ba77d
Expand tests
dandavison 9fc5d77
Always pass through typing_extensions
dandavison 5c6e44c
Make activities generic
dandavison 1b2b731
Revert "Make activities generic"
dandavison 634fe80
Reduce tests
dandavison 899b92c
Expand tests
dandavison be5f569
Test union fields
dandavison 61e75af
Complex custom type
dandavison 02d5d98
Test complex union
dandavison 706f5f2
Rename
dandavison 0ce76b7
Use non-list input
dandavison 0470592
Fix lint
dandavison e1080c7
Reorganize
dandavison 62b2ee5
Define some models inside the sandbox and some outside
dandavison b2e3487
lint
dandavison a544224
Warn pydantic users who are not using contrib.pydantic
dandavison 4d109c7
Cleanup
dandavison 90ce448
Support pydantic v1 and v2
dandavison be3b8f8
Drop v1 support in data converter
dandavison d3b525a
Drop v2 support outside contrib
dandavison 89758fd
README
dandavison 24d489c
Include pydantic extra
dandavison 7e7c6d4
date instances are no longer proxied
dandavison 3de8f28
Fix tests on Windows
dandavison b2f62de
doctoc
dandavison 975a1fc
Restrict pydantic range to v2 in pyproject.toml
dandavison 17c06ec
Fix warning message
dandavison d45bbcd
Failing test for strict mode
dandavison 5cf962f
Hand over entirely to pydantic
dandavison b6d3336
Test round-trip misc top-level objects
dandavison 051b003
Define special types model in the sandbox
dandavison b61d06e
Test strict versions of some models
dandavison 7c7529c
Fix link
dandavison 23c88e8
Add more misc standard lib types to test
dandavison b3c7d73
Failing test
dandavison 0e13cfa
Handle absence of type hint
dandavison 512bd7b
Allow pydantic ValidationError to be thrown out
dandavison e91c90d
Test ValidationError
dandavison f5ee416
Fixup
dandavison 616c78f
Cleanup
dandavison a8fb520
Test defaultdict support
dandavison 771de5c
Fix docstrings
dandavison File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.