Uh oh!
There was an error while loading. Please reload this page.
Try to use pickle5 when available - #3425
Conversation
As there are some improvements for buffer serialization in pickle protocol 5 and these can be opted in using a backports package on older Python versions. Try to leverage the backport package when available and fallback to the builtin pickle otherwise.
This is a backport of Python's pickle 5 protocol for Python 3.6 and 3.7. So install it for those versions. In Python 3.8+ this is included in Python natively. So skip installing it for more recent Python versions.
mrocklin
commented
Jan 29, 2020
mrocklin
commented
Feb 16, 2020
Closing this soonish if there are no further comments. |
pitrou
commented
Feb 16, 2020
That would be the best reason to use it indeed.
It may, depending exactly how pickle is invoked (some copies may be avoided, though not all). The best is if you can do some measurements and post them here :-) |
Uh oh!
There was an error while loading. Please reload this page.
pitrou
commented
Feb 16, 2020
PS: are you still Python 2-compatible? |
mrocklin
commented
Feb 16, 2020
No, we dropped Python 2 a little while ago. |
Uh oh!
There was an error while loading. Please reload this page.
jakirkham
commented
Feb 16, 2020
This is what I was finding.
That would certainly be better. Though it would be nice if we didn't have to maintain non-protocol 5 support as well. |
jakirkham
commented
May 7, 2020
Replacing with PR ( #3784 ), which actually handles out-of-band buffers. Admittedly it doesn't use pickle5 on older Python versions. However we would need cloudpickle to support to support pickle5 for that to work correctly ( cloudpipe/cloudpickle#179 ) anyways. |
jakirkham
commented
Jul 15, 2020
Also this has been extended to Python versions pre-3.8 with |
As there are some improvements for buffer serialization in pickle protocol 5 and these can be opted in using a backports package on older Python versions. Try to leverage the backport package when available and fallback to the builtin pickle otherwise.
cc @quasiben@pentschev