Skip to content

Commit 72b5883

Browse files
committed
Expire deprecation of mathtext.fallback_to_cm.
1 parent 06dc612 commit 72b5883

File tree

5 files changed

+3
-29
lines changed

5 files changed

+3
-29
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
The ``mathtext.fallback_to_cm`` rcParams
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
... has been removed. Use :rc:`mathtext.fallback` instead.

lib/matplotlib/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,6 @@ def gen_candidates():
536536
'animation.avconv_path': ('3.3',),
537537
'animation.avconv_args': ('3.3',),
538538
'animation.html_args': ('3.3',),
539-
'mathtext.fallback_to_cm': ('3.3',),
540539
'keymap.all_axes': ('3.3',),
541540
'savefig.jpeg_quality': ('3.3',),
542541
'text.latex.preview': ('3.3',),

lib/matplotlib/_mathtext.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,9 +456,6 @@ class UnicodeFonts(TruetypeFonts):
456456
def __init__(self, *args, **kwargs):
457457
# This must come first so the backend's owner is set correctly
458458
fallback_rc = mpl.rcParams['mathtext.fallback']
459-
if mpl.rcParams['mathtext.fallback_to_cm'] is not None:
460-
fallback_rc = ('cm' if mpl.rcParams['mathtext.fallback_to_cm']
461-
else None)
462459
font_cls = {'stix': StixFonts,
463460
'stixsans': StixSansFonts,
464461
'cm': BakomaFonts

lib/matplotlib/rcsetup.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -463,23 +463,6 @@ def validate_font_properties(s):
463463
return s
464464

465465

466-
def _validate_mathtext_fallback_to_cm(b):
467-
"""
468-
Temporary validate for fallback_to_cm, while deprecated
469-
470-
"""
471-
if isinstance(b, str):
472-
b = b.lower()
473-
if b is None or b == 'none':
474-
return None
475-
else:
476-
_api.warn_deprecated(
477-
"3.3", message="Support for setting the 'mathtext.fallback_to_cm' "
478-
"rcParam is deprecated since %(since)s and will be removed "
479-
"%(removal)s; use 'mathtext.fallback : 'cm' instead.")
480-
return validate_bool_maybe_none(b)
481-
482-
483466
def _validate_mathtext_fallback(s):
484467
_fallback_fonts = ['cm', 'stix', 'stixsans']
485468
if isinstance(s, str):
@@ -1119,7 +1102,6 @@ def _convert_validator_spec(key, conv):
11191102
"stixsans", "custom"],
11201103
"mathtext.default": ["rm", "cal", "it", "tt", "sf", "bf", "default",
11211104
"bb", "frak", "scr", "regular"],
1122-
"mathtext.fallback_to_cm": _validate_mathtext_fallback_to_cm,
11231105
"mathtext.fallback": _validate_mathtext_fallback,
11241106

11251107
"image.aspect": validate_aspect, # equal, auto, a number
@@ -1440,7 +1422,6 @@ def _convert_validator_spec(key, conv):
14401422
"animation.avconv_path": "avconv",
14411423
"animation.avconv_args": [],
14421424
"animation.html_args": [],
1443-
"mathtext.fallback_to_cm": None,
14441425
"keymap.all_axes": ["a"],
14451426
"savefig.jpeg_quality": 95,
14461427
"text.latex.preview": False,

lib/matplotlib/tests/test_mathtext.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,6 @@ def test_mathtext_fallback_invalid():
337337
mpl.rcParams['mathtext.fallback'] = fallback
338338

339339

340-
def test_mathtext_fallback_to_cm_invalid():
341-
for fallback in [True, False]:
342-
with pytest.warns(_api.MatplotlibDeprecationWarning):
343-
mpl.rcParams['mathtext.fallback_to_cm'] = fallback
344-
345-
346340
@pytest.mark.parametrize(
347341
"fallback,fontlist",
348342
[("cm", ['DejaVu Sans', 'mpltest', 'STIXGeneral', 'cmr10', 'STIXGeneral']),

0 commit comments

Comments
 (0)