summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--memcache.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/memcache.py b/memcache.py
index 5d97714..2fd452b 100644
--- a/memcache.py
+++ b/memcache.py
@@ -49,7 +49,6 @@ from __future__ import print_function
import binascii
import os
-import pickle
import re
import socket
import sys
@@ -59,6 +58,12 @@ import zlib
import six
+if six.PY2:
+ # With Python 2, the faster C implementation has to be imported explicitly.
+ import cPickle as pickle
+else:
+ import pickle
+
def cmemcache_hash(key):
return (