-
-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Assign `header` and `frames` before returning * Import `HIGHEST_PROTOCOL` at top-level * Collect keyword arguments to `*dumps` * Assign `result` and `return` once at end * Support out-of-band buffer serialization * Require `cloudpickle` version `1.3.0` Needed for out-of-band buffer handling. * Test Pickle with out-of-band buffers * Import `PickleBuffer` (if available) * Test `serialize`/`deserialize` with `pickle` * Check serialized header + frames * Check out-of-band buffers' content * Take `memoryview` of `PickleBuffer` for testing * Collect buffers internally first Before calling the user provided buffer callback, collect buffers in an internal list. That way if the mechanism of pickling needs to be changed, the internal list can be purged before handing these to the user. At the end of pickling, make sure the user's buffer callback is called on each buffer in order. * Only collect buffers if `buffer_callback` exists * Use `elif` instead for simplicity * Use De Morgan's law to simplify logic * Check `buffer_callback` before calling it Co-authored-by: Jim Crist-Harif <[email protected]> * Use `buffer.clear()` instead of `del buffer[:]` Co-authored-by: Jim Crist-Harif <[email protected]>
- Loading branch information
Showing
4 changed files
with
112 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters