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

Completion removes previous variable name #16522

Closed
JasonWeill opened this issue Jun 25, 2024 · 7 comments
Closed

Completion removes previous variable name #16522

JasonWeill opened this issue Jun 25, 2024 · 7 comments

Comments

@JasonWeill
Copy link
Contributor

@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

  1. Created the environment as described in https://jupyterlab.readthedocs.io/en/latest/getting_started/issue.html and added the notebook package manually in the same command (otherwise I can not switch to the classic notebook).
  2. Create any variable.
  3. Use TAB completion

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

  • Operating System and version: Rocky Linux release 8.9 (Green Obsidian)
  • Browser and version: Firefox 126.0.1 and Safari 16.6.1
  • Jupyter Notebook version:
IPython          : 8.25.0
ipykernel        : 6.29.4
ipywidgets       : not installed
jupyter_client   : 8.6.2
jupyter_core     : 5.7.2
jupyter_server   : 2.14.1
jupyterlab       : 4.2.2
nbclient         : 0.10.0
nbconvert        : 7.16.4
nbformat         : 5.10.4
notebook         : 7.2.1
qtconsole        : not installed
traitlets        : 5.14.3
Troubleshoot Output
$PATH:
	/home/XXX/anaconda3/envs/jlab-test/bin
	/home/XXX/anaconda3/condabin
	/usr/local/texlive/2023/bin/x86_64-linux
	/usr/share/Modules/bin
	/home/XXX/.local/bin
	/usr/local/bin
	/usr/bin
	/usr/local/sbin
	/usr/sbin
	/home/sreiter/bin
	/opt/epics/base/bin/linux-x86_64
	/opt/epics/ioc/bin/linux-x86_64
	/var/lib/snapd/snap/bin

sys.path:
/home/XXX/anaconda3/envs/jlab-test/bin
/home/XXX/anaconda3/envs/jlab-test/lib/python312.zip
/home/XXX/anaconda3/envs/jlab-test/lib/python3.12
/home/XXX/anaconda3/envs/jlab-test/lib/python3.12/lib-dynload
/home/XXX/anaconda3/envs/jlab-test/lib/python3.12/site-packages

sys.executable:
/home/XXX/anaconda3/envs/jlab-test/bin/python

sys.version:
3.12.3 | packaged by conda-forge | (main, Apr 15 2024, 18:38:13) [GCC 12.3.0]

platform.platform():
Linux-4.18.0-513.24.1.el8_9.x86_64-x86_64-with-glibc2.28

which -a jupyter:
/home/XXX/anaconda3/envs/jlab-test/bin/jupyter

pip list:
Package Version
------------------------- --------------
anyio 4.4.0
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asttokens 2.4.1
async-lru 2.0.4
attrs 23.2.0
Babel 2.14.0
beautifulsoup4 4.12.3
bleach 6.1.0
Brotli 1.1.0
cached-property 1.5.2
certifi 2024.6.2
cffi 1.16.0
charset-normalizer 3.3.2
comm 0.2.2
debugpy 1.8.1
decorator 5.1.1
defusedxml 0.7.1
entrypoints 0.4
exceptiongroup 1.2.0
executing 2.0.1
fastjsonschema 2.19.1
fqdn 1.5.1
h11 0.14.0
h2 4.1.0
hpack 4.0.0
httpcore 1.0.5
httpx 0.27.0
hyperframe 6.0.1
idna 3.7
importlib_metadata 7.1.0
importlib_resources 6.4.0
ipykernel 6.29.4
ipython 8.25.0
isoduration 20.11.0
jedi 0.19.1
Jinja2 3.1.4
json5 0.9.25
jsonpointer 2.4
jsonschema 4.22.0
jsonschema-specifications 2023.12.1
jupyter_client 8.6.2
jupyter_core 5.7.2
jupyter-events 0.10.0
jupyter-lsp 2.2.5
jupyter_server 2.14.1
jupyter_server_terminals 0.5.3
jupyterlab 4.2.2
jupyterlab_pygments 0.3.0
jupyterlab_server 2.27.2
MarkupSafe 2.1.5
matplotlib-inline 0.1.7
mistune 3.0.2
nbclient 0.10.0
nbconvert 7.16.4
nbformat 5.10.4
nest_asyncio 1.6.0
notebook 7.2.1
notebook_shim 0.2.4
overrides 7.7.0
packaging 24.0
pandocfilters 1.5.0
parso 0.8.4
pexpect 4.9.0
pickleshare 0.7.5
pip 24.0
pkgutil_resolve_name 1.3.10
platformdirs 4.2.2
prometheus_client 0.20.0
prompt_toolkit 3.0.47
psutil 5.9.8
ptyprocess 0.7.0
pure-eval 0.2.2
pycparser 2.22
Pygments 2.18.0
PySocks 1.7.1
python-dateutil 2.9.0
python-json-logger 2.0.7
pytz 2024.1
PyYAML 6.0.1
pyzmq 26.0.3
referencing 0.35.1
requests 2.32.3
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rpds-py 0.18.1
Send2Trash 1.8.3
setuptools 70.0.0
six 1.16.0
sniffio 1.3.1
soupsieve 2.5
stack-data 0.6.2
terminado 0.18.1
tinycss2 1.3.0
tomli 2.0.1
tornado 6.4.1
traitlets 5.14.3
types-python-dateutil 2.9.0.20240316
typing_extensions 4.12.2
typing-utils 0.1.0
uri-template 1.3.0
urllib3 2.2.1
wcwidth 0.2.13
webcolors 24.6.0
webencodings 0.5.1
websocket-client 1.8.0
wheel 0.43.0
zipp 3.19.2

