8000 Backport PR #15729: Catch correct parse errror type for dateutil >= 2… · matplotlib/matplotlib@5d25e96 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d25e96

Browse files
story645MeeseeksDev[bot]
authored andcommitted
Backport PR #15729: Catch correct parse errror type for dateutil >= 2.8.1
1 parent af3c71e commit 5d25e96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/category.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,8 @@ def _str_is_convertible(val):
191191
except ValueError:
192192
try:
193193
dateutil.parser.parse(val)
194-
except ValueError:
194+
except (ValueError, TypeError):
195+
# TypeError if dateutil >= 2.8.1 else ValueError
195196
return False
196197
return True
197198

0 commit comments

Comments
 (0)
0