lyuts / vim-rtags

Vim bindings for rtags, llvm/clang based c++ code indexer.
BSD 2-Clause "Simplified" License
282 stars 56 forks source link

python2 has not subprocess.run function #92

Closed pangchol closed 6 years ago

pangchol commented 6 years ago

When I use bd to try call rtags#Diagnostics fuction, it come out error:

Traceback (most recent call last): File "", line 1, in File "/home/boddy/.home/.vim/bundle/vim-rtags/plugin/vimrtags.py", line 150, in get_diagnostics content = run_rc_command(cmd, content) File "/home/boddy/.home/.vim/bundle/vim-rtags/plugin/vimrtags.py", line 22, in run_rc_command r = subprocess.run('rc ' + arguments, input = content, AttributeError: 'module' object has no attribute 'run' E858: Eval did not return a valid python object

it seem than python2 have not run function, could you change the call method to let this call compatable with python2?

solotim commented 6 years ago

The same issue as #91. Someone suggested a patch (see #91). I tried, no python error anymore, but auto-completion still not working.

Hope maintainers can provide an official fix for this!

lyuts commented 6 years ago

Here's an attempt to make completion work with different versions of python: c177551. I've tried it with python 2 and python 3.4. I haven't tried 3.5+ as I don't have any setup with newer python. All three cases seem to be different and require special handling. Could try it and let me know if it works for you? Thank you.

mckellyln commented 6 years ago

I had same issue and this works well for me, thx.

lyuts commented 6 years ago

Thank you. This should be fixed now. Resolving it.