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

Simplify pickling support. #17297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions 10 lib/matplotlib/cbook/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,6 @@ def __init__(self, type, seq=None):
def __repr__(self):
return '<a list of %d %s objects>' % (len(self), self.type)

__str__ = __repr__

def __getstate__(self):
# store a dictionary of this SilentList's state
return {'type': self.type, 'seq': self[:]}

def __setstate__(self, state):
self.type = state['type']
self.extend(state['seq'])


@deprecated("3.3")
class IgnoredKeywordWarning(UserWarning):
Expand Down
24 changes: 2 additions & 22 deletions 24 lib/matplotlib/gridspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,17 +312,7 @@ def __init__(self, nrows, ncols, figure=None,
_AllowedKeys = ["left", "bottom", "right", "top", "wspace", "hspace"]

def __getstate__(self):
state = self.__dict__
try:
state.pop('_layoutbox')
except KeyError:
pass
return state

def __setstate__(self, state):
self.__dict__ = state
# layoutboxes don't survive pickling...
self._layoutbox = None
return {**self.__dict__, "_layoutbox": None}

def update(self, **kwargs):
"""
Expand Down Expand Up @@ -580,17 +570,7 @@ def num2(self, value):
self._num2 = value

def __getstate__(self):
state = self.__dict__
try:
state.pop('_layoutbox')
except KeyError:
pass
return state

def __setstate__(self, state):
self.__dict__ = state
# layoutboxes don't survive pickling...
self._layoutbox = None
return {**self.__dict__, "_layoutbox": None}

def get_gridspec(self):
return self._gridspec
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.