diff --git a/README.md b/README.md index 232e6d65f..48c1b36ec 100644 --- a/README.md +++ b/README.md @@ -119,19 +119,19 @@ Use of a python `virtualenv` or a conda env is also recommended. > or `jupyter-lsp-r` to install both the server extension and the language server. 1. install LSP servers for languages of your choice; for example, for Python - ([pyls](https://github.com/palantir/python-language-server)) and + ([pylsp](https://github.com/python-lsp/python-lsp-server)) and R ([languageserver](https://github.com/REditorSupport/languageserver)) servers: ```bash # note: you may want to use our fork of python-language-server instead (see below) - pip install 'python-language-server[all]' + pip install 'python-lsp-server[all]' R -e 'install.packages("languageserver")' ``` or from `conda-forge` ```bash - conda install -c conda-forge python-language-server r-languageserver + conda install -c conda-forge python-lsp-server r-languageserver ``` Please see our full list of @@ -188,6 +188,8 @@ Use of a python `virtualenv` or a conda env is also recommended. Server configurations can be edited using the Advanced Settings editor in JupyterLab (_Settings > Advanced Settings Editor_). For settings specific to each server, please see the [table of language servers][language-servers]. Example settings might include: +> Note: for the new (currently recommended) python-lsp-server replace `pyls` occurrences with `pyslp` + ```json { "language_servers": { diff --git a/atest/05_Features/Completion.robot b/atest/05_Features/Completion.robot index d50a30db0..ae723048e 100644 --- a/atest/05_Features/Completion.robot +++ b/atest/05_Features/Completion.robot @@ -187,7 +187,7 @@ Completion Works For Tokens Separated By Space Wait Until Keyword Succeeds 40x 0.5s Cell Editor Should Equal 13 from statistics import Kernel And LSP Completions Merge Prefix Conflicts Are Resolved - [Documentation] Reconciliate Python kernel returning prefixed completions and LSP (pyls) not-prefixed ones + [Documentation] Reconciliate Python kernel returning prefixed completions and LSP (pylsp) not-prefixed ones Configure JupyterLab Plugin {"kernelResponseTimeout": -1, "waitForBusyKernel": false} plugin id=${COMPLETION PLUGIN ID} # For more details see: https://github.com/krassowski/jupyterlab-lsp/issues/30#issuecomment-576003987 # `import os.pat` → `import os.pathsep` diff --git a/atest/07_Configuration.robot b/atest/07_Configuration.robot index 9399b2467..11476c2c2 100644 --- a/atest/07_Configuration.robot +++ b/atest/07_Configuration.robot @@ -7,8 +7,8 @@ Resource ./Keywords.robot *** Test Cases *** Python [Documentation] pyflakes is enabled by default, but flake8 is not - Settings Should Change Editor Diagnostics Python style.py pyls - ... {"pyls": {"plugins": {"flake8": {"enabled": true},"pyflakes": {"enabled": false}}}} + Settings Should Change Editor Diagnostics Python style.py pylsp + ... {"pylsp": {"plugins": {"flake8": {"enabled": true},"pyflakes": {"enabled": false}}}} ... undefined name 'foo' (pyflakes) ... undefined name 'foo' (flake8) diff --git a/atest/Variables.robot b/atest/Variables.robot index 71dfab695..009369604 100644 --- a/atest/Variables.robot +++ b/atest/Variables.robot @@ -54,5 +54,5 @@ ${JLAB XP CLOSE SETTINGS} ${JLAB XP DOCK TAB}\[contains(., 'Settings')]/*[con ${CSS DIAGNOSTIC} css:.cm-lsp-diagnostic # log messages @{KNOWN BAD ERRORS} -... pyls_jsonrpc.endpoint - Failed to handle notification -... pyls_jsonrpc.endpoint - Failed to handle request +... pylsp_jsonrpc.endpoint - Failed to handle notification +... pylsp_jsonrpc.endpoint - Failed to handle request diff --git a/binder/environment.yml b/binder/environment.yml index 6632d6f2c..c7b2f2aea 100644 --- a/binder/environment.yml +++ b/binder/environment.yml @@ -19,7 +19,7 @@ dependencies: - pyls-black - pyls-isort - pyls-mypy - - python-language-server + - python-lsp-server - ruamel_yaml # for R language server and kernel - r diff --git a/docs/rtd.yml b/docs/rtd.yml index 02c0aa4a0..9bb446ad1 100644 --- a/docs/rtd.yml +++ b/docs/rtd.yml @@ -17,7 +17,7 @@ dependencies: - pandas - pytest-check-links - myst-nb - - python-language-server + - python-lsp-server - sphinx - sphinx-autodoc-typehints - sphinx-copybutton diff --git a/python_packages/jupyter_lsp/jupyter_lsp/specs/config/python-lsp-server.schema.json b/python_packages/jupyter_lsp/jupyter_lsp/specs/config/pylsp.schema.json similarity index 100% rename from python_packages/jupyter_lsp/jupyter_lsp/specs/config/python-lsp-server.schema.json rename to python_packages/jupyter_lsp/jupyter_lsp/specs/config/pylsp.schema.json diff --git a/python_packages/jupyter_lsp/jupyter_lsp/specs/python_lsp_server.py b/python_packages/jupyter_lsp/jupyter_lsp/specs/python_lsp_server.py index d04eac88c..799222b2d 100644 --- a/python_packages/jupyter_lsp/jupyter_lsp/specs/python_lsp_server.py +++ b/python_packages/jupyter_lsp/jupyter_lsp/specs/python_lsp_server.py @@ -3,10 +3,10 @@ class PythonLSPServer(PythonModuleSpec): - python_module = key = "python-lsp-server" + python_module = key = "pylsp" languages = ["python"] spec = dict( - display_name="python-lsp-server", + display_name="python-lsp-server (pylsp)", mime_types=["text/python", "text/x-ipython"], urls=dict( home="https://github.com/python-lsp/python-lsp-server", diff --git a/python_packages/jupyter_lsp/jupyter_lsp/tests/conftest.py b/python_packages/jupyter_lsp/jupyter_lsp/tests/conftest.py index c70c27c6e..eeb004cd9 100644 --- a/python_packages/jupyter_lsp/jupyter_lsp/tests/conftest.py +++ b/python_packages/jupyter_lsp/jupyter_lsp/tests/conftest.py @@ -19,7 +19,7 @@ "bash-language-server", "dockerfile-language-server-nodejs", "javascript-typescript-langserver", - "pyls", + "pylsp", "unified-language-server", "sql-language-server", "vscode-css-languageserver-bin", diff --git a/python_packages/jupyter_lsp/jupyter_lsp/tests/test_session.py b/python_packages/jupyter_lsp/jupyter_lsp/tests/test_session.py index 3e5f3a599..7248d3258 100644 --- a/python_packages/jupyter_lsp/jupyter_lsp/tests/test_session.py +++ b/python_packages/jupyter_lsp/jupyter_lsp/tests/test_session.py @@ -78,7 +78,7 @@ async def test_start_unknown(known_unknown_server, handlers, jsonrpc_init_msg): @pytest.mark.asyncio async def test_ping(handlers): """see https://github.com/krassowski/jupyterlab-lsp/issues/458""" - a_server = "pyls" + a_server = "pylsp" handler, ws_handler = handlers manager = handler.manager diff --git a/requirements/github-actions.yml b/requirements/github-actions.yml index d9154d958..b8dfd0fff 100644 --- a/requirements/github-actions.yml +++ b/requirements/github-actions.yml @@ -35,8 +35,4 @@ dependencies: - geckodriver - robotframework >=4 - robotframework-seleniumlibrary - # TODO: remove when jedi vs IPython vs python-language-server is resolved - - jedi <0.18 - - ipython <7.20 # higher basically broken _without_ jedi 0.18 - - python-language-server ==0.36.2 - - autopep8 <1.5.6 # higher requires pycodestyle incompatible with python-language-server + - python-lsp-server diff --git a/requirements/utest.txt b/requirements/utest.txt index 06b7c0a6b..726fccae4 100644 --- a/requirements/utest.txt +++ b/requirements/utest.txt @@ -5,5 +5,5 @@ pytest-asyncio pytest-cov pytest-flake8 pytest-runner -python-language-server +python-lsp-server pluggy<1.0,>=0.12 # Python 3.5 CI Travis, may need update with new pytest releases, see issue 259