1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
--- contrib/python/matplotlib/py3/matplotlib/_fontconfig_pattern.py (index)
+++ contrib/python/matplotlib/py3/matplotlib/_fontconfig_pattern.py (working tree)
@@ -85,11 +85,11 @@ def parse_fontconfig_pattern(pattern):
"""
parser = _make_fontconfig_parser()
try:
- parse = parser.parseString(pattern)
+ parse = parser.parse_string(pattern)
except ParseException as err:
# explain becomes a plain method on pyparsing 3 (err.explain(0)).
raise ValueError("\n" + ParseException.explain(err, 0)) from None
- parser.resetCache()
+ parser.reset_cache()
props = {}
if "families" in parse:
props["family"] = [*map(_family_unescape, parse["families"])]
--- contrib/python/matplotlib/py3/matplotlib/_mathtext.py (index)
+++ contrib/python/matplotlib/py3/matplotlib/_mathtext.py (working tree)
@@ -42,7 +42,7 @@ if T.TYPE_CHECKING:
from collections.abc import Iterable
from .ft2font import Glyph
-ParserElement.enablePackrat()
+ParserElement.enable_packrat()
_log = logging.getLogger("matplotlib.mathtext")
@@ -2159,7 +2159,7 @@ class Parser:
ParserState(fonts_object, 'default', 'rm', fontsize, dpi)]
self._em_width_cache: dict[tuple[str, float, float], float] = {}
try:
- result = self._expression.parseString(s)
+ result = self._expression.parse_string(s)
except ParseBaseException as err:
# explain becomes a plain method on pyparsing 3 (err.explain(0)).
raise ValueError("\n" + ParseException.explain(err, 0)) from None
@@ -2167,7 +2167,7 @@ class Parser:
self._in_subscript_or_superscript = False
# prevent operator spacing from leaking into a new expression
self._em_width_cache = {}
- ParserElement.resetCache()
+ ParserElement.reset_cache()
return T.cast(Hlist, result[0]) # Known return type from main.
def get_state(self) -> ParserState:
@@ -2186,7 +2186,7 @@ class Parser:
return [Hlist(toks.asList())]
def math_string(self, toks: ParseResults) -> ParseResults:
- return self._math_expression.parseString(toks[0][1:-1], parseAll=True)
+ return self._math_expression.parse_string(toks[0][1:-1], parseAll=True)
def math(self, toks: ParseResults) -> T.Any:
hlist = Hlist(toks.asList())
|