8000 Deprecate cbook.report_memory. · matplotlib/matplotlib@594f0bb · GitHub
[go: up one dir, main page]

Skip to content

Commit 594f0bb

Browse files
committed
Deprecate cbook.report_memory.
It's unrelated to Matplotlib's functionality, and more importantly it likely never worked on Py3 (currently raising "'int' object has no attribute 'split'") because the subprocess needs to be called with `universal_newlines=True`, otherwise (currently) stdout is returned as bytes and indexing that gives an int, not a str...
1 parent b6a6414 commit 594f0bb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
``cbook.report_memory``
2+
~~~~~~~~~~~~~~~~~~~~~~~
3+
... is deprecated. Use ``psutil.virtual_memory`` instead.

lib/matplotlib/cbook/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,7 @@ def remove(self, o):
628628
self.push(elem)
629629

630630

631+
@_api.deprecated("3.5", alternative="psutil.virtual_memory")
631632
def report_memory(i=0): # argument may go away
632633
"""Return the memory consumed by the process."""
633634
def call(command, os_name):

0 commit comments

Comments
 (0)
0