Skip to content

Commit e87164b

Browse files
committed
Pickle compatibility with Python 3.8 change to protocol=4
1 parent 9a25677 commit e87164b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plasma/utils/hashing.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import dill
33
import hashlib
44
import copy
5+
# import pickle
6+
# dill.settings['protocol'] = 3
57

68

79
def general_object_hash(o):
@@ -65,7 +67,7 @@ def myhash_obj(x):
6567
Serialize a generic Python object using dill, decode the bytes obj,
6668
then pass the Unicode string to the particular hash function.
6769
'''
68-
return myhash(dill.dumps(x).decode('unicode_escape'))
70+
return myhash(dill.dumps(x, protocol=3).decode('unicode_escape'))
6971

7072

7173
def myhash_signals(signals):

0 commit comments

Comments
 (0)