-
-
Notifications
You must be signed in to change notification settings - Fork 374
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s:init_python: handle g:jedi#force_py_version again #834
Conversation
@davidhalter The tricky part currently is that you cannot differentiate between the Python to load Jedi and the Python that Jedi uses. I think having used If you agree, the following should get applied here, too (+doc): diff --git i/autoload/jedi.vim w/autoload/jedi.vim
index d039e8a..3c1a229 100644
--- i/autoload/jedi.vim
+++ w/autoload/jedi.vim
@@ -70,9 +70,9 @@ function! s:init_python() abort
throw 'jedi-vim requires Vim with support for Python 2 or 3.'
endif
else
- if g:jedi#force_py_version =~# '^3'
+ if g:jedi#force_py_version ==# '3'
let py_loader_version = 3
- elseif g:jedi#force_py_version =~# '^2'
+ elseif g:jedi#force_py_version ==# '2'
let py_loader_version = 2
else
throw printf("jedi-vim: could not determine Python version from '%s' (%s)", |
IMO I wouldn't do that. Python 2 is dying soon and I'm probably not going to support it beyond 2020. People should switch. If they still want Python 2, they can just use an older version of everything without bug fixes and stuff. This PR goes into the same direction, we're making changes, because someone is having issues with Python 3.2. IMO this is just too much maintenance work for little gain. It seems to be working very well with most users and there has been one case where it didn't, but that's really just one case. So as I said, I'm kind of against it, but if you really want this we can maybe just use a new variable |
I get your point, but I think it's not too hard to support this. Re |
Yes. I think most people just want to specify a Python version and not an environment. I think the environment should be a separate setting if people really want that. |
Hmm.
|
The reason why I wouldn't change the name is that people are already using it in configs. What would be substantially better? I agree however that it's not the best name. |
If you changed something that was related to my comment, please rebase, the "old" logos are still in this diff. |
It was removed previously, since it now refers to the environment being used. This brings it back for now. There could be a separate var for it later, and/or it needs changes later (or rather the environment needs a new variable name, since it should refer to the executable really) - but this is good for now I think. Fixes davidhalter#833
This allows for |
I have quickly reviewed it and it looks generally good. I generally like the naming. The point is just, I'm really against re-introducing this. Apart from one guy that runs Python 3.2 (and that's extremely old) - nobody has complained about the lack of this feature. This guy could also just be using Jedi < Since I don't fell like I should just decide this, I'll let you. You did the work and it's not a big deal to maintain it (probably). If you don't agree with me - that's fine, we will then just merge it. It's generally a very small thing and we should probably use our time for discussions on other things :) |
It was removed previously, since it now refers to the environment being
used.
This brings it back for now.
There could be a separate var for it later, and/or it needs changes
later (or rather the environment needs a new variable name, since it
should refer to the executable really) - but this is good for now I think.
Fixes #833