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

Browse filesBrowse files
committed
Fix pyparsing version check
Fixes #26409
1 parent 7b5327b commit 7fee0c6
Copy full SHA for 7fee0c6

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-1
lines changed

‎lib/matplotlib/_mathtext.py

Copy file name to clipboardExpand all lines: lib/matplotlib/_mathtext.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@
2727
from .font_manager import FontProperties, findfont, get_font
2828
from .ft2font import FT2Image, KERNING_DEFAULT
2929

30+
from packaging.version import parse as parse_version
3031
from pyparsing import __version__ as pyparsing_version
31-
if tuple(int(x) for x in pyparsing_version.split(".")) < (3, 0, 0):
32+
if parse_version(pyparsing_version).major < 3:
3233
from pyparsing import nestedExpr as nested_expr
3334
else:
3435
from pyparsing import nested_expr

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.