mirror of
https://github.com/davidhalter/jedi.git
synced 2026-10-20 14:07:05 +08:00
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:
1 parent
e96ebbe88f
commit
197aa22f29
1 file changed
+6
-2
@@ -381,8 +381,12 @@ if is_py3:
|
|||||||
else:
|
else:
|
||||||
import Queue as queue
|
import Queue as queue
|
||||||
|
|
||||||
|
try:
|
||||||
import pickle
|
# 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):
|
if sys.version_info[:2] == (3, 3):
|
||||||
"""
|
"""
|
||||||
Monkeypatch the unpickler in Python 3.3. This is needed, because the
|
Monkeypatch the unpickler in Python 3.3. This is needed, because the
|
||||||
|
|||||||
Reference in new issue
Block a user