conda list:
# packages in environment at /home/XXX/anaconda3/envs/jlab-test:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 2_gnu conda-forge
anyio 4.4.0 pyhd8ed1ab_0 conda-forge
argon2-cffi 23.1.0 pyhd8ed1ab_0 conda-forge
argon2-cffi-bindings 21.2.0 py312h98912ed_4 conda-forge
arrow 1.3.0 pyhd8ed1ab_0 conda-forge
asttokens 2.4.1 pyhd8ed1ab_0 conda-forge
async-lru 2.0.4 pyhd8ed1ab_0 conda-forge
attrs 23.2.0 pyh71513ae_0 conda-forge
babel 2.14.0 pyhd8ed1ab_0 conda-forge
beautifulsoup4 4.12.3 pyha770c72_0 conda-forge
bleach 6.1.0 pyhd8ed1ab_0 conda-forge
brotli-python 1.1.0 py312h30efb56_1 conda-forge
bzip2 1.0.8 hd590300_5 conda-forge
ca-certificates 2024.6.2 hbcca054_0 conda-forge
cached-property 1.5.2 hd8ed1ab_1 conda-forge
cached_property 1.5.2 pyha770c72_1 conda-forge
certifi 2024.6.2 pyhd8ed1ab_0 conda-forge
cffi 1.16.0 py312hf06ca03_0 conda-forge
charset-normalizer 3.3.2 pyhd8ed1ab_0 conda-forge
comm 0.2.2 pyhd8ed1ab_0 conda-forge
debugpy 1.8.1 py312h30efb56_0 conda-forge
decorator 5.1.1 pyhd8ed1ab_0 conda-forge
defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge
entrypoints 0.4 pyhd8ed1ab_0 conda-forge
exceptiongroup 1.2.0 pyhd8ed1ab_2 conda-forge
executing 2.0.1 pyhd8ed1ab_0 conda-forge
fqdn 1.5.1 pyhd8ed1ab_0 conda-forge
h11 0.14.0 pyhd8ed1ab_0 conda-forge
h2 4.1.0 pyhd8ed1ab_0 conda-forge
hpack 4.0.0 pyh9f0ad1d_0 conda-forge
httpcore 1.0.5 pyhd8ed1ab_0 conda-forge
httpx 0.27.0 pyhd8ed1ab_0 conda-forge
hyperframe 6.0.1 pyhd8ed1ab_0 conda-forge
idna 3.7 pyhd8ed1ab_0 conda-forge
importlib-metadata 7.1.0 pyha770c72_0 conda-forge
importlib_metadata 7.1.0 hd8ed1ab_0 conda-forge
importlib_resources 6.4.0 pyhd8ed1ab_0 conda-forge
ipykernel 6.29.4 pyh3099207_0 conda-forge
ipython 8.25.0 pyh707e725_0 conda-forge
isoduration 20.11.0 pyhd8ed1ab_0 conda-forge
jedi 0.19.1 pyhd8ed1ab_0 conda-forge
jinja2 3.1.4 pyhd8ed1ab_0 conda-forge
json5 0.9.25 pyhd8ed1ab_0 conda-forge
jsonpointer 2.4 py312h7900ff3_3 conda-forge
jsonschema 4.22.0 pyhd8ed1ab_0 conda-forge
jsonschema-specifications 2023.12.1 pyhd8ed1ab_0 conda-forge
jsonschema-with-format-nongpl 4.22.0 pyhd8ed1ab_0 conda-forge
jupyter-lsp 2.2.5 pyhd8ed1ab_0 conda-forge
jupyter_client 8.6.2 pyhd8ed1ab_0 conda-forge
jupyter_core 5.7.2 py312h7900ff3_0 conda-forge
jupyter_events 0.10.0 pyhd8ed1ab_0 conda-forge
jupyter_server 2.14.1 pyhd8ed1ab_0 conda-forge
jupyter_server_terminals 0.5.3 pyhd8ed1ab_0 conda-forge
jupyterlab 4.2.2 pyhd8ed1ab_0 conda-forge
jupyterlab_pygments 0.3.0 pyhd8ed1ab_1 conda-forge
jupyterlab_server 2.27.2 pyhd8ed1ab_0 conda-forge
keyutils 1.6.1 h166bdaf_0 conda-forge
krb5 1.21.2 h659d440_0 conda-forge
ld_impl_linux-64 2.40 hf3520f5_3 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libexpat 2.6.2 h59595ed_0 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-ng 13.2.0 h77fa898_7 conda-forge
libgomp 13.2.0 h77fa898_7 conda-forge
libnsl 2.0.1 hd590300_0 conda-forge
libsodium 1.0.18 h36c2ea0_1 conda-forge
libsqlite 3.46.0 hde9e2c9_0 conda-forge
libstdcxx-ng 13.2.0 hc0a3c3a_7 conda-forge
libuuid 2.38.1 h0b41bf4_0 conda-forge
libxcrypt 4.4.36 hd590300_1 conda-forge
libzlib 1.3.1 h4ab18f5_1 conda-forge
markupsafe 2.1.5 py312h98912ed_0 conda-forge
matplotlib-inline 0.1.7 pyhd8ed1ab_0 conda-forge
mistune 3.0.2 pyhd8ed1ab_0 conda-forge
nbclient 0.10.0 pyhd8ed1ab_0 conda-forge
nbconvert-core 7.16.4 pyhd8ed1ab_0 conda-forge
nbformat 5.10.4 pyhd8ed1ab_0 conda-forge
ncurses 6.5 h59595ed_0 conda-forge
nest-asyncio 1.6.0 pyhd8ed1ab_0 conda-forge
notebook 7.2.1 pyhd8ed1ab_0 conda-forge
notebook-shim 0.2.4 pyhd8ed1ab_0 conda-forge
openssl 3.3.1 h4ab18f5_0 conda-forge
overrides 7.7.0 pyhd8ed1ab_0 conda-forge
packaging 24.0 pyhd8ed1ab_0 conda-forge
pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge
parso 0.8.4 pyhd8ed1ab_0 conda-forge
pexpect 4.9.0 pyhd8ed1ab_0 conda-forge
pickleshare 0.7.5 py_1003 conda-forge
pip 24.0 pyhd8ed1ab_0 conda-forge
pkgutil-resolve-name 1.3.10 pyhd8ed1ab_1 conda-forge
platformdirs 4.2.2 pyhd8ed1ab_0 conda-forge
prometheus_client 0.20.0 pyhd8ed1ab_0 conda-forge
prompt-toolkit 3.0.47 pyha770c72_0 conda-forge
psutil 5.9.8 py312h98912ed_0 conda-forge
ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge
pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge
pycparser 2.22 pyhd8ed1ab_0 conda-forge
pygments 2.18.0 pyhd8ed1ab_0 conda-forge
pysocks 1.7.1 pyha2e5f31_6 conda-forge
python 3.12.3 hab00c5b_0_cpython conda-forge
python-dateutil 2.9.0 pyhd8ed1ab_0 conda-forge
python-fastjsonschema 2.19.1 pyhd8ed1ab_0 conda-forge
python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge
python_abi 3.12 4_cp312 conda-forge
pytz 2024.1 pyhd8ed1ab_0 conda-forge
pyyaml 6.0.1 py312h98912ed_1 conda-forge
pyzmq 26.0.3 py312h8fd38d8_0 conda-forge
readline 8.2 h8228510_1 conda-forge
referencing 0.35.1 pyhd8ed1ab_0 conda-forge
requests 2.32.3 pyhd8ed1ab_0 conda-forge
rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge
rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge
rpds-py 0.18.1 py312h4413252_0 conda-forge
send2trash 1.8.3 pyh0d859eb_0 conda-forge
setuptools 70.0.0 pyhd8ed1ab_0 conda-forge
six 1.16.0 pyh6c4a22f_0 conda-forge
sniffio 1.3.1 pyhd8ed1ab_0 conda-forge
soupsieve 2.5 pyhd8ed1ab_1 conda-forge
stack_data 0.6.2 pyhd8ed1ab_0 conda-forge
terminado 0.18.1 pyh0d859eb_0 conda-forge
tinycss2 1.3.0 pyhd8ed1ab_0 conda-forge
tk 8.6.13 noxft_h4845f30_101 conda-forge
tomli 2.0.1 pyhd8ed1ab_0 conda-forge
tornado 6.4.1 py312h9a8786e_0 conda-forge
traitlets 5.14.3 pyhd8ed1ab_0 conda-forge
types-python-dateutil 2.9.0.20240316 pyhd8ed1ab_0 conda-forge
typing-extensions 4.12.2 hd8ed1ab_0 conda-forge
typing_extensions 4.12.2 pyha770c72_0 conda-forge
typing_utils 0.1.0 pyhd8ed1ab_0 conda-forge
tzdata 2024a h0c530f3_0 conda-forge
uri-template 1.3.0 pyhd8ed1ab_0 conda-forge
urllib3 2.2.1 pyhd8ed1ab_0 conda-forge
wcwidth 0.2.13 pyhd8ed1ab_0 conda-forge
webcolors 24.6.0 pyhd8ed1ab_0 conda-forge
webencodings 0.5.1 pyhd8ed1ab_2 conda-forge
websocket-client 1.8.0 pyhd8ed1ab_0 conda-forge
wheel 0.43.0 pyhd8ed1ab_1 conda-forge
xz 5.2.6 h166bdaf_0 conda-forge
yaml 0.2.5 h7f98852_2 conda-forge
zeromq 4.3.5 h75354e8_4 conda-forge
zipp 3.19.2 pyhd8ed1ab_0 conda-forge

