This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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 <1552315899.34.0.978271906319.issue35900@roundup.psfhosted.org>
In-reply-to
Content
Update:

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 https://github.com/cloudpipe/cloudpickle/pull/253). 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 :)
History
Date User Action Args
2019-03-11 14:51:39pierreglasersetrecipients: + pierreglaser, pitrou, alexandre.vassalotti, serhiy.storchaka, Olivier.Grisel
2019-03-11 14:51:39pierreglasersetmessageid: <1552315899.34.0.978271906319.issue35900@roundup.psfhosted.org>
2019-03-11 14:51:39pierreglaserlinkissue35900 messages
2019-03-11 14:51:39pierreglasercreate