You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All subclasses of sage.structure.element.Element end up using sage.structure.element.make_element for unpickling. This design is very hard to maintain, especially when trying to keep backward compatibility with older pickles.
Python's pickling protocol via __getstate__() and __setstate__() moves the implementation of pickling/unpickling to the subclasses. [1] Attached patch changes sage.structure.element.Element to use this protocol.
All subclasses of
sage.structure.element.Element
end up usingsage.structure.element.make_element
for unpickling. This design is very hard to maintain, especially when trying to keep backward compatibility with older pickles.Python's pickling protocol via
__getstate__()
and__setstate__()
moves the implementation of pickling/unpickling to the subclasses. [1] Attached patch changes sage.structure.element.Element to use this protocol.[1] http://www.python.org/doc/2.5/lib/pickle-inst.html
CC: @robertwb @williamstein
Component: algebra
Issue created by migration from https://trac.sagemath.org/ticket/4698
The text was updated successfully, but these errors were encountered: