File tree Expand file tree Collapse file tree 4 files changed +20
-2
lines changed
Filter options
Expand file tree Collapse file tree 4 files changed +20
-2
lines changed
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ dependencies:
19
19
- pillow>=6.2
20
20
- pybind11>=2.6.0
21
21
- pygobject
22
- - pyparsing!= 3.1.0
22
+ - pyparsing>=2. 3.1
23
23
- pyqt
24
24
- python-dateutil>=2.1
25
25
- setuptools
Original file line number Diff line number Diff line change 9
9
from typing import Any
10
10
11
11
import numpy as np
12
+ from packaging .version import parse as parse_version
13
+ import pyparsing
12
14
import pytest
13
15
16
+
14
17
import matplotlib as mpl
15
18
from matplotlib .testing .decorators import check_figures_equal , image_comparison
16
19
import matplotlib .pyplot as plt
17
20
from matplotlib import mathtext , _mathtext
18
21
22
+ pyparsing_version = parse_version (pyparsing .__version__ )
23
+
19
24
20
25
# If test is removed, use None as placeholder
21
26
math_tests = [
@@ -279,6 +284,9 @@ def test_fontinfo():
279
284
assert table ['version' ] == (1 , 0 )
280
285
281
286
287
+ # See gh-26152 for more context on this xfail
288
+ @pytest .mark .xfail (pyparsing_version .release == (3 , 1 , 0 ),
289
+ reason = "Error messages are incorrect for this version" )
282
290
@pytest .mark .parametrize (
283
291
'math, msg' ,
284
292
[
Original file line number Diff line number Diff line change 4
4
5
5
import numpy as np
6
6
from numpy .testing import assert_almost_equal
7
+ from packaging .version import parse as parse_version
8
+ import pyparsing
7
9
import pytest
8
10
9
11
import matplotlib as mpl
16
18
from matplotlib .testing ._markers import needs_usetex
17
19
from matplotlib .text import Text , Annotation
18
20
21
+ pyparsing_version = parse_version (pyparsing .__version__ )
22
+
19
23
20
24
@image_comparison (['font_styles' ])
21
25
def test_font_styles ():
@@ -818,6 +822,9 @@ def test_unsupported_script(recwarn):
818
822
(r"Matplotlib currently does not support Bengali natively." ,)])
819
823
820
824
825
+ # See gh-26152 for more information on this xfail
826
+ @pytest .mark .xfail (pyparsing_version .release == (3 , 1 , 0 ),
827
+ reason = "Error messages are incorrect with pyparsing 3.1.0" )
821
828
def test_parse_math ():
822
829
fig , ax = plt .subplots ()
823
830
ax .text (0 , 0 , r"$ \wrong{math} $" , parse_math = False )
@@ -828,6 +835,9 @@ def test_parse_math():
828
835
fig .canvas .draw ()
829
836
830
837
838
+ # See gh-26152 for more information on this xfail
839
+ @pytest .mark .xfail (pyparsing_version .release == (3 , 1 , 0 ),
840
+ reason = "Error messages are incorrect with pyparsing 3.1.0" )
831
841
def test_parse_math_rcparams ():
832
842
# Default is True
833
843
fig , ax = plt .subplots ()
Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ def make_release_tree(self, base_dir, files):
335
335
"numpy>=1.21" ,
336
336
"packaging>=20.0" ,
337
337
"pillow>=6.2.0" ,
338
- "pyparsing>=2.3.1,<3.1 " ,
338
+ "pyparsing>=2.3.1" ,
339
339
"python-dateutil>=2.7" ,
340
340
] + (
341
341
# Installing from a git checkout that is not producing a wheel.
You can’t perform that action at this time.
0 commit comments