Set cache pickle protocol to 2.
HIGHEST_PROTOCOL will cause it to change when we move from python 2 to 3 and this may cause issues as older machines try to read objects pickeld with a version of the protocol they don't know. During deploys, and if we have to roll back are two examples.
This commit is contained in:
@@ -151,7 +151,7 @@ class process_cached(object): # pylint: disable=invalid-name
|
||||
|
||||
def zpickle(data):
|
||||
"""Given any data structure, returns a zlib compressed pickled serialization."""
|
||||
return zlib.compress(pickle.dumps(data, pickle.HIGHEST_PROTOCOL))
|
||||
return zlib.compress(pickle.dumps(data, 2)) # Keep this constant as we upgrade from python 2 to 3.
|
||||
|
||||
|
||||
def zunpickle(zdata):
|
||||
|
||||
Reference in New Issue
Block a user