-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Remove defaults filter for namespace #10261
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: |
8ceda20
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://89f2ee49.pydantic-docs.pages.dev |
| Branch Preview URL: | https://remove-defaults-filter.pydantic-docs.pages.dev |
|
With this change: Effectively, reverting #10136, which increased memory usage + didn't simplify debugging all that much. |
|
One question - do we need to copy the |
CodSpeed Performance ReportMerging #10261 will not alter performanceComparing Summary
|
|
Seems like this also improves performance.
We don't do any mutations on the types namespace so I don't think we should introduce any extra overhead. |
samuelcolvin
left a comment
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 think this looks good.
@sydney-runkle can you add a comment explaining why we're not copying or f_locals and that it must not be mutated.
We could return Mapping[str, Any] then have implement our own FrozenMapping type that holds frame.f_locals internally but stops it being accidentally modified, but maybe that's over kill.
@davidhewitt maybe you should look at this too.

Alternative to #10260 re memory usage.