From 760f23adeb3cdc9525380a7f56872026814b5577 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 26 Jan 2023 11:25:52 +0100 Subject: [PATCH 1/3] python310Packages.python-lsp-server: 1.7.0 -> 1.7.1 Diff: https://github.com/python-lsp/python-lsp-server/compare/refs/tags/v1.7.0...v1.7.1 Changelog: https://github.com/python-lsp/python-lsp-server/blob/v1.7.1/CHANGELOG.md --- .../python-modules/python-lsp-server/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/python-lsp-server/default.nix b/pkgs/development/python-modules/python-lsp-server/default.nix index 5f2574eb9c06..f58b55669bfb 100644 --- a/pkgs/development/python-modules/python-lsp-server/default.nix +++ b/pkgs/development/python-modules/python-lsp-server/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { pname = "python-lsp-server"; - version = "1.7.0"; + version = "1.7.1"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -41,7 +41,7 @@ buildPythonPackage rec { owner = "python-lsp"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-9cyzJxyCris7FsVni5IZCCL6IAcsN8tMakNoKPeWv7s="; + hash = "sha256-Rx8mHBmJw4gh0FtQBVMmOlQklODplrhnWwzsEhQm4NE="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; @@ -50,7 +50,7 @@ buildPythonPackage rec { substituteInPlace pyproject.toml \ --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \ --replace "--cov pylsp --cov test" "" \ - --replace "autopep8>=1.6.0,<1.7.0" "autopep8" \ + --replace "autopep8>=1.6.0,<1.7.1" "autopep8" \ --replace "flake8>=5.0.0,<7" "flake8" \ --replace "mccabe>=0.7.0,<0.8.0" "mccabe" \ --replace "pycodestyle>=2.9.0,<2.11.0" "pycodestyle" \ @@ -130,6 +130,8 @@ buildPythonPackage rec { ]; 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" From 6919ac80f21878505c070ba7e34d90bea6e56f13 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 26 Jan 2023 11:43:50 +0100 Subject: [PATCH 2/3] python310Packages.python-lsp-server: switch to pythonRelaxDepsHook --- .../python-lsp-server/default.nix | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/python-lsp-server/default.nix b/pkgs/development/python-modules/python-lsp-server/default.nix index f58b55669bfb..a026eb15fa27 100644 --- a/pkgs/development/python-modules/python-lsp-server/default.nix +++ b/pkgs/development/python-modules/python-lsp-server/default.nix @@ -18,6 +18,7 @@ , pylint , pyqt5 , pytestCheckHook +, pythonRelaxDepsHook , python-lsp-jsonrpc , pythonOlder , rope @@ -49,15 +50,20 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ --replace "--cov-report html --cov-report term --junitxml=pytest.xml" "" \ - --replace "--cov pylsp --cov test" "" \ - --replace "autopep8>=1.6.0,<1.7.1" "autopep8" \ - --replace "flake8>=5.0.0,<7" "flake8" \ - --replace "mccabe>=0.7.0,<0.8.0" "mccabe" \ - --replace "pycodestyle>=2.9.0,<2.11.0" "pycodestyle" \ - --replace "pyflakes>=2.5.0,<3.1.0" "pyflakes" + --replace "--cov pylsp --cov test" "" ''; + pythonRelaxDeps = [ + "autopep8" + "flake8" + "mccabe" + "pycodestyle" + "pydocstyle" + "pyflakes" + ]; + nativeBuildInputs = [ + pythonRelaxDepsHook setuptools-scm ]; From b42738b02822f4ee7cebdc3641753b56cdecb78e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 26 Jan 2023 12:00:16 +0100 Subject: [PATCH 3/3] python311Packages.autopep8: add patch to ignore deprecation warnings --- .../python-modules/autopep8/default.nix | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/autopep8/default.nix b/pkgs/development/python-modules/autopep8/default.nix index 9eff8e2d29d4..f22d92d7bfb1 100644 --- a/pkgs/development/python-modules/autopep8/default.nix +++ b/pkgs/development/python-modules/autopep8/default.nix @@ -1,17 +1,20 @@ { lib +, buildPythonPackage , fetchFromGitHub , fetchpatch -, buildPythonPackage -, pythonOlder -, pycodestyle , glibcLocales -, tomli +, pycodestyle , pytestCheckHook +, pythonOlder +, tomli }: buildPythonPackage rec { pname = "autopep8"; version = "2.0.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "hhatto"; @@ -20,6 +23,15 @@ buildPythonPackage rec { hash = "sha256-YEPSsUzJG4MPiiloVAf9m/UiChkhkN0+lK6spycpSvo="; }; + patches = [ + # Ignore DeprecationWarnings to fix tests on Python 3.11, https://github.com/hhatto/autopep8/pull/665 + (fetchpatch { + name = "ignore-deprecation-warnings.patch"; + url = "https://github.com/hhatto/autopep8/commit/75b444d7cf510307ef67dc2b757d384b8a241348.patch"; + hash = "sha256-5hcJ2yAuscvGyI7zyo4Cl3NEFG/fZItQ8URstxhzwzE="; + }) + ]; + propagatedBuildInputs = [ pycodestyle ] ++ lib.optionals (pythonOlder "3.11") [