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 6e42a75

Browse filesBrowse files
author
ojeda-e
committed
Added __setstate__ in Text to pickle weakref
1 parent 1168d75 commit 6e42a75
Copy full SHA for 6e42a75

File tree

1 file changed

+5
-0
lines changed
Filter options

1 file changed

+5
-0
lines changed

‎lib/matplotlib/text.py

Copy file name to clipboardExpand all lines: lib/matplotlib/text.py
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,13 @@ def __getstate__(self):
177177
d = super().__getstate__()
178178
# remove the cached _renderer (if it exists)
179179
d['_renderer'] = None
180+
d['_cached'] = None
180181
return d
181182

183+
def __setstate__(self, state):
184+
self.__dict__.update(state)
185+
self._cached = cbook.maxdict(50)
186+
182187
def contains(self, mouseevent):
183188
"""
184189
Return whether the mouse event occurred inside the axis-aligned

0 commit comments

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