[ 
https://issues.apache.org/jira/browse/LIBCLOUD-705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14632786#comment-14632786
 ] 

Tomaz Muraus commented on LIBCLOUD-705:
---------------------------------------

I had a look into it today and the problem is that Node (and other classes such 
as DNSRecord, etc.) contain a reference to the Driver which contains a 
reference to the Connection which contains many unpicklable variables.

I will look into defining a custom __getstate__ for the driver class which 
doesn't try to pickle the Connection instance, but only the kwargs which are 
required to build the instance and then re-create the connection instance when 
unpickling the object in __setstate__.

> Pickling of Nodes isn't supported - TypeError: a class that defines __slots__ 
> without defining __getstate__ cannot be pickled
> -----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LIBCLOUD-705
>                 URL: https://issues.apache.org/jira/browse/LIBCLOUD-705
>             Project: Libcloud
>          Issue Type: Wish
>          Components: Compute
>            Reporter: Samuel Marks
>              Labels: features
>
> TypeError: a class that defines __slots__ without defining __getstate__ 
> cannot be pickled.
> Class is libcloud.compute.base.Node.
> Use case: pushing nodes created in libcloud into a queue for processing with 
> other tools



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to