-
-
Notifications
You must be signed in to change notification settings - Fork 770
Closed
Description
Python find_module function has been deprecated as of py3.4 and find_spec is the replacement, it contains the same interface and will fix the error message received when opening a python file in vim-python-mode:
diff --git a/autoload/pymode/breakpoint.vim b/autoload/pymode/breakpoint.vim
index c3189aa..e62c041 100644
--- a/autoload/pymode/breakpoint.vim
+++ b/autoload/pymode/breakpoint.vim
@@ -15,11 +15,11 @@ fun! pymode#breakpoint#init() "{{{
PymodePython << EOF
-from imp import find_module
+from importlib.util import find_spec
for module in ('wdb', 'pudb', 'ipdb'):
try:
- find_module(module)
+ find_spec(module)
vim.command('let g:pymode_breakpoint_cmd = "import %s; %s.set_trace() # XXX BREAKPOINT"' % (module, module))
break
except ImportError: