Skip to content

Commit 0c3b9d7

Browse files
authored
Merge pull request #10422 from cclauss/patch-1
Define RecursionError for Python versions < 3.5
2 parents f66687c + fc52f23 commit 0c3b9d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/tests/test_pickle.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
import matplotlib.pyplot as plt
1313
import matplotlib.transforms as mtransforms
1414

15+
try: # https://docs.python.org/3/library/exceptions.html#RecursionError
16+
RecursionError # Python 3.5+
17+
except NameError:
18+
RecursionError = RuntimeError # Python < 3.5
19+
1520

1621
def test_simple():
1722
fig = plt.figure()

0 commit comments

Comments
 (0)