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 7d070b8

Browse filesBrowse files
committed
MNT: Unpin pyparsing, xfail error message tests for pyparsing 3.1.0
May require backporting a portion of #26198 to the 3.7 branch if we wish to have a 3.7.3. (specifically the part where token, placeable, and auto_delim are excluded from setName)
1 parent c387fb1 commit 7d070b8
Copy full SHA for 7d070b8

File tree

Expand file treeCollapse file tree

4 files changed

+20
-2
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+20
-2
lines changed

‎environment.yml

Copy file name to clipboardExpand all lines: environment.yml
+1-1Lines 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

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_mathtext.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@
99
from typing import Any
1010

1111
import numpy as np
12+
from packaging.version import parse as parse_version
13+
import pyparsing
1214
import pytest
1315

16+
1417
import matplotlib as mpl
1518
from matplotlib.testing.decorators import check_figures_equal, image_comparison
1619
import matplotlib.pyplot as plt
1720
from matplotlib import mathtext, _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
assert table['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

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_text.py
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import numpy as np
66
from numpy.testing import assert_almost_equal
7+
from packaging.version import parse as parse_version
8+
import pyparsing
79
import pytest
810

911
import matplotlib as mpl
@@ -16,6 +18,8 @@
1618
from matplotlib.testing._markers import needs_usetex
1719
from matplotlib.text import Text, Annotation
1820

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

2024
@image_comparison(['font_styles'])
2125
def test_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
def test_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
def test_parse_math_rcparams():
832842
# Default is True
833843
fig, ax = plt.subplots()

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.