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
Vendor pympler.asizeof
#7193
Vendor pympler.asizeof
#7193
Conversation
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.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
Thanks for the contribution @rudyardrichter! At a quick glance, this LGTM, but I'll want to double check the diff between the vendored One other small ask: could you write a quick summary of what was removed from the original |
Thanks @vdonato! I added a snippet to the docstring. |
|
||
The original module docstring that appears in pympler follows; note that some of | ||
it no longer pertains here, but it's preserved to document implementation | ||
details. |
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.
Not a must, just a nit pick.
@rudyardrichter possibly should change this to be code comments instead of being within triple quotes as using this format clobbers the original python module docstring.
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 it's probably fine to clobber it since this one is the documentation as relevant to streamlit
, but I could see going either way with 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.
Yup, happy to defer here 🙂
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.
Thanks for the help with this one @rudyardrichter and @SimonBiggs!
We'll have this change out with v1.27.0
* Vendor pympler.asizeof module * Remove pympler from min constraints * Explain differences from original asizeof module * include * Ignore mypy errors within asizeof.py * Fix asizeof usage in cache_resource_api * Have CodeQL ignore vendored Python code --------- Co-authored-by: SimonBiggs <simon@anthropic.com> Co-authored-by: Vincent Donato <vincent@streamlit.io>
* Vendor pympler.asizeof module * Remove pympler from min constraints * Explain differences from original asizeof module * include * Ignore mypy errors within asizeof.py * Fix asizeof usage in cache_resource_api * Have CodeQL ignore vendored Python code --------- Co-authored-by: SimonBiggs <simon@anthropic.com> Co-authored-by: Vincent Donato <vincent@streamlit.io>
* Vendor pympler.asizeof module * Remove pympler from min constraints * Explain differences from original asizeof module * include * Ignore mypy errors within asizeof.py * Fix asizeof usage in cache_resource_api * Have CodeQL ignore vendored Python code --------- Co-authored-by: SimonBiggs <simon@anthropic.com> Co-authored-by: Vincent Donato <vincent@streamlit.io>
To resolve #7131. This adds pympler's
asizeof
module tovendor
and removes thepympler
dependency.For testing plan: I expect this is covered by existing tests since this is an in-place replacement which already has test coverage.
The changes to the original pympler code are pretty minimal—let me know if further cleanup would be appreciated! I removed some things that were clearly unnecessary to support only
asizeof
but didn't look too closely otherwise.