-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Completion removes previous variable name #16522
Comments
This sounds like a very bad user experience. That said, I cannot reproduce this in JupyterLab 4.1.0 nor 4.2.2 on Firefox nor Chrome: I attempted reproducing on plain installations (without extensions other than the default Binder extensions) but I also tried with @sparanoid can you provide the output of |
Is there anything different about your installation on macbook compared to the installations that you have on Linux? For reference I was testing on Ubuntu. |
Hi @krassowski , this is the output of
I also realized that I have the same behavior in IPython. Can this be related to system libraries? Only when using pure Python, I do not have this behavior. In the video below, both are done it the Jupyter test environment. But the behavior is the same when using the system Python version 3.8 on EL8. ipython.mov |
Ah, so this is an IPython issue. What is in your When I disable Jedi completer manually with:
I can reproduce the issue. My guess is that you have the jedi completer disabled and are using the evaluation-based completer. |
I tried on Binder, but this looks fine even with the current version. I tested different IPython version in a virtual environment using the system Python 3.8 (solving in conda took ages ^^):
The behavior is reflected directly in Jupyter Lab. jupyter-ipython.mov |
OK, there is the problem hidden. Somehow this got into my config years ago. I guess I had problems with completion in a old Python 3.6 environment. Thank you so much, for your help! But I am still wondering, how the behavior changed in the recent versions.. |
Well, this is a bug in IPython introduced/not caught by yours truly so I will have to fix it. For now I opened ipython/ipython#14470 to track this and will close this issue. |
@spreiter opened this as jupyter/notebook#7397, but it appears to be a JupyterLab issue.
Description
When I use completion on an already indented line, the first part is removed. When I instead try the same, where the line begins at position 0, it works at expected. Below I recorded my screen to show the problem.
jupyter-completion-issue.mov
Tested it with a virtual env and conda. Also happens on RHEL 7 on another machine.
Only when using my macbook with Python 3.12 manually installed, it works as expected.
Reproduce
notebook
package manually in the same command (otherwise I can not switch to the classic notebook).The problem persist in Jupyter Lab and the classic notebook. I have this behavior for quite some time. I also removed the
~/.jupyter
folder and recreated the config. But so far, everything without success. When I do the same commands in IPython, everything works just fine.Expected behavior
Keep the previous object/variable
Context
Troubleshoot Output
The text was updated successfully, but these errors were encountered: