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
Pydantic V2 blog #4218
Merged
Merged
Pydantic V2 blog #4218
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
5bdecf9
first draft of pydantic V2 blog
samuelcolvin 5bb1ebb
more blog
samuelcolvin 1296848
blog rendering and formatting
samuelcolvin 1dd4ad7
more section
samuelcolvin 3a77a57
completing conversion table
samuelcolvin 8f6a9ef
prompt build
samuelcolvin eac0367
reviewing blog post
samuelcolvin 24c4167
more reviewing and extending
samuelcolvin 5bbea1f
recommendations from @Rabscuttler and @PrettyWood
samuelcolvin f0043eb
add implementation details and more suggestions
samuelcolvin 022a008
comment about breaking changes
samuelcolvin c35c1df
convert namespae to table, more removals
samuelcolvin 5d9988f
Apply suggestions from code review by @tiangolo
samuelcolvin ed6d7b1
feedback from @tiangolo's review
samuelcolvin 1326ab5
changes from @adriangb's review
samuelcolvin 83fe30c
Apply suggestions from code review
samuelcolvin a7bd04b
convert namespace info to psuedo-code
samuelcolvin be88158
rename property, remove schema_json()
samuelcolvin c8ba8f1
adding validation context
samuelcolvin f97b082
remove 'model_schema_json', take 2
samuelcolvin 4acf85d
more tweaks while reviewing
samuelcolvin 80ea6d7
comment about pypy and tagged unions
samuelcolvin c9c13dc
add thanks :prey:, prepare for release
samuelcolvin 6551432
suggestions from @PrettyWood
samuelcolvin 1808116
suggestions from @PrettyWood, model_dump_json comment
samuelcolvin File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm game! Haha 😅
I think it's gonna be challenging but I'm confident is solvable/doable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it's not like anything breaks here if you make no changes - just extra functionality if you do...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we might need to add another method to models like
I guess
model_prepare_context
doesn't even need to onBaseModel
, you just document in FastAPI that if it's defined, it'll be called with dependency resolution to prepare context?Up to you, but I'm very happy to add something like this to pydantic if it helps FastAPI.