diff --git a/jedi/_compatibility.py b/jedi/_compatibility.py index 3aef7eb9..92cd2c36 100644 --- a/jedi/_compatibility.py +++ b/jedi/_compatibility.py @@ -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