conda env:
name: jlab-test
channels:
- defaults
- conda-forge
dependencies:
- _libgcc_mutex=0.1=conda_forge
- _openmp_mutex=4.5=2_gnu
- anyio=4.4.0=pyhd8ed1ab_0
- argon2-cffi=23.1.0=pyhd8ed1ab_0
- argon2-cffi-bindings=21.2.0=py312h98912ed_4
- arrow=1.3.0=pyhd8ed1ab_0
- asttokens=2.4.1=pyhd8ed1ab_0
- async-lru=2.0.4=pyhd8ed1ab_0
- attrs=23.2.0=pyh71513ae_0
- babel=2.14.0=pyhd8ed1ab_0
- beautifulsoup4=4.12.3=pyha770c72_0
- bleach=6.1.0=pyhd8ed1ab_0
- brotli-python=1.1.0=py312h30efb56_1
- bzip2=1.0.8=hd590300_5
- ca-certificates=2024.6.2=hbcca054_0
- cached-property=1.5.2=hd8ed1ab_1
- cached_property=1.5.2=pyha770c72_1
- certifi=2024.6.2=pyhd8ed1ab_0
- cffi=1.16.0=py312hf06ca03_0
- charset-normalizer=3.3.2=pyhd8ed1ab_0
- comm=0.2.2=pyhd8ed1ab_0
- debugpy=1.8.1=py312h30efb56_0
- decorator=5.1.1=pyhd8ed1ab_0
- defusedxml=0.7.1=pyhd8ed1ab_0
- entrypoints=0.4=pyhd8ed1ab_0
- exceptiongroup=1.2.0=pyhd8ed1ab_2
- executing=2.0.1=pyhd8ed1ab_0
- fqdn=1.5.1=pyhd8ed1ab_0
- h11=0.14.0=pyhd8ed1ab_0
- h2=4.1.0=pyhd8ed1ab_0
- hpack=4.0.0=pyh9f0ad1d_0
- httpcore=1.0.5=pyhd8ed1ab_0
- httpx=0.27.0=pyhd8ed1ab_0
- hyperframe=6.0.1=pyhd8ed1ab_0
- idna=3.7=pyhd8ed1ab_0
- importlib-metadata=7.1.0=pyha770c72_0
- importlib_metadata=7.1.0=hd8ed1ab_0
- importlib_resources=6.4.0=pyhd8ed1ab_0
- ipykernel=6.29.4=pyh3099207_0
- ipython=8.25.0=pyh707e725_0
- isoduration=20.11.0=pyhd8ed1ab_0
- jedi=0.19.1=pyhd8ed1ab_0
- jinja2=3.1.4=pyhd8ed1ab_0
- json5=0.9.25=pyhd8ed1ab_0
- jsonpointer=2.4=py312h7900ff3_3
- jsonschema=4.22.0=pyhd8ed1ab_0
- jsonschema-specifications=2023.12.1=pyhd8ed1ab_0
- jsonschema-with-format-nongpl=4.22.0=pyhd8ed1ab_0
- jupyter-lsp=2.2.5=pyhd8ed1ab_0
- jupyter_client=8.6.2=pyhd8ed1ab_0
- jupyter_core=5.7.2=py312h7900ff3_0
- jupyter_events=0.10.0=pyhd8ed1ab_0
- jupyter_server=2.14.1=pyhd8ed1ab_0
- jupyter_server_terminals=0.5.3=pyhd8ed1ab_0
- jupyterlab=4.2.2=pyhd8ed1ab_0
- jupyterlab_pygments=0.3.0=pyhd8ed1ab_1
- jupyterlab_server=2.27.2=pyhd8ed1ab_0
- keyutils=1.6.1=h166bdaf_0
- krb5=1.21.2=h659d440_0
- ld_impl_linux-64=2.40=hf3520f5_3
- libedit=3.1.20191231=he28a2e2_2
- libexpat=2.6.2=h59595ed_0
- libffi=3.4.2=h7f98852_5
- libgcc-ng=13.2.0=h77fa898_7
- libgomp=13.2.0=h77fa898_7
- libnsl=2.0.1=hd590300_0
- libsodium=1.0.18=h36c2ea0_1
- libsqlite=3.46.0=hde9e2c9_0
- libstdcxx-ng=13.2.0=hc0a3c3a_7
- libuuid=2.38.1=h0b41bf4_0
- libxcrypt=4.4.36=hd590300_1
- libzlib=1.3.1=h4ab18f5_1
- markupsafe=2.1.5=py312h98912ed_0
- matplotlib-inline=0.1.7=pyhd8ed1ab_0
- mistune=3.0.2=pyhd8ed1ab_0
- nbclient=0.10.0=pyhd8ed1ab_0
- nbconvert-core=7.16.4=pyhd8ed1ab_0
- nbformat=5.10.4=pyhd8ed1ab_0
- ncurses=6.5=h59595ed_0
- nest-asyncio=1.6.0=pyhd8ed1ab_0
- notebook=7.2.1=pyhd8ed1ab_0
- notebook-shim=0.2.4=pyhd8ed1ab_0
- openssl=3.3.1=h4ab18f5_0
- overrides=7.7.0=pyhd8ed1ab_0
- packaging=24.0=pyhd8ed1ab_0
- pandocfilters=1.5.0=pyhd8ed1ab_0
- parso=0.8.4=pyhd8ed1ab_0
- pexpect=4.9.0=pyhd8ed1ab_0
- pickleshare=0.7.5=py_1003
- pip=24.0=pyhd8ed1ab_0
- pkgutil-resolve-name=1.3.10=pyhd8ed1ab_1
- platformdirs=4.2.2=pyhd8ed1ab_0
- prometheus_client=0.20.0=pyhd8ed1ab_0
- prompt-toolkit=3.0.47=pyha770c72_0
- psutil=5.9.8=py312h98912ed_0
- ptyprocess=0.7.0=pyhd3deb0d_0
- pure_eval=0.2.2=pyhd8ed1ab_0
- pycparser=2.22=pyhd8ed1ab_0
- pygments=2.18.0=pyhd8ed1ab_0
- pysocks=1.7.1=pyha2e5f31_6
- python=3.12.3=hab00c5b_0_cpython
- python-dateutil=2.9.0=pyhd8ed1ab_0
- python-fastjsonschema=2.19.1=pyhd8ed1ab_0
- python-json-logger=2.0.7=pyhd8ed1ab_0
- python_abi=3.12=4_cp312
- pytz=2024.1=pyhd8ed1ab_0
- pyyaml=6.0.1=py312h98912ed_1
- pyzmq=26.0.3=py312h8fd38d8_0
- readline=8.2=h8228510_1
- referencing=0.35.1=pyhd8ed1ab_0
- requests=2.32.3=pyhd8ed1ab_0
- rfc3339-validator=0.1.4=pyhd8ed1ab_0
- rfc3986-validator=0.1.1=pyh9f0ad1d_0
- rpds-py=0.18.1=py312h4413252_0
- send2trash=1.8.3=pyh0d859eb_0
- setuptools=70.0.0=pyhd8ed1ab_0
- six=1.16.0=pyh6c4a22f_0
- sniffio=1.3.1=pyhd8ed1ab_0
- soupsieve=2.5=pyhd8ed1ab_1
- stack_data=0.6.2=pyhd8ed1ab_0
- terminado=0.18.1=pyh0d859eb_0
- tinycss2=1.3.0=pyhd8ed1ab_0
- tk=8.6.13=noxft_h4845f30_101
- tomli=2.0.1=pyhd8ed1ab_0
- tornado=6.4.1=py312h9a8786e_0
- traitlets=5.14.3=pyhd8ed1ab_0
- types-python-dateutil=2.9.0.20240316=pyhd8ed1ab_0
- typing-extensions=4.12.2=hd8ed1ab_0
- typing_extensions=4.12.2=pyha770c72_0
- typing_utils=0.1.0=pyhd8ed1ab_0
- tzdata=2024a=h0c530f3_0
- uri-template=1.3.0=pyhd8ed1ab_0
- urllib3=2.2.1=pyhd8ed1ab_0
- wcwidth=0.2.13=pyhd8ed1ab_0
- webcolors=24.6.0=pyhd8ed1ab_0
- webencodings=0.5.1=pyhd8ed1ab_2
- websocket-client=1.8.0=pyhd8ed1ab_0
- wheel=0.43.0=pyhd8ed1ab_1
- xz=5.2.6=h166bdaf_0
- yaml=0.2.5=h7f98852_2
- zeromq=4.3.5=h75354e8_4
- zipp=3.19.2=pyhd8ed1ab_0
prefix: /home/XXX/anaconda3/envs/jlab-test

