Skip to content

Backport PR #10726 on branch v2.2.x #10759

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

Merged
merged 1 commit into from
Mar 12, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def _is_writable_dir(p):
return os.access(p, os.W_OK) and os.path.isdir(p)

_verbose_msg = """\
matplotlib.verbose is deprecated;
Command line argument --verbose-LEVEL is deprecated.
This functionality is now provided by the standard
python logging library. To get more (or less) logging output:
Expand Down Expand Up @@ -288,7 +289,6 @@ def _parse_commandline():
_parse_commandline()


@cbook.deprecated("2.2", message=_verbose_msg)
class Verbose(object):
"""
A class to handle reporting. Set the fileo attribute to any file
Expand All @@ -311,10 +311,12 @@ class Verbose(object):
if level_str in levels:
_commandLineVerbose = level_str

@cbook.deprecated("2.2", message=_verbose_msg)
def __init__(self):
self.set_level('silent')
self.fileo = sys.stdout

@cbook.deprecated("2.2", message=_verbose_msg)
def set_level(self, level):
'set the verbosity to one of the Verbose.levels strings'

Expand All @@ -326,6 +328,7 @@ def set_level(self, level):
else:
self.level = level

@cbook.deprecated("2.2", message=_verbose_msg)
def set_fileo(self, fname):
std = {
'sys.stdout': sys.stdout,
Expand All @@ -343,6 +346,7 @@ def set_fileo(self, fname):
else:
self.fileo = fileo

@cbook.deprecated("2.2", message=_verbose_msg)
def report(self, s, level='helpful'):
"""
print message s to self.fileo if self.level>=level. Return
Expand All @@ -354,6 +358,7 @@ def report(self, s, level='helpful'):
return True
return False

@cbook.deprecated("2.2", message=_verbose_msg)
def wrap(self, fmt, func, level='helpful', always=True):
"""
return a callable function that wraps func and reports it
Expand All @@ -377,6 +382,7 @@ def wrapper(*args, **kwargs):
wrapper.__doc__ = func.__doc__
return wrapper

@cbook.deprecated("2.2", message=_verbose_msg)
def ge(self, level):
'return true if self.level is >= level'
return self.vald[self.level] >= self.vald[level]
Expand Down