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
In fact Python Exceptions are already picklable - the __traceback__ field is skipped. So we get all this behaviour for free if we just change PyException to be a wrapper around a single Python Exception object.
Or perhaps leave the fields separate as-is, but treat PyException as a wrapper type around the v property. This lets us avoid normalising. When normalising, set v.__traceback__ to t. When serialising, just serialise v. When deserialising, set t=pytype(v) and b=v.__traceback__ and isnormalised=true.
Python
traceback
objects are not picklable, and hencePyException
cannot always be serialised.As a fix, serialise the
b
field of aPyException
asNone
. Or possibly always serializetraceback
toNone
? Or toUnpicklable()
?Optional extra: if we detect that
tblib
is installed, allow pickling oftraceback
.Document this behaviour in the compat section.
The text was updated successfully, but these errors were encountered: