jupyterlab-lsp: c.Completer.use_jedi instruction may be pointing to the wrong config file

What I am trying to do…

Speed up tab completion by telling IPython not to use Jedi

How I would like to learn how to do it…

Following the Readme

How the project might keep the docs accurate…

The readme says to modify c.Completer.use_jedi in ipython_kernel_config.py but I believe that this config setting is actually defined in ipython_config.py.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (21 by maintainers)

Most upvoted comments

@g6ai I just dropped the <0.18.0 pin here

FYI I am getting issues with jedi 0.18. My pyls won’t initialize and the jupyter lab logs are saying theres a dependency conflict with jedi.

Ah, yes! Sorry about not being clear/saying it in a misleading manner. The codebase of the pyls fork is compatible with Jedi 0.18 and even with Jedi master, but there is a pin that needs to be manually changed for pyls to work, so it will not work by installing it as-is but will require cloning -> changing the pin in setup.py -> pip install .. Plus the IPython version stuff. In any case 0.18 support is not production-ready yet, it’s more like “if you really want to check it out for benchmark, then it is possible”.

Thanks @martinRenou! I just opened issue https://github.com/jupyter-xeus/xeus-python/issues/417. Not sure if this is actually an issue or not, as I’m a bit confused myself. See the other issue for the confusion

the direct dependency on jedi is now gone but there is IPython, which would still use jedi if available, so the config in theory should be still needed and useful if the complete request is relayed to IPython

Indeed, we used to rely on jedi for custom completion logic, but we now let IPython handle everything.

The readme says to modify c.Completer.use_jedi in ipython_kernel_config.py

IIRC xeus-python should ignore ipython_kernel_config.py as it is the ipykernel config, but it uses ipython_config.py

Got it makes sense - it is strange that the specifying c.Completer.use_jedi = False (and/or c.IPCompleter.use_jedi = False) in the IPython config file does not seem to propagate to the runtime configuration when using xeus-python. At least, running %config IPCompleter still suggests that this parameter is True.

Would you mind opening an issue to xeus-python if you think it’s a problem? We might be missing something.

Got it makes sense - it is strange that the specifying c.Completer.use_jedi = False (and/or c.IPCompleter.use_jedi = False) in the IPython config file does not seem to propagate to the runtime configuration when using xeus-python. At least, running %config IPCompleter still suggests that this parameter is True.