You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IntelliSense stopped providing completions for inherited variables and methods since 2018.2.0 #1072
Extension version (available under the Extensions sidebar): 2018.2.1, 2018.3.1
OS and version: macOS 10.12.6
Python version (& distribution if applicable, e.g. Anaconda): 2.7.10, 2.7.11, 2.7.14
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pyenv-virtualenv
Actual behavior
After one of the last updates of vscode-python extension, IntelliSense stopped providing completions for variables and methods inherited from parent classes and/or mixins. Completion is only provided for variables and methods declared on the derived class.
Expected behavior
Completions are available for inherited variables and methods from parent classes and mixins and from derived class.
Steps to reproduce:
Select python2 as an interpreter
Create a class, declare variable and/or method
Create a derived class that inherits from class (1)
changed the title [-]IntelliSense stopped providing completions from parent classes and mixins[/-][+]IntelliSense stopped providing completions for inherited variables and methods[/+]on Mar 14, 2018
Completion also broken in case of relative imports: from . import something show nothing.
In developer console I found same traceback as defined in issue description.
I can reproduce this and I'm not the only one affected. Also it's not isolated to the provided example but our primary project suddenly "lost IntelliSense" .
Two more members from my team also suddenly have the same problem after recent updates.
I don't have Jedi installed globally, nor in my virtualenv that is selected for the project.
-- Update:
I downgraded extension by manually installing 2018.1 from vsix and completion is working as expected on exactly the same project and virtualenv. There is something that causes this behaviour in 2018.2.0 and later.
Unfortunately without a way to reproduce the problem we can't fix it. And we can't roll back the version of Jedi as it fixed a bunch of other bugs that people were encountering. Can you upload a sample project that is triggering the problem?
2018.2.0 and 2018.2.1 have this problem when I select python2 as an interpreter. Doesn't matter if it's the default macOS python2, brew installed python2 or a python2 version installed with pyenv.
I was able to reproduce on following versions:
2.7.10 (macOS)
2.7.11 (pyenv)
2.7.14 (brew)
2.7.14 (pyenv)
IntelliSense works on both 2018.2 releases when python3 (3.6.3 in my case) is selected as the project interpreter.
Can you upload a sample project that is triggering the problem?
I'm able to reproduce this without project - with a new instance of vscode, just open a new, empty file, select python syntax and paste the calculator example. It's enough to trigger the problem after selecting python2 as an interpreter.
-- Update
On python2, items returned from provideCompletionItems after triggering completion on calc. contains:
So it sounds like a problem in Jedi itself that broke with the 0.11 release. Perhaps it's because you're using classic classes instead of new-style classes in Python 2 (i.e. you're not inheriting from object)?
Perhaps it's because you're using classic classes instead of new-style classes in Python 2 (i.e. you're not inheriting from object)?
Doesn't make any difference. Checked right now with the calc example. Also, in our project all base classes and mixins do inherit from object and use the new-style classes.
Would someone like to file this issue upstream?
I think it's better if one of the vscode-python maintainers reports this issue. You know more details about which version of Jedi is embedded and how it was altered or integrated.
Activity
[-]IntelliSense stopped providing completions from parent classes and mixins[/-][+]IntelliSense stopped providing completions for inherited variables and methods[/+]Gr1N commentedon Mar 14, 2018
Completion also broken in case of relative imports:
from . import somethingshow nothing.In developer console I found same traceback as defined in issue description.
brettcannon commentedon Mar 20, 2018
I can't reproduce:

Code used to test
Do you happen to have Jedi installed globally?
P.S.: That traceback doesn't really matter plus we have fixed it for
2018.3.0.jsynowiec commentedon Mar 21, 2018
I can reproduce this and I'm not the only one affected. Also it's not isolated to the provided example but our primary project suddenly "lost IntelliSense" .
Two more members from my team also suddenly have the same problem after recent updates.
I don't have Jedi installed globally, nor in my virtualenv that is selected for the project.
-- Update:
I downgraded extension by manually installing 2018.1 from vsix and completion is working as expected on exactly the same project and virtualenv. There is something that causes this behaviour in
2018.2.0and later.2018.1.0

vs 2018.2.1

I request to reopen this issue.
cc: Don Jayamanne (@DonJayamanne)
brettcannon commentedon Mar 21, 2018
Unfortunately without a way to reproduce the problem we can't fix it. And we can't roll back the version of Jedi as it fixed a bunch of other bugs that people were encountering. Can you upload a sample project that is triggering the problem?
jsynowiec commentedon Mar 22, 2018
2018.2.0and2018.2.1have this problem when I select python2 as an interpreter. Doesn't matter if it's the default macOS python2, brew installed python2 or a python2 version installed with pyenv.I was able to reproduce on following versions:
IntelliSense works on both
2018.2releases when python3 (3.6.3 in my case) is selected as the project interpreter.I'm able to reproduce this without project - with a new instance of vscode, just open a new, empty file, select
pythonsyntax and paste the calculator example. It's enough to trigger the problem after selecting python2 as an interpreter.-- Update
On python2,
itemsreturned fromprovideCompletionItemsafter triggering completion oncalc.contains:[ { "kind": 2, "label": "multiply_factor", "sortText": "__multiply_factor", }, ]I don't know how to debug the language server part so I was able only to trace to sending commands to jediProxy.
3 remaining items
NateScarlet commentedon Mar 27, 2018
Same issue,
I'm using python 2.7.13(pipenv), no IntelliSense for inherted mixin methods,
but it works fine when i switch to python 3.6.4.
grechut commentedon Mar 27, 2018
Same here, py2.7.11 (pyenv)
brettcannon commentedon Mar 27, 2018
So it sounds like a problem in Jedi itself that broke with the 0.11 release. Perhaps it's because you're using classic classes instead of new-style classes in Python 2 (i.e. you're not inheriting from
object)?Would someone like to file this issue upstream?
jsynowiec commentedon Mar 27, 2018
Doesn't make any difference. Checked right now with the calc example. Also, in our project all base classes and mixins do inherit from
objectand use the new-style classes.I think it's better if one of the vscode-python maintainers reports this issue. You know more details about which version of Jedi is embedded and how it was altered or integrated.
brettcannon commentedon Mar 27, 2018
Dave Halter (@davidhalter) is this a known regression in Jedi?
davidhalter commentedon Apr 4, 2018
This is not a known regression. It's a bug, I can just confirm with latest Jedi master. Thanks for finding it.
davidhalter commentedon Apr 10, 2018
Fixed on Jedi master.
MikhailArkhipov commentedon Apr 17, 2018
#1418