Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1c0dd84

Browse filesBrowse files
authored
Merge pull request #13765 from meeseeksmachine/auto-backport-of-pr-13761-on-v3.1.x
Backport PR #13761 on branch v3.1.x (Deprecate verbose-related rcParams.)
2 parents ce7c539 + 73826f4 commit 1c0dd84
Copy full SHA for 1c0dd84

File tree

Expand file treeCollapse file tree

5 files changed

+21
-59
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+21
-59
lines changed
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Deprecations
2+
````````````
3+
4+
The ``verbose.fileo`` and ``verbose.level`` rcParams, which have had no effect
5+
ever since the switch from Matplotlib's old custom Verbose logging to the
6+
stdlib's `logging` module, are deprecated.
7+
8+
The ``rcsetup.validate_verbose`` function is deprecated.

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+2-13Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,8 @@ def gen_candidates():
705705
_deprecated_remain_as_none = {
706706
'text.latex.unicode': ('3.0',),
707707
'savefig.frameon': ('3.1',),
708+
'verbose.fileo': ('3.1',),
709+
'verbose.level': ('3.1',),
708710
}
709711

710712

@@ -928,19 +930,6 @@ def _rc_params_in_file(fname, fail_on_error=False):
928930

929931
config = RcParams()
930932

931-
for key in ('verbose.level', 'verbose.fileo'):
932-
if key in rc_temp:
933-
val, line, cnt = rc_temp.pop(key)
934-
if fail_on_error:
935-
config[key] = val # try to convert to proper type or raise
936-
else:
937-
try:
938-
config[key] = val # try to convert to proper type or skip
939-
except Exception as msg:
940-
error_details = _error_details_fmt % (cnt, line, fname)
941-
_log.warning('Bad val %r on %s\n\t%s',
942-
val, error_details, msg)
943-
944933
for key, (val, line, cnt) in rc_temp.items():
945934
if key in defaultParams:
946935
if fail_on_error:

‎lib/matplotlib/mpl-data/stylelib/_classic_test.mplstyle

Copy file name to clipboardExpand all lines: lib/matplotlib/mpl-data/stylelib/_classic_test.mplstyle
-21Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -448,27 +448,6 @@ svg.fonttype : path # How to handle SVG fonts:
448448
# 'none': Assume fonts are installed on the machine where the SVG will be viewed.
449449
# 'path': Embed characters as paths -- supported by most SVG renderers
450450

451-
452-
# Set the verbose flags. This controls how much information
453-
# matplotlib gives you at runtime and where it goes. The verbosity
454-
# levels are: silent, helpful, debug, debug-annoying. Any level is
455-
# inclusive of all the levels below it. If your setting is "debug",
456-
# you'll get all the debug and helpful messages. When submitting
457-
# problems to the mailing-list, please set verbose to "helpful" or "debug"
458-
# and paste the output into your report.
459-
#
460-
# The "fileo" gives the destination for any calls to verbose.report.
461-
# These objects can a filename, or a filehandle like sys.stdout.
462-
#
463-
# You can override the rc default verbosity from the command line by
464-
# giving the flags --verbose-LEVEL where LEVEL is one of the legal
465-
# levels, e.g., --verbose-helpful.
466-
#
467-
# You can access the verbose instance in your code
468-
# from matplotlib import verbose.
469-
verbose.level : silent # one of silent, helpful, debug, debug-annoying
470-
verbose.fileo : sys.stdout # a log filename, sys.stdout or sys.stderr
471-
472451
# Event keys to interact with figures/plots via keyboard.
473452
# Customize these settings according to your needs.
474453
# Leave the field(s) empty if you don't need a key-map. (i.e., fullscreen : '')

‎lib/matplotlib/mpl-data/stylelib/classic.mplstyle

Copy file name to clipboardExpand all lines: lib/matplotlib/mpl-data/stylelib/classic.mplstyle
-21Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -452,27 +452,6 @@ svg.fonttype : path # How to handle SVG fonts:
452452
# 'none': Assume fonts are installed on the machine where the SVG will be viewed.
453453
# 'path': Embed characters as paths -- supported by most SVG renderers
454454

455-
456-
# Set the verbose flags. This controls how much information
457-
# matplotlib gives you at runtime and where it goes. The verbosity
458-
# levels are: silent, helpful, debug, debug-annoying. Any level is
459-
# inclusive of all the levels below it. If your setting is "debug",
460-
# you'll get all the debug and helpful messages. When submitting
461-
# problems to the mailing-list, please set verbose to "helpful" or "debug"
462-
# and paste the output into your report.
463-
#
464-
# The "fileo" gives the destination for any calls to verbose.report.
465-
# These objects can a filename, or a filehandle like sys.stdout.
466-
#
467-
# You can override the rc default verbosity from the command line by
468-
# giving the flags --verbose-LEVEL where LEVEL is one of the legal
469-
# levels, e.g., --verbose-helpful.
470-
#
471-
# You can access the verbose instance in your code
472-
# from matplotlib import verbose.
473-
verbose.level : silent # one of silent, helpful, debug, debug-annoying
474-
verbose.fileo : sys.stdout # a log filename, sys.stdout or sys.stderr
475-
476455
# Event keys to interact with figures/plots via keyboard.
477456
# Customize these settings according to your needs.
478457
# Leave the field(s) empty if you don't need a key-map. (i.e., fullscreen : '')

‎lib/matplotlib/rcsetup.py

Copy file name to clipboardExpand all lines: lib/matplotlib/rcsetup.py
+11-4Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -472,15 +472,22 @@ def validate_font_properties(s):
472472
validate_mathtext_default = ValidateInStrings(
473473
'default',
474474
"rm cal it tt sf bf default bb frak circled scr regular".split())
475-
validate_verbose = ValidateInStrings(
476-
'verbose',
477-
['silent', 'helpful', 'debug', 'debug-annoying'])
478475
_validate_alignment = ValidateInStrings(
479476
'alignment',
480477
['center', 'top', 'bottom', 'baseline',
481478
'center_baseline'])
482479

483480

481+
_validate_verbose = ValidateInStrings(
482+
'verbose',
483+
['silent', 'helpful', 'debug', 'debug-annoying'])
484+
485+
486+
@cbook.deprecated("3.1")
487+
def validate_verbose(s):
488+
return _validate_verbose(s)
489+
490+
484491
def validate_whiskers(s):
485492
if s == 'range':
486493
return 'range'
@@ -1006,7 +1013,7 @@ def _validate_linestyle(ls):
10061013
'timezone': ['UTC', validate_string],
10071014

10081015
# the verbosity setting
1009-
'verbose.level': ['silent', validate_verbose],
1016+
'verbose.level': ['silent', _validate_verbose],
10101017
'verbose.fileo': ['sys.stdout', validate_string],
10111018

10121019
# line props

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.