Commit 81c0dc80 authored by Jérome Perrin's avatar Jérome Perrin

💥 export protocol 1 on py2

parent 0b02e07b
...@@ -281,7 +281,7 @@ def reorderPickle(jar, p): ...@@ -281,7 +281,7 @@ def reorderPickle(jar, p):
unpickler.persistent_load=persistent_load unpickler.persistent_load=persistent_load
newp=BytesIO() newp=BytesIO()
pickler = OrderedPickler(newp, 3) pickler = OrderedPickler(newp, 1) #3 if six.PY3 else 1)
pickler.persistent_id=persistent_id pickler.persistent_id=persistent_id
classdef = unpickler.load() classdef = unpickler.load()
......
...@@ -776,6 +776,26 @@ class ToXMLUnpickler(Unpickler): ...@@ -776,6 +776,26 @@ class ToXMLUnpickler(Unpickler):
if six.PY2: if six.PY2:
dispatch[code] = unsupported_opcode(code) dispatch[code] = unsupported_opcode(code)
dispatch[code[0]] = unsupported_opcode(code) dispatch[code[0]] = unsupported_opcode(code)
dispatch[code] = unsupported_opcode(code)
dispatch[PERSID] = unsupported_opcode('PERSID')
dispatch[INT] = unsupported_opcode('INT')
dispatch[LONG] = unsupported_opcode('LONG')
dispatch[FLOAT] = unsupported_opcode('FLOAT')
dispatch[STRING] = unsupported_opcode('STRING')
dispatch[UNICODE] = unsupported_opcode('UNICODE')
dispatch[GET] = unsupported_opcode('GET')
dispatch[PUT] = unsupported_opcode('PUT')
def load_int(self):
self.append(Int(int(self.readline()[:-1]), self.id_mapping))
dispatch[INT] = load_int
class LogCall: class LogCall:
def __init__(self, func): def __init__(self, func):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment