-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Jedi 0.12 #1418
Jedi 0.12 #1418
Conversation
The diff of this PR is quite hard to view, so I'm not 100% sure what you changed. Just one small note: Remember that if you want good virtualenv support you probably have to write a bit of logic to let jedi scan folders for environments (and let users choose). |
@davidhalter I think https://github.com/Microsoft/vscode-python/pull/1418/files#diff-7d38e4fd5066eabf8a4ae3890e028f29 is the only change we made to our code and the Jedi/parso code is straight from the tarballs. Did something specific change in 0.12 in regards to virtualenv support? |
It fundamentally changed. Previously virtualenvs were not really supported. In some cases the sys path was changed by a bit in these earlier versions. Now you can actually choose which environment (Python 2.7, 3.3, 3.4, 3.5... or virtualenv) you want to use for static analysis. Jedi then runs a subprocess in that environment to check for the sys path and other important stuff. However if jedi users don't provide an environment (there's also search functions provided by jedi) you cannot really gain from that and apart from a few minor improvement the feature doesn't help you. |
@davidhalter thanks for the info! I opened #1445 to track this. |
Today when users switch between different Python environments, we re-launch Jedi within that particular python environment. Hence I do not see the need to provide the environment info to the Jedi api. |
@DonJayamanne Yeah, that might work as well. It's pretty similar. It's just that in jedi this complexity exists anyway (for other IDEs/Editors) and you could probably get rid of some code. Makes it way easier. IMO it's also not necessary anymore to use a subprocess for Python (to protect against segfaults etc), because that's already done by Jedi itself now. |
Fixes #1400
Fixes #1033
This pull request: