-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Raise a deprecation warning when a field is annotated as final with a default value #11168
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
Deploying pydantic-docs with
|
| Latest commit: |
d4fc9f1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f378e618.pydantic-docs.pages.dev |
| Branch Preview URL: | https://11119-1.pydantic-docs.pages.dev |
CodSpeed Performance ReportMerging #11168 will not alter performanceComparing Summary
|
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||
… default value Also adapt the `collect_model_fields` logic a bit.
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.
Nice work on the refactor using assigned_value instead of re-fetching depending on the branch you hit.
LGTM overall, I left a few minor change requests.
|
Do we know why we treated finalvars with defaults as classvars in the past? |
As per the PR that implemented this:
|
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.
Feedback looks good
Also adapt the
collect_model_fieldslogic a bit.Part of #11119.
Change Summary
Related issue number
Checklist