Skip to content

No autocomplete/intellisense for new variables created in async functions #140

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

Closed
DonJayamanne opened this issue Nov 13, 2017 · 15 comments
Closed
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug

Comments

@DonJayamanne
Copy link

From @applearound on July 14, 2017 21:18

Environment data

VS Code version: 1.14.1
Python Extension version: 0.6.7
Python Version: 3.6.1
OS and version: Windows 10 Professional 1703

Actual behavior

Define an async function.
Define some variables in the function.
Try to use them below but no autocomplete for them.
And the variables outside the function work fine.

Like:
2017-07-15_05-08-58

Logs

VS Code doesn't show any error logs.

Copied from original issue: DonJayamanne/pythonVSCode#1084

@brettcannon brettcannon added awaiting 1-verification area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug labels Nov 14, 2017
@MikhailArkhipov
Copy link

I see
image

@brettcannon
Copy link
Member

Closing as fixed. 😄

@Nessphoro
Copy link

I would like to re-open this issue.
It doesn't look like it has actually been fixed.

screenshot 2018-04-15 16 37 03

@brettcannon
Copy link
Member

Please make sure you're running the latest version of the extension as I cannot reproduce:
untitled

@Nessphoro
Copy link

@brettcannon Definitely the latest;
I uninstalled it, and installed back again.
It's using a Miniconda python 3.6 fresh environment on OS X.

@brettcannon
Copy link
Member

Did you try re-installing the extension?

@Nessphoro
Copy link

Yes, I just tried it again, uninstalled, restarted VSCode, brought it back and installed 2018.3.1 -- same issue.
If it makes sense, we can hop on Skype and debug it that way.

@brettcannon
Copy link
Member

@Nessphoro do you have Jedi separately installed or specified in your settings.json?

@brettcannon brettcannon added info-needed Issue requires more information from poster and removed needs verification labels Apr 17, 2018
@Nessphoro
Copy link

@brettcannon Nope, settings.json is pretty empty

{
    "python.pythonPath": "/Users/pmalynin/miniconda3/envs/winkel/bin/python"
}

@brettcannon
Copy link
Member

But is Jedi installed in your environment or conda install? (I know this seems a little silly, but since you currently seem to be the only person on the planet with this issue I'm going on the assumption it's a configuration issue or installation issue. We're also looking to update our copy of Jedi in #1418 which might solve this for you if for some reason it is on our side.)

@Nessphoro
Copy link

Nessphoro commented Apr 17, 2018

@brettcannon I understand; Jedi has not been installed.
Here is the print out from conda list

# packages in environment at /Users/pmalynin/miniconda3/envs/winkel:
#
aiodns                    1.1.1                     <pip>
aiohttp                   3.1.3                     <pip>
astroid                   1.6.3                     <pip>
async-timeout             2.0.1                     <pip>
attrs                     17.4.0                    <pip>
beautifulsoup4            4.6.0                     <pip>
certifi                   2016.2.28                py36_0  
chardet                   3.0.4                     <pip>
cssselect                 1.0.3                     <pip>
faiss-cpu                 1.2.1            py36_cuda0.0_1    pytorch
feedfinder2               0.0.4                     <pip>
feedparser                5.2.1                     <pip>
idna                      2.6                       <pip>
idna-ssl                  1.0.1                     <pip>
isort                     4.3.4                     <pip>
jieba3k                   0.35.1                    <pip>
lazy-object-proxy         1.3.1                     <pip>
lxml                      4.2.1                     <pip>
mccabe                    0.6.1                     <pip>
mkl                       2017.0.3                      0  
multidict                 4.2.0                     <pip>
newspaper3k               0.2.6                     <pip>
nltk                      3.2.4                    py36_0  
numpy                     1.13.1                   py36_0  
opencv-python             3.4.0.12                  <pip>
openssl                   1.0.2l                        0  
Pillow                    5.1.0                     <pip>
pip                       9.0.1                    py36_1  
pycares                   2.3.0                     <pip>
pylint                    1.8.4                     <pip>
python                    3.6.2                         0  
python-dateutil           2.7.2                     <pip>
PyYAML                    3.12                      <pip>
readline                  6.2                           2  
requests                  2.14.2                   py36_0  
requests-file             1.4.3                     <pip>
setuptools                36.4.0                   py36_1  
six                       1.11.0                    <pip>
six                       1.10.0                   py36_0  
sqlite                    3.13.0                        0  
tk                        8.5.18                        0  
tldextract                2.2.0                     <pip>
wheel                     0.29.0                   py36_0  
wrapt                     1.10.11                   <pip>
xz                        5.2.3                         0  
yarl                      1.1.1                     <pip>
zlib                      1.2.11                        0  

Also, I just created a completely new environment in conda:
screenshot 2018-04-17 13 42 44

# packages in environment at /Users/pmalynin/miniconda3/envs/cleanenv:
#
certifi                   2016.2.28                py36_0  
openssl                   1.0.2l                        0  
pip                       9.0.1                    py36_1  
python                    3.6.2                         0  
readline                  6.2                           2  
setuptools                36.4.0                   py36_1  
sqlite                    3.13.0                        0  
tk                        8.5.18                        0  
wheel                     0.29.0                   py36_0  
xz                        5.2.3                         0  
zlib                      1.2.11                        0 

And settings.json

{
    "python.pythonPath": "/Users/pmalynin/miniconda3/envs/cleanenv/bin/python"
}

@brettcannon brettcannon added needs verification and removed info-needed Issue requires more information from poster labels Apr 17, 2018
@brettcannon
Copy link
Member

brettcannon commented Apr 19, 2018

I'm finally able to reproduce after our Jedi 0.12.0 upgrade.

var1 = 42

async def foo():
    var2 = False
    var  # Only lists var1.

@brettcannon
Copy link
Member

I have reported this upstream to Jedi.

@JesseTG
Copy link

JesseTG commented Sep 23, 2018

It looks like this has been fixed upstream, but you'll need to update your installation of jedi.

@brettcannon
Copy link
Member

Closing as this is an upstream issue which we don't have direct control or influence over.

@ghost ghost removed the needs upstream fix label Jul 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-intellisense LSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc. bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

5 participants