From d57a74f109a84bcfc93c6c621dd0984fd2a0b5ea Mon Sep 17 00:00:00 2001 From: "R. Ryantm" <ryantm-bot@ryantm.com> Date: Thu, 4 Apr 2024 08:20:17 +0000 Subject: [PATCH 1/3] python311Packages.python-lsp-server: 1.10.1 -> 1.11.0 --- pkgs/development/python-modules/python-lsp-server/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-lsp-server/default.nix b/pkgs/development/python-modules/python-lsp-server/default.nix index 881e7e33d91b..b17b0519da44 100644 --- a/pkgs/development/python-modules/python-lsp-server/default.nix +++ b/pkgs/development/python-modules/python-lsp-server/default.nix @@ -35,7 +35,7 @@ buildPythonPackage rec { pname = "python-lsp-server"; - version = "1.10.1"; + version = "1.11.0"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -44,7 +44,7 @@ buildPythonPackage rec { owner = "python-lsp"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-tY+BE8DAajZKwlZ2D7uCr9LC7D61ULkhV8Z9EpRu6j0="; + hash = "sha256-0DFcnGlyDOK0Lxpr++xV6klhFF9b1fihH5FY/tblr+E="; }; postPatch = '' From a5028a61cfe408885780214c446274304eae430c Mon Sep 17 00:00:00 2001 From: Fabian Affolter <mail@fabian-affolter.ch> Date: Thu, 4 Apr 2024 11:10:34 +0200 Subject: [PATCH 2/3] python311Packages.python-lsp-server: refactor --- .../python-modules/python-lsp-server/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/python-lsp-server/default.nix b/pkgs/development/python-modules/python-lsp-server/default.nix index b17b0519da44..6a39452dacca 100644 --- a/pkgs/development/python-modules/python-lsp-server/default.nix +++ b/pkgs/development/python-modules/python-lsp-server/default.nix @@ -29,7 +29,6 @@ , ujson , websockets , whatthepatch -, wheel , yapf }: @@ -42,15 +41,15 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "python-lsp"; - repo = pname; + repo = "python-lsp-server"; rev = "refs/tags/v${version}"; hash = "sha256-0DFcnGlyDOK0Lxpr++xV6klhFF9b1fihH5FY/tblr+E="; }; postPatch = '' substituteInPlace pyproject.toml \ - --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \ - --replace "--cov pylsp --cov test" "" + --replace-fail "--cov-report html --cov-report term --junitxml=pytest.xml" "" \ + --replace-fail "--cov pylsp --cov test" "" ''; pythonRelaxDeps = [ @@ -63,12 +62,14 @@ buildPythonPackage rec { ]; nativeBuildInputs = [ - pythonRelaxDepsHook setuptools-scm - wheel ]; - propagatedBuildInputs = [ + build-system = [ + setuptools-scm + ]; + + dependencies = [ docstring-to-markdown jedi pluggy From 50f09fbf00f80cc72cc79f508d1dbed8c3fdbcad Mon Sep 17 00:00:00 2001 From: Fabian Affolter <mail@fabian-affolter.ch> Date: Thu, 4 Apr 2024 11:10:58 +0200 Subject: [PATCH 3/3] python311Packages.python-lsp-server: use nixfmt --- .../python-lsp-server/default.nix | 159 ++++++++---------- 1 file changed, 69 insertions(+), 90 deletions(-) diff --git a/pkgs/development/python-modules/python-lsp-server/default.nix b/pkgs/development/python-modules/python-lsp-server/default.nix index 6a39452dacca..c79e3f7e8d7b 100644 --- a/pkgs/development/python-modules/python-lsp-server/default.nix +++ b/pkgs/development/python-modules/python-lsp-server/default.nix @@ -1,35 +1,36 @@ -{ lib -, stdenv -, autopep8 -, buildPythonPackage -, docstring-to-markdown -, fetchFromGitHub -, flake8 -, flaky -, importlib-metadata -, jedi -, matplotlib -, mccabe -, numpy -, pandas -, pluggy -, pycodestyle -, pydocstyle -, pyflakes -, pylint -, pyqt5 -, pytestCheckHook -, python-lsp-jsonrpc -, pythonOlder -, pythonRelaxDepsHook -, rope -, setuptools -, setuptools-scm -, toml -, ujson -, websockets -, whatthepatch -, yapf +{ + lib, + stdenv, + autopep8, + buildPythonPackage, + docstring-to-markdown, + fetchFromGitHub, + flake8, + flaky, + importlib-metadata, + jedi, + matplotlib, + mccabe, + numpy, + pandas, + pluggy, + pycodestyle, + pydocstyle, + pyflakes, + pylint, + pyqt5, + pytestCheckHook, + python-lsp-jsonrpc, + pythonOlder, + pythonRelaxDepsHook, + rope, + setuptools, + setuptools-scm, + toml, + ujson, + websockets, + whatthepatch, + yapf, }: buildPythonPackage rec { @@ -61,13 +62,9 @@ buildPythonPackage rec { "pyflakes" ]; - nativeBuildInputs = [ - setuptools-scm - ]; + nativeBuildInputs = [ setuptools-scm ]; - build-system = [ - setuptools-scm - ]; + build-system = [ setuptools-scm ]; dependencies = [ docstring-to-markdown @@ -76,9 +73,7 @@ buildPythonPackage rec { python-lsp-jsonrpc setuptools # `pkg_resources`imported in pylsp/config/config.py ujson - ] ++ lib.optionals (pythonOlder "3.10") [ - importlib-metadata - ]; + ] ++ lib.optionals (pythonOlder "3.10") [ importlib-metadata ]; passthru.optional-dependencies = { all = [ @@ -94,62 +89,46 @@ buildPythonPackage rec { whatthepatch yapf ]; - autopep8 = [ - autopep8 - ]; - flake8 = [ - flake8 - ]; - mccabe = [ - mccabe - ]; - pycodestyle = [ - pycodestyle - ]; - pydocstyle = [ - pydocstyle - ]; - pyflakes = [ - pyflakes - ]; - pylint = [ - pylint - ]; - rope = [ - rope - ]; + autopep8 = [ autopep8 ]; + flake8 = [ flake8 ]; + mccabe = [ mccabe ]; + pycodestyle = [ pycodestyle ]; + pydocstyle = [ pydocstyle ]; + pyflakes = [ pyflakes ]; + pylint = [ pylint ]; + rope = [ rope ]; yapf = [ whatthepatch yapf ]; - websockets = [ - websockets - ]; + websockets = [ websockets ]; }; - nativeCheckInputs = [ - flaky - matplotlib - numpy - pandas - pytestCheckHook - ] ++ passthru.optional-dependencies.all - # pyqt5 is broken on aarch64-darwin - ++ lib.optionals (!stdenv.isDarwin || !stdenv.isAarch64) [ - pyqt5 - ]; - - disabledTests = [ - # Don't run lint tests - "test_pydocstyle" - # https://github.com/python-lsp/python-lsp-server/issues/243 - "test_numpy_completions" - "test_workspace_loads_pycodestyle_config" - "test_autoimport_code_actions_and_completions_for_notebook_document" - ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + nativeCheckInputs = + [ + flaky + matplotlib + numpy + pandas + pytestCheckHook + ] + ++ passthru.optional-dependencies.all # pyqt5 is broken on aarch64-darwin - "test_pyqt_completion" - ]; + ++ lib.optionals (!stdenv.isDarwin || !stdenv.isAarch64) [ pyqt5 ]; + + disabledTests = + [ + # Don't run lint tests + "test_pydocstyle" + # https://github.com/python-lsp/python-lsp-server/issues/243 + "test_numpy_completions" + "test_workspace_loads_pycodestyle_config" + "test_autoimport_code_actions_and_completions_for_notebook_document" + ] + ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ + # pyqt5 is broken on aarch64-darwin + "test_pyqt_completion" + ]; preCheck = '' export HOME=$(mktemp -d);