Skip to content
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

[BUG]: Jupyterlab strange tab-autocomplete fails for instantiated classes within cells #53

Closed
pmreyes2 opened this issue Jun 27, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@pmreyes2
Copy link
Contributor

Tested both in resen-core 2019.1.0 and 2020.1.0 the issue happens only in their notebooks with py36 kernels.
GIF illustrating the issue:

py36_notebook_autocompletion

Autocomplete with tab fails in the second line, after a=np.arange(10) in the second cell. In a new cell it works fine, also if used in the first line of cell 2, before a=np.arange(10). Surprisingly it also works when removing the right parenthesis of np.arange or erasing the a to the left of np.arange.

A similar issue was reported in the Jupyter notebook github repository: jupyter/notebook#4305. Will check later if that solution helps.

@pmreyes2 pmreyes2 added invalid This doesn't seem right bug Something isn't working and removed invalid This doesn't seem right labels Jun 27, 2020
@pmreyes2
Copy link
Contributor Author

pmreyes2 commented Jun 29, 2020

Testing the solution offered at the end of the thread: jupyter/notebook#4305 , which is to disable jedi autocompletion and use the default:

  • (py36) jovyan@2f775514dfed:~$ ipython profile create default
  • edit ~/.ipython/profile_default/ipython_config.py
    and add: c.IPCompleter.use_jedi = False

Now normal behavior of autocompletion for py36 ipython and notebooks is restored, but the nice jedi autocompletion is disabled.:

GIF illustrating the new behavior (jedi autocompletion disabled):

py36_ipython_nojedi

This other open thread report the same issue of ipython: ipython/ipython#11530

@asreimer
Copy link
Contributor

asreimer commented Aug 6, 2020

So this is a problem with the jupyterlab interface. We should track what they do to fix the problem and make sure we upgrade to the next release with the bugfix.

@asreimer asreimer added the wontfix This will not be worked on label Aug 6, 2020
@asreimer asreimer changed the title py36 notebook strange tab-autocomplete fails for instantiated classes within cells [BUG]: Jupyterlab strange tab-autocomplete fails for instantiated classes within cells Sep 10, 2020
@asreimer
Copy link
Contributor

Revisiting this again it was a feature of the jedi package for security reasons, but as of jedi 0.15.0, the issue is fixed.
See: ipython/ipython#11546 (comment) For the discussion on safety, see here: davidhalter/jedi#1299 (comment)

So, I created a new 2020.1.0 bucket and tried the autocomplete example that @pmreyes2 mentioned. We're currently running jedi 0.17.0 in the py36 environment and I can reproduce the problem. If I upgrade jedi to 0.17.2, the issue goes away.

Can you confirm this @pmreyes2?

@asreimer asreimer removed the wontfix This will not be worked on label Sep 10, 2020
@pmreyes2
Copy link
Contributor Author

pmreyes2 commented Sep 10, 2020

@asreimer, that's great. Yes, by upgrading jedi to 0.17.2, the issue goes away.

@asreimer
Copy link
Contributor

Added jedi 0.17.2 to #59. Closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants