Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.2k
Addexperimental_allow_partial
support#10748
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codspeed-hqbot commentedOct 31, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
CodSpeed Performance ReportMerging#10748 willnot alter performanceComparing Summary
|
cloudflare-workers-and-pagesbot commentedOct 31, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Deploying pydantic-docs with |
Latest commit: | 3ea36b0 |
Status: | ✅ Deploy successful! |
Preview URL: | https://ad0fa9a1.pydantic-docs.pages.dev |
Branch Preview URL: | https://allow-partial.pydantic-docs.pages.dev |
github-actionsbot commentedOct 31, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
experimental_allow_partial
support toTypeAdapter
experimental_allow_partial
supportThere 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.
This is super exciting overall - definitely a fan of theexperimental_
prefix for now. I'm impressed with the turnaround here.
A few follow up questions:
- We should add a section to the
experimental
docs talking about this flag (happy to have this between the beta and official release) - I'm wondering, does it make sense to only have this as a runtime flag? Should we also have a config setting for this - we have one for
cache_strings
, which I believe has a similar flow down tojitter
? Even if not on config, I think we should make this accessible for fields in models, typed dicts, etc.
As a general note on the above, I feel we don't have a super clear system for when something belongs as a:
- Runtime flag
- Config setting
- Annotation
Field
setting
And we should probably document that to guide consistency in future development.
Uh oh!
There was an error while loading.Please reload this page.
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.
1 files reviewed, 2 total issue(s) found.
The style guide flagged several spelling errors that seemed like false positives. We skipped posting inline suggestions for the following words:
- [Aa]nnotated_types
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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.
The style guide flagged several spelling errors that seemed like false positives. We skipped posting inline suggestions for the following words:
- annotated_types
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.
1 files reviewed, 3 total issue(s) found.
Uh oh!
There was an error while loading.Please reload this page.
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.
1 files reviewed, 3 total issue(s) found.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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.
The style guide flagged several spelling errors that seemed like false positives. We skipped posting inline suggestions for the following words:
- jiter
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.
Amazing!
Thanks for including such thorough docs - those will be easy to move to the concepts section, eventually!
678ec30
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
This relies on:
JsonValue
jiter#157allow_partial
pydantic-core#1512So far
allow_partial
support is only implemented on validators for the following types:list
set
frozenset
dict
(e.g.dict[X, Y]
)TypedDict
There are 2 fundamental things introduced:
[1, 2, "thr
Example: