Author pierreglaser
Recipients Olivier.Grisel, alexandre.vassalotti, pierreglaser, pitrou, serhiy.storchaka
Date 2019-03-11.14:51:38
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

Instead of changing permission on some attributes of function objects (__globals__ and __closure__), we added an optional argument called state_setter to save_reduce. This expects a callable that will be saved inside the object's pickle string, and called when setting the state of the object instead of using the default way in load_build.
This allows for external flexibility when setting custom pickling behavior of built-in types (in our use-cases: function and classes). I updated the patches so that anyone interested can take a look.

Also, we tested the cloudpickle package against these patches (see The tests run fine, and we observe a 10-30x speedup for real-life use-cases. We are starting to hit convergence on the implementation :)
Date User Action Args
2019-03-11 14:51:39pierreglasersetrecipients: + pierreglaser, pitrou, alexandre.vassalotti, serhiy.storchaka, Olivier.Grisel
2019-03-11 14:51:39pierreglasersetmessageid: <>
2019-03-11 14:51:39pierreglaserlinkissue35900 messages
2019-03-11 14:51:39pierreglasercreate