@krassowski
Copy link
Member

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:

cannot-repro-4 1
cannot-repro-4 2

I attempted reproducing on plain installations (without extensions other than the default Binder extensions) but I also tried with jupyterlab-lsp and could not get this bug to show up either.

@sparanoid can you provide the output of jupyter labextension list? Separately, can you check if you can reproduce this on 4.2.2 from this list of binders for regression testing and if so, can you check a few older versions to narrow down when it started happening?

@krassowski
Copy link
Member

Only when using my macbook with Python 3.12 manually installed, it works as expected.

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.

@spreiter
Copy link

Hi @krassowski ,

this is the output of jupyter labextension list:

$ jupyter labextension list
JupyterLab v4.2.2
/home/XXX/anaconda3/envs/jlab-test/share/jupyter/labextensions
        jupyterlab_pygments v0.3.0 enabled OK (python, jupyterlab_pygments)
        @jupyter-notebook/lab-extension v7.2.1 enabled OK

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

@krassowski
Copy link
Member

Ah, so this is an IPython issue. What is in your ipython_config.py file? Reference https://ipython.readthedocs.io/en/stable/config/intro.html#the-ipython-directory

When I disable Jedi completer manually with:

%config IPCompleter.use_jedi=False

I can reproduce the issue. My guess is that you have the jedi completer disabled and are using the evaluation-based completer.

@spreiter
Copy link

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 ^^):

  • 8.7 works fine
  • 8.8 introduces a bug, where the the entire line is indented additionally; completion still works
  • 8.11 removes the first part

The behavior is reflected directly in Jupyter Lab.

jupyter-ipython.mov

@spreiter
Copy link

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..

@krassowski
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants