File tree Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Expand file tree Collapse file tree 3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change 1
1
1.5.1 (in development)
2
2
======================
3
3
4
+ - ` cloudpickle ` 's pickle.Pickler subclass (currently defined as
5
+ ` cloudpickle.cloudpickle_fast.CloudPickler ` ) can and should now be accessed
6
+ as ` cloudpickle.Pickler ` . This is the only officially supported way of
7
+ accessing it.
8
+ ([ issue #366 ] ( https://github.com/cloudpipe/cloudpickle/issues/366 ) )
9
+
4
10
5
11
1.5.0
6
12
=====
Original file line number Diff line number Diff line change 4
4
from cloudpickle .cloudpickle import * # noqa
5
5
from cloudpickle .cloudpickle_fast import CloudPickler , dumps , dump # noqa
6
6
7
+ # Conform to the convention used by python serialization libraries, which
8
+ # expose their Pickler subclass at top-level under the "Pickler" name.
9
+ Pickler = CloudPickler
10
+
7
11
__version__ = '1.5.1dev0'
Original file line number Diff line number Diff line change @@ -2342,5 +2342,12 @@ class C(typing.Generic[T]):
2342
2342
return types_to_test
2343
2343
2344
2344
2345
+ def test_module_level_pickler ():
2346
+ # #366: cloudpickle should expose its pickle.Pickler subclass as
2347
+ # cloudpickle.Pickler
2348
+ assert hasattr (cloudpickle , "Pickler" )
2349
+ assert cloudpickle .Pickler is cloudpickle .CloudPickler
2350
+
2351
+
2345
2352
if __name__ == '__main__' :
2346
2353
unittest .main ()
You can’t perform that action at this time.
0 commit comments