-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Make __signature__
a lazy property, do not deepcopy defaults
#10818
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
Also follow stdlib dataclasses for signature parameter defaults. If a default factory is used, the placeholder `'<factory>'` is used.
Deploying pydantic-docs with
|
Latest commit: |
fda5e91
|
Status: | ✅ Deploy successful! |
Preview URL: | https://232345cd.pydantic-docs.pages.dev |
Branch Preview URL: | https://model-signature.pydantic-docs.pages.dev |
CodSpeed Performance ReportMerging #10818 will improve performances by 11.23%Comparing Summary
Benchmarks breakdown
|
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.
This is promising - are there more class attributes for which we could do this? Gives us a nice boost on schema builds :)
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
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.
Very impressed with this implementation, good find.
Feel free to merge at your leisure.
Also follow stdlib dataclasses for signature parameter defaults. If a default factory is used, the placeholder
'<factory>'
is used.Related issue number
Fixes #10771, #10656
Checklist