1
0
forked from VimPlug/jedi

Use cPickle on Python 2 if available

Attempt to load the C version of pickle on Python 2 as it is way faster.
This commit is contained in:
micbou
2018-06-20 14:34:39 +02:00
committed by Dave Halter
parent e96ebbe88f
commit 197aa22f29

View File

@@ -381,8 +381,12 @@ if is_py3:
else:
import Queue as queue
import pickle
try:
# Attempt to load the C implementation of pickle on Python 2 as it is way
# faster.
import cPickle as pickle
except ImportError:
import pickle
if sys.version_info[:2] == (3, 3):
"""
Monkeypatch the unpickler in Python 3.3. This is needed, because the