-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Deprecate passing a dict to the Examples class
#10181
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
Conversation
Add the necessary deprecation and user warnings Update tests
Deploying pydantic-docs with
|
| Latest commit: |
28dae6b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://5d85676f.pydantic-docs.pages.dev |
| Branch Preview URL: | https://json-schema-examples.pydantic-docs.pages.dev |
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.
Looks great, just one change request. Thanks!
pydantic/json_schema.py
Outdated
| warnings.warn( | ||
| 'Updating existing JSON Schema examples of type dict with examples of type list. ' | ||
| 'Only the existing examples values will be retained.', | ||
| UserWarning, | ||
| ) |
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.
Let's warn here (and on the next one) that dict is deprecated as well - I realize this will be raised in a separate warning, but I think it makes sense to reiterate in this one.
CodSpeed Performance ReportMerging #10181 will not alter performanceComparing Summary
|
|
Great, go ahead and merge when you're ready 👍 |
Add the necessary deprecation and user warnings
Update tests
Fixes #8732
Change Summary
Related issue number
Checklist