Message12554

Author stefan.richthofer
Recipients adamburke, filip.drozdowski, stefan.richthofer
Date 2019-06-03.22:23:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1559600611.08.0.664837292661.issue2776@roundup.psfhosted.org>
In-reply-to
Content
I thought about a solution. We could make field transient and store its class (via getDeclaringClass) and its name (via getName) along with the field. Then initialize the transient field "field" lazily. Class and String are serializable, so this should be fine. If serialization of classes is too complex we could alternatively store the fully qualified name of the class and then lazily init the class via Class.forName.

Do you think that would solve it?

However, I noticed something worse:
In PyReflectedFunction an array of ReflectedArgs is stored. ReflectedArgs contains a plain Object "data". This violates the promize of serializability in PyReflectedFunction. I don't see how to resolve that properly. Only idea I have is to require ReflectedArgs.data to be serializable. Can we change it to "Serializable data"? Thoughts?
History
Date User Action Args
2019-06-03 22:23:31stefan.richthofersetmessageid: <1559600611.08.0.664837292661.issue2776@roundup.psfhosted.org>
2019-06-03 22:23:31stefan.richthofersetrecipients: + stefan.richthofer, adamburke, filip.drozdowski
2019-06-03 22:23:31stefan.richthoferlinkissue2776 messages
2019-06-03 22:23:30stefan.richthofercreate