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 5881e72

Browse filesBrowse files
authored
Merge pull request #7854 from ahcub/master
FIX for _rrule maximum recursion depth exceeded on multiprocessing usage
2 parents 4c5fca7 + 17ba26c commit 5881e72
Copy full SHA for 5881e72

File tree

Expand file treeCollapse file tree

2 files changed

+12
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-0
lines changed

‎lib/matplotlib/dates.py

Copy file name to clipboardExpand all lines: lib/matplotlib/dates.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,8 @@ def set(self, **kwargs):
711711
self._rrule = rrule(**self._construct)
712712

713713
def __getattr__(self, name):
714+
if name in ['__getstate__', '__setstate__']:
715+
return object.__getattr__(self, name)
714716
if name in self.__dict__:
715717
return self.__dict__[name]
716718
return getattr(self._rrule, name)

‎lib/matplotlib/tests/test_pickle.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_pickle.py
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import numpy as np
1212

1313
from matplotlib.testing.decorators import cleanup, image_comparison
14+
from matplotlib.dates import rrulewrapper
1415
import matplotlib.pyplot as plt
1516
import matplotlib.transforms as mtransforms
1617

@@ -270,6 +271,15 @@ def test_transform():
270271
assert_equal(obj.wrapper.output_dims, obj.composite.output_dims)
271272

272273

274+
def test_rrulewrapper():
275+
r = rrulewrapper(2)
276+
try:
277+
pickle.loads(pickle.dumps(r))
278+
except RecursionError:
279+
print('rrulewrapper pickling test failed')
280+
raise
281+
282+
273283
if __name__ == '__main__':
274284
import nose
275285
nose.runmodule(argv=['-s'])

0 commit comments

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