Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit5bdac1d

Browse files
authored
Merge pull request#26431 from ksunden/pyparsing_pin
MNT: Unpin pyparsing, xfail error message tests for pyparsing 3.1.0
2 parentsc387fb1 +7d070b8 commit5bdac1d

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

‎environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
-pillow>=6.2
2020
-pybind11>=2.6.0
2121
-pygobject
22-
-pyparsing!=3.1.0
22+
-pyparsing>=2.3.1
2323
-pyqt
2424
-python-dateutil>=2.1
2525
-setuptools

‎lib/matplotlib/tests/test_mathtext.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@
99
fromtypingimportAny
1010

1111
importnumpyasnp
12+
frompackaging.versionimportparseasparse_version
13+
importpyparsing
1214
importpytest
1315

16+
1417
importmatplotlibasmpl
1518
frommatplotlib.testing.decoratorsimportcheck_figures_equal,image_comparison
1619
importmatplotlib.pyplotasplt
1720
frommatplotlibimportmathtext,_mathtext
1821

22+
pyparsing_version=parse_version(pyparsing.__version__)
23+
1924

2025
# If test is removed, use None as placeholder
2126
math_tests= [
@@ -279,6 +284,9 @@ def test_fontinfo():
279284
asserttable['version']== (1,0)
280285

281286

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")
282290
@pytest.mark.parametrize(
283291
'math, msg',
284292
[

‎lib/matplotlib/tests/test_text.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
importnumpyasnp
66
fromnumpy.testingimportassert_almost_equal
7+
frompackaging.versionimportparseasparse_version
8+
importpyparsing
79
importpytest
810

911
importmatplotlibasmpl
@@ -16,6 +18,8 @@
1618
frommatplotlib.testing._markersimportneeds_usetex
1719
frommatplotlib.textimportText,Annotation
1820

21+
pyparsing_version=parse_version(pyparsing.__version__)
22+
1923

2024
@image_comparison(['font_styles'])
2125
deftest_font_styles():
@@ -818,6 +822,9 @@ def test_unsupported_script(recwarn):
818822
(r"Matplotlib currently does not support Bengali natively.",)])
819823

820824

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")
821828
deftest_parse_math():
822829
fig,ax=plt.subplots()
823830
ax.text(0,0,r"$ \wrong{math} $",parse_math=False)
@@ -828,6 +835,9 @@ def test_parse_math():
828835
fig.canvas.draw()
829836

830837

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")
831841
deftest_parse_math_rcparams():
832842
# Default is True
833843
fig,ax=plt.subplots()

‎setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ def make_release_tree(self, base_dir, files):
335335
"numpy>=1.21",
336336
"packaging>=20.0",
337337
"pillow>=6.2.0",
338-
"pyparsing>=2.3.1,<3.1",
338+
"pyparsing>=2.3.1",
339339
"python-dateutil>=2.7",
340340
]+ (
341341
# Installing from a git checkout that is not producing a wheel.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp