After updating Python to 3.7 (kind of forced by Homebrew), executing simply pyx print('Hello') generates a warning:
the imp module is deprecated in favour of importlib …
Any idea how to suppress it or solve it entirely?
It is an ongoing issue on vim over - https://github.com/vim/vim/issues/3117
Workaround: do :silent! pyx import sys first of all.
@ichizok good
I'm currently working around this issue by compiling with python 2 support:
brew reinstall macvim --with-python@2 --with-lua --with-luajit --with-override-system-vim
Actually, this is a better workaround than installing with python 2: Put the following at the top of your vimrc.
if has('python3')
silent! python3 1
endif
From https://github.com/vim/vim/issues/3117#issuecomment-402622616
Two weeks passed, any pr to resolve this problem? Or should I install an older version macvim?
@HolaYang as mentioned above, this is a vim issue--not a macvim issue--so I think this issue should be locked and/or closed. I recommend using the workaround I posted above in the meantime.
This was fixed in v8.1.0201 and MacVim already merged it.
@ichizok Any idea when it is going to be released and available in homebrew?
there's also vim/vim#3162 which also seems to be important
@ychin Fixed in vim, this issue can be closed.
Most helpful comment
Actually, this is a better workaround than installing with python 2: Put the following at the top of your vimrc.
From https://github.com/vim/vim/issues/3117#issuecomment-402622616