Page MenuHomeSolus

Update python-cloudpickle to 1.6.0
ClosedPublic

Authored by algent on Sep 6 2020, 8:08 PM.
Tags
None
Referenced Files
F11017051: D9594.id23111.diff
Sat, Aug 5, 10:31 PM
F11017041: D9594.diff
Sat, Aug 5, 10:25 PM
F10876977: D9594.id23111.diff
Jun 20 2023, 2:58 PM
F10851319: D9594.id23153.diff
Jun 12 2023, 11:53 AM
F10850727: D9594.id23112.diff
Jun 12 2023, 6:32 AM
F10848226: D9594.id23111.diff
Jun 11 2023, 1:59 PM
F10825591: D9594.diff
Jun 4 2023, 12:36 AM
F10770295: D9594.id23153.diff
May 20 2023, 10:46 PM
Subscribers

Details

Summary

Changelog:

  • cloudpickle's pickle.Pickler subclass (currently defined as cloudpickle.cloudpickle_fast.CloudPickler) can and should now be accessed as cloudpickle.Pickler. This is the only officially supported way of accessing it.
  • cloudpickle now supports pickling dict_keys, dict_items and dict_values.

Signed-off-by: Algent Albrahimi <algent@protonmail.com>

Test Plan
  • Update python-spyder-kernels against this version.
  • Run a few python scripts using spyder3.
  • Run this example using cli:
>>> import cloudpickle
>>> squared = lambda x: x ** 2
>>> pickled_lambda = cloudpickle.dumps(squared)
>>> import pickle
>>> new_squared = pickle.loads(pickled_lambda)
>>> new_squared(2)
4
>>> CONSTANT = 42
>>> def my_function(data: int) -> int:
...     return data + CONSTANT
... 
>>> pickled_function = cloudpickle.dumps(my_function)
>>> depickled_function = pickle.loads(pickled_function)
>>> depickled_function(43)
85
>>>

Diff Detail

Repository
R3930 python-cloudpickle
Lint
Lint Not Applicable
Unit
Tests Not Applicable