ipython 7.6.1
jedi 0.14.0
python 3.7.3
In [1]: import numpy
In [2]: import IPython
In [3]: ipy = IPython.get_ipython()
In [4]: ipy.Completer.all_completions("numpy.")
Out[4]: []
On jedi 0.13.3, tab completion still doesn't work, but it claims it can generate the completions now.
ipy.Completer.all_completions("numpy.")
Out[4]:
['numpy.abs',
'numpy.absolute',
'numpy.absolute_import',
'numpy.add',
'numpy.add_docstring',
# ...
Proably related to #1370, fix coming soon.
Downgrading to 0.13.3, it actually does work, it's just very very slow. pip uninstall jedi works for now to get standard (non-awesome) autocompletion.
It is also a problem in Jupyter, no autocomplete there on 0.14.0.
This thread describing the issue on the IPython side claims using jedi + python repl works just fine, so it seems it's an IPython issue?
It seems to work for me, but maybe numpy is installed in a different way for you and the bug I quoted above is still the issue.
I'm sorry for confusing everyone with my post on ipython/ipython#11798 but indeed the problem seems to be in jedi and it seems to be related to #1370 as correctly identified by @davidhalter.
The reason for my confusion was a virtualenv configuration error on my system, which caused python repl to use jedi==0.12, despite the fact that I was having activated a virtualenv with jedi==0.14.1.
The steps to reproduce the problem is:
virtualenv --python python3 jedi-completion-bug
source jedi-completion-bug/bin/activate
pip install jedi
export PYTHONSTARTUP=$(python -m jedi repl)
python
>> import sys
>> sys.<tab>
The above sequence triggers an AssertionError: <MixedObject: <module 'sys' (built-in)>> at:
_jedi/evaluate/gradual/conversion.py", line 43, in _infer_from_stub_
I guess now we'll wait for the fix.
I just merged #1370, so this should be fixed. Wait for the next release or test it now. I will of course reopen if it's still an issue with the next release.
Just chiming in here from the IPython side to confirm that this issue is indeed fixed in master (3a9dc0ca2e2f9fd35b3a30a1cfb1653cb600bb4c)
Just installed the latetst jedi (499408657bd350662a9a779d8bc6643b1acb6523) and ipython
(1879ed27bb0ec3be5fee499ac177ad14a9ef7cfd). This issue isn't fixed.
Python 3.7.3 (default, Mar 28 2019, 10:38:38) [MSC v.1915 32 bit (Intel)]
Strange. Also numpy.? I doubt that it's not fixed, because for me it's working now, when it wasn't before this patch.
Also numpy.?
Yes.
I doubt that it's not fixed, because for me it's working now, when it wasn't before this patch.
I have checked on an Ubuntu machine. It doesn't work there too. I have also upgraded parso just to be sure that it is not because of it.
Are you sure that you are using the right Jedi version? Also if you actually want to help me debug this, could you just run it like this:
>>> import jedi, numpy, sys
>>> sys.version_info
sys.version_info(major=3, minor=5, micro=2, releaselevel='final', serial=0)
>>> jedi.__version__
'0.14.1'
>>> jedi.Interpreter('numpy.', [globals()]).completions()
[<Completion...]
? I want to see a traceback. Currently I have no idea how to reproduce your case.
Fixed something else that might be related to this. Can you retry? You need to do it with master.
Now works, thank you!
Confirmed working in jedi 0.15.1. ipython 7.7.0 python 3.7.4
Thanks so much!
This issue does not repro, but a similar thing is broken in https://github.com/davidhalter/jedi/issues/1415
jedi==0.15.1
ipython==7.8.0
Python 3.7.4
In [1]: import IPython
In [2]: ipy = IPython.get_ipython()
In [3]: from unittest import mock
In [4]: ipy.Completer.all_completions("mock.")
Out[4]: []
In [5]: ipy.Completer.all_completions("mock.p")
Out[5]: ['mock.partial', 'mock.patch', 'mock.pprint']
@maxwellmckinnon Please open a new issue.
Stock download+install of Anaconda3 has broken autocomplete in Jupyter. Do I report the issue here since autocomplete works if I run this:
%config IPCompleter.use_jedi = False
Not really. It might have to do something with the versions. If it worked before, anaconda3 might you a different version than jupyter. It might be worth isolating that stuff with virtualenvs.
I run into this problem. It seems that the problem is with the parse file. In fact, I applied conda update --all -c conda-forge. This seems to have fixed the problem by changing the version of parso; which was downgraded
parso 0.8.0-py_0 --> 0.5.2-py_0
So. I acknowledge that the problem exist and it was activated when I updated conda version to latest 4.8.4. Update caused the problem
See also https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/issues/81#event-3664361521 (It's a conda bug).
Thanks for sharing your knowledge
Atentamente,
Lenin Falconà Estrada
El lun., 24 ago. 2020 a las 6:05, Dave Halter (notifications@github.com)
escribió:
See also conda-forge/conda-forge-repodata-patches-feedstock#81 (comment)
https://github.com/conda-forge/conda-forge-repodata-patches-feedstock/issues/81#event-3664361521
(It's a conda bug).—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/davidhalter/jedi/issues/1373#issuecomment-679061801,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AH7TWKI4C7HO7V5T7BTAV3TSCJCRLANCNFSM4IFEUZGA
.
Just came over to this thread with the same issue, and I'd noticed that an old conda install seemed to have the right package versions that allowed for stable tab-autocomplete. Here are the versions that seem to work for me right now (running Python 3.8.7):
backcall==0.1.0
Click==7.0
colorama==0.4.3
decorator==4.4.1
ipython==7.12.0
ipython-genutils==0.2.0
itsdangerous==1.1.0
jedi==0.14.0
Jinja2==2.11.1
MarkupSafe==1.1.1
parso==0.5.2
pickleshare==0.7.5
prompt-toolkit==3.0.3
Pygments==2.5.2
six==1.14.0
traitlets==4.3.3
wcwidth==0.1.8
Werkzeug==1.0.0
I'm afraid that I haven't been able to narrow down further into which exact packages were the troublemakers, but I hope this works out for you.
Remember to always read closed issues: https://github.com/davidhalter/jedi/issues/1714
Most helpful comment
Downgrading to 0.13.3, it actually does work, it's just very very slow.
pip uninstall jediworks for now to get standard (non-awesome) autocompletion.