-
-
Notifications
You must be signed in to change notification settings - Fork 719
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Closing this soonish if there are no further comments. |
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 :-) |
PS: are you still Python 2-compatible? |
No, we dropped Python 2 a little while ago. |
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. |
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. |
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