Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc52f23

Browse files
author
cclauss
authored
Define RecursionError for Python versions < 3.5
__RecursionError__ is used on line 189. https://docs.python.org/3/library/exceptions.html#RecursionError
1 parent d07de22 commit fc52f23

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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)