diff --git a/doc/api/next_api_changes/deprecations/20209-AL.rst b/doc/api/next_api_changes/deprecations/20209-AL.rst new file mode 100644 index 000000000000..79c462cd048f --- /dev/null +++ b/doc/api/next_api_changes/deprecations/20209-AL.rst @@ -0,0 +1,3 @@ +``cbook.report_memory`` +~~~~~~~~~~~~~~~~~~~~~~~ +... is deprecated. Use ``psutil.virtual_memory`` instead. diff --git a/lib/matplotlib/cbook/__init__.py b/lib/matplotlib/cbook/__init__.py index 3e0d0062dd03..c8070e2b4ec8 100644 --- a/lib/matplotlib/cbook/__init__.py +++ b/lib/matplotlib/cbook/__init__.py @@ -628,6 +628,7 @@ def remove(self, o): self.push(elem) +@_api.deprecated("3.5", alternative="psutil.virtual_memory") def report_memory(i=0): # argument may go away """Return the memory consumed by the process.""" def call(command, os_name):