
from __future__ import absolute_import;

from pickle import dumps;
from pickle import loads;

try:
    from base64 import encodebytes;
    from base64 import decodebytes;
except Exception:
    from base64 import encodestring as encodebytes;
    from base64 import decodestring as decodebytes;

"""
"""

CHARSET = 'UTF-8';

def serialize(obj):
    return encodebytes(dumps(obj)).decode(CHARSET).replace('\n', '');

def unserialize(s):
    return loads(decodebytes(s.encode(CHARSET)));


from __future__ import absolute_import;

from pickle import dumps;
from pickle import loads;

try:
    from base64 import encodebytes;
    from base64 import decodebytes;
except Exception:
    from base64 import encodestring as encodebytes;
    from base64 import decodestring as decodebytes;

"""
"""

CHARSET = 'UTF-8';
PICKLE_PROTOCOL = 2;

def serialize(obj):
    return encodebytes(dumps(obj, PICKLE_PROTOCOL)).decode(CHARSET).replace('\n', '');

def unserialize(s):
    return loads(decodebytes(s.encode(CHARSET)));

Use pickle protocole 2 to BC for Python2*
[System][Serializer] Use pickle protocole 2 to BC for Python2*

  
  from __future__ import absolute_import;
  
  from pickle import dumps;
  from pickle import loads;
  
  try:
      from base64 import encodebytes;
      from base64 import decodebytes;
  except Exception:
      from base64 import encodestring as encodebytes;
      from base64 import decodestring as decodebytes;
  
  """
  """
  
  CHARSET = 'UTF-8';
+ PICKLE_PROTOCOL = 2;
  
  def serialize(obj):
-     return encodebytes(dumps(obj)).decode(CHARSET).replace('\n', '');
+     return encodebytes(dumps(obj, PICKLE_PROTOCOL)).decode(CHARSET).replace('\n', '');
  
  def unserialize(s):
      return loads(decodebytes(s.encode(CHARSET)));
  
Use pickle protocole 2 to BC for Python2*
## Code Before:

from __future__ import absolute_import;

from pickle import dumps;
from pickle import loads;

try:
    from base64 import encodebytes;
    from base64 import decodebytes;
except Exception:
    from base64 import encodestring as encodebytes;
    from base64 import decodestring as decodebytes;

"""
"""

CHARSET = 'UTF-8';

def serialize(obj):
    return encodebytes(dumps(obj)).decode(CHARSET).replace('\n', '');

def unserialize(s):
    return loads(decodebytes(s.encode(CHARSET)));

## Instruction:
Use pickle protocole 2 to BC for Python2*
## Code After:

from __future__ import absolute_import;

from pickle import dumps;
from pickle import loads;

try:
    from base64 import encodebytes;
    from base64 import decodebytes;
except Exception:
    from base64 import encodestring as encodebytes;
    from base64 import decodestring as decodebytes;

"""
"""

CHARSET = 'UTF-8';
PICKLE_PROTOCOL = 2;

def serialize(obj):
    return encodebytes(dumps(obj, PICKLE_PROTOCOL)).decode(CHARSET).replace('\n', '');

def unserialize(s):
    return loads(decodebytes(s.encode(CHARSET)));
