Don't try to import cPickle

main
Selwin Ong 5 years ago
parent 21bf5890c0
commit ec2f8cb4ed

@ -3,6 +3,7 @@ from __future__ import (absolute_import, division, print_function,
unicode_literals) unicode_literals)
import inspect import inspect
import pickle
import warnings import warnings
import zlib import zlib
@ -18,12 +19,6 @@ from .serializers import resolve_serializer
from .utils import (enum, import_attribute, parse_timeout, str_to_date, from .utils import (enum, import_attribute, parse_timeout, str_to_date,
utcformat, utcnow) utcformat, utcnow)
try:
import cPickle as pickle
except ImportError: # noqa # pragma: no cover
import pickle
# Serialize pickle dumps using the highest pickle protocol (binary, default # Serialize pickle dumps using the highest pickle protocol (binary, default
# uses ascii) # uses ascii)
dumps = partial(pickle.dumps, protocol=pickle.HIGHEST_PROTOCOL) dumps = partial(pickle.dumps, protocol=pickle.HIGHEST_PROTOCOL)

Loading…
Cancel
Save