Skip to content
Snippets Groups Projects
Commit 29cc071e authored by Feanil Patel's avatar Feanil Patel
Browse files

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.
parent 14f9b5dd
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment