Skip to content

Commit f677db7

Browse 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 )
1 parent c387fb1 commit f677db7

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-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
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
[

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)