Skip to content
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

fix: local namespace limit size and unhashable types #80

Merged
merged 1 commit into from
Oct 30, 2022
Merged

Conversation

jg-rp
Copy link
Owner

@jg-rp jg-rp commented Oct 29, 2022

This pull request fixes #79 by not building a set from a render context's local namespace values when calculating its size. I'm not sure what I was thinking there 😞.

I also recognise that using sys.getsizeof() to calculate the "size" of a render context namespace is not always appropriate. Context._get_size_of_locals() has been renamed to Context.get_size_of_locals() and is now considered part of the public API. See the comments on issue #79 for an example of customizing the local namespace limit calculation by overriding Context.get_size_of_locals().

@jg-rp jg-rp merged commit a728ee8 into main Oct 30, 2022
@jg-rp jg-rp deleted the issue79 branch December 23, 2022 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_get_size_of_locals fails for non-hashable values
1 participant