forked from VimPlug/jedi
Merge branch 'dev' of github.com:davidhalter/jedi into dev
This commit is contained in:
@@ -20,6 +20,6 @@ Aaron Meurer (@asmeurer) <asmeurer@gmail.com>
|
|||||||
Lubos Trilety <ltrilety@redhat.com>
|
Lubos Trilety <ltrilety@redhat.com>
|
||||||
Akinori Hattori (@hattya)
|
Akinori Hattori (@hattya)
|
||||||
srusskih (@srusskih)
|
srusskih (@srusskih)
|
||||||
|
Steven Silvester (@blink1073)
|
||||||
|
|
||||||
Note: (@user) means a github user name.
|
Note: (@user) means a github user name.
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import os
|
|||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
import hashlib
|
import hashlib
|
||||||
|
import gc
|
||||||
try:
|
try:
|
||||||
import cPickle as pickle
|
import cPickle as pickle
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@@ -256,8 +257,12 @@ class _ModulePickling(object):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
with open(self._get_hashed_path(path), 'rb') as f:
|
with open(self._get_hashed_path(path), 'rb') as f:
|
||||||
parser_cache_item = pickle.load(f)
|
try:
|
||||||
|
gc.disable()
|
||||||
|
parser_cache_item = pickle.load(f)
|
||||||
|
finally:
|
||||||
|
gc.enable()
|
||||||
|
|
||||||
debug.dbg('pickle loaded', path)
|
debug.dbg('pickle loaded', path)
|
||||||
parser_cache[path] = parser_cache_item
|
parser_cache[path] = parser_cache_item
|
||||||
return parser_cache_item.parser
|
return parser_cache_item.parser
|
||||||
|
|||||||
Reference in New Issue
Block a user