Restore cbook.report_memory, which was deleted in d063dee. #6944

Merged
merged 1 commit into from Aug 20, 2016

Conversation

Projects
None yet
2 participants
Owner

efiring commented Aug 12, 2016

There was no deprecation process, and having something like this
available as an import is very valuable to users suspecting a
memory leak, or simply needing to track memory usage.

@efiring efiring Restore cbook.report_memory, which was deleted in d063dee.
There was no deprecation process, and having something like this
available as an import is very valuable to users suspecting a
memory leak, or simply needing to track memory usage.
3dbd343
Owner

efiring commented Aug 12, 2016

As an example of why we need this, or a good replacement, see #6940.

Owner

tacaswell commented Aug 13, 2016

It looks like the loop from https://github.com/matplotlib/matplotlib/pull/5360/files#diff-84d254616071e10903ac389d05d109deR36 should be exposed as a cbook function as well?

Owner

tacaswell commented Aug 13, 2016

re-milestoned as 2.1 because this has only been removed on master (https://github.com/matplotlib/matplotlib/blob/v2.x/lib/matplotlib/cbook.py#L1439)

Owner

efiring commented Aug 15, 2016

@tacaswell, yes, it would be nice to have the whole run_memleak_test() function available as an import, but it relies on a python 3.4+ import, and psutil. We could put it in cbook within a try-except block beginning with the tracemalloc and psutil imports.

Owner

tacaswell commented Aug 20, 2016

Merging this as-is as the alternative is much more work than I anticipated due to py3 only imports.

@tacaswell tacaswell merged commit b7b3445 into matplotlib:master Aug 20, 2016

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 70.733%
Details

tacaswell removed the needs_review label Aug 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment