Skip to content
This repository has been archived by the owner on Apr 13, 2024. It is now read-only.

Bring back Python 3 compatibility #90

Closed
sergei-dyshel opened this issue Nov 15, 2017 · 9 comments
Closed

Bring back Python 3 compatibility #90

sergei-dyshel opened this issue Nov 15, 2017 · 9 comments

Comments

@sergei-dyshel
Copy link

AFAIU e92265d changes required python version to 2. I understand that this is preferred setting for most users, but not for all them. Since it's not possible to use both python 2 and 3 simultaneously in vim, many python version-agnostic plugins try to autodetect used version and I believe that this is the proper way.

@woky
Copy link

woky commented Nov 17, 2017

Vim in Debian testing is compiled with Python 3 support only.

$ vim
Error detected while processing function rtags#InitPython:
line    1:
E319: Sorry, the command is not available in this version: python << endpython
line    2:
E492: Not an editor command: import vim
line    4:
E488: Trailing characters: script_folder = vim.eval('s:script_folder_path')
line    5:
E492: Not an editor command: sys.path.insert(0, script_folder)
line    7:
E492: Not an editor command: import vimrtags
line    9:
E492: Not an editor command: endpython
Press ENTER or type command to continue

@lyuts
Copy link
Owner

lyuts commented Nov 20, 2017

I see, that's a good point. I'll put it on my list to see which python is available and which support vim is built with. My apologies for this inconvenience.

@lyuts
Copy link
Owner

lyuts commented Nov 20, 2017

Hey guys, I made a change to try and detect which python version is available. Can you try it? It is in py_2_and_3 branch (commit: 8773238).

@rajukv
Copy link
Contributor

rajukv commented Nov 20, 2017

Hi,

I switched to this branch and I am seeing the following errors:

Error detected while processing ~/.vim/plugged/vim-rtags/plugin/rtags.vim:
line 16:
E121: Undefined variable: output
E15: Invalid expression: "[vim-rtags] Vim is missing python support" . output | echohl None
Error detected while processing function rtags#InitPython:
line 7:
E121: Undefined variable: g:rtagsPy
E15: Invalid expression: g:rtagsPy." ".s:pyInitScript

This is with vim from debian sid

@bartlibert
Copy link

bartlibert commented Nov 20, 2017

I tried it with vim from debian testing (buster) and I don't get the error above, but there is another error, which is related to pyeval, which is not available either, it should be py3eval for vim with python3.

Update: I cleared my plugin cache and tried again, now everything seems ok.

@sergei-dyshel
Copy link
Author

I'm using my own Vim built with python3-only support and this branch works for me.

@lyuts
Copy link
Owner

lyuts commented Dec 26, 2017

Can you guys confirm you don't see this issue anymore? If so, I'd resolve this issue.

@bartlibert
Copy link

For me it's working. I've been using the plugin successfully for several weeks now.

@lyuts
Copy link
Owner

lyuts commented Dec 28, 2017

I think this has been addressed by c177551. Resolving this one.

@lyuts lyuts closed this as completed Dec 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants