File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
pymode/libs/pkg_resources Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -2170,7 +2170,16 @@ def _handle_ns(packageName, path_item):
2170
2170
return None
2171
2171
2172
2172
if PY3 :
2173
- loader = importer .find_module (packageName )
2173
+ # * since python 3.3, the `imp.find_module()` is deprecated
2174
+ # * `importlib.util.find_spec()` is new in python 3.4
2175
+ # * in vim source, if compiled vim with python 3.7 or new, the vim
2176
+ # python 3 interface will use `find_spec` instead of `find_module`
2177
+ # and `load_module`. (note: this depends on the python which compiled
2178
+ # with vim, not the python loaded by vim at runtime.)
2179
+ try :
2180
+ loader = importer .find_spec (packageName )
2181
+ except AttributeError :
2182
+ loader = importer .find_module (packageName )
2174
2183
else :
2175
2184
try :
2176
2185
loader = importer .find_module (packageName )
You can’t perform that action at this time.
0 commit comments