From 2d0934775c9063f3563715b23954fe1787211da8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 16 Jun 2020 16:19:19 +0100 Subject: [PATCH 1/5] python3.pkgs.pyls-black: mark as broken --- pkgs/development/python-modules/pyls-black/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/pyls-black/default.nix b/pkgs/development/python-modules/pyls-black/default.nix index d21002f9160..478b08b2647 100644 --- a/pkgs/development/python-modules/pyls-black/default.nix +++ b/pkgs/development/python-modules/pyls-black/default.nix @@ -27,6 +27,9 @@ buildPythonPackage rec { homepage = "https://github.com/rupert/pyls-black"; description = "Black plugin for the Python Language Server"; license = licenses.mit; + # Not compatible with 0.33.1 + # https://github.com/rupert/pyls-black/issues/24 + broken = true; # since 2020-06-16 maintainers = [ maintainers.mic92 ]; }; } From 93acf27f06cea9355e5d8df6dec4461784f3a0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 16 Jun 2020 16:20:46 +0100 Subject: [PATCH 2/5] python3.pkgs.pyls-mypy: 0.1.6 -> 0.1.8 --- .../python-modules/pyls-mypy/default.nix | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/pyls-mypy/default.nix b/pkgs/development/python-modules/pyls-mypy/default.nix index b4fd98607d8..b9cf9738ed4 100644 --- a/pkgs/development/python-modules/pyls-mypy/default.nix +++ b/pkgs/development/python-modules/pyls-mypy/default.nix @@ -1,29 +1,45 @@ -{ lib, buildPythonPackage, fetchFromGitHub +{ lib, buildPythonPackage, fetchFromGitHub, isPy27 , future, python-language-server, mypy, configparser -, pytest, mock, isPy3k, pytestcov, coverage +, pytestCheckHook, mock, isPy3k, pytestcov, coverage +, fetchpatch }: buildPythonPackage rec { pname = "pyls-mypy"; - version = "0.1.6"; + version = "0.1.8"; src = fetchFromGitHub { owner = "tomv564"; repo = "pyls-mypy"; rev = version; - sha256 = "0c1111m9h6f05frkyj6i757q9y2lijpbv8nxmwgp3nqbpkvfnmrk"; + sha256 = "14giyvcrq4w3asm1nyablw70zkakkcsr76chk5a41alxlk4l2alb"; }; - disabled = !isPy3k; + # presumably tests don't find typehints ? + doCheck = false; - checkPhase = '' - HOME=$TEMPDIR pytest + disabledTests = [ + "test_parse_line_without_line" + ]; + + preCheck = '' + export HOME=$TEMPDIR ''; - checkInputs = [ pytest mock pytestcov coverage ]; + patches = [ + # makes future optional + (fetchpatch { + url = "https://github.com/tomv564/pyls-mypy/commit/2949582ff5f39b1de51eacc92de6cfacf1b5ab75.patch"; + sha256 = "0bqkvdy5mxyi46nhq5ryynf465f68b6ffy84hmhxrigkapz085g5"; + }) + ]; + + checkInputs = [ mock pytestcov coverage pytestCheckHook ]; propagatedBuildInputs = [ - mypy python-language-server future configparser + mypy python-language-server configparser + ] ++ lib.optional (isPy27) [ + future ]; meta = with lib; { From 8a9556a36aabb3cd64dd53e4b059ce9969249e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 16 Jun 2020 15:55:21 +0100 Subject: [PATCH 3/5] python38.pkgs.rope: enable build --- pkgs/development/python-modules/rope/default.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkgs/development/python-modules/rope/default.nix b/pkgs/development/python-modules/rope/default.nix index c7b75bab742..fd7bf55ad52 100644 --- a/pkgs/development/python-modules/rope/default.nix +++ b/pkgs/development/python-modules/rope/default.nix @@ -4,8 +4,6 @@ buildPythonPackage rec { pname = "rope"; version = "0.17.0"; - disabled = pythonAtLeast "3.8"; # 0.17 should support Python 3.8 - src = fetchPypi { inherit pname version; sha256 = "658ad6705f43dcf3d6df379da9486529cf30e02d9ea14c5682aa80eb33b649e1"; From 141a029ad733a539f20b34c1ff14f5511f55a05b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 16 Jun 2020 16:12:57 +0100 Subject: [PATCH 4/5] python3.python-jsonrpc-server: enable python38 build --- .../python-jsonrpc-server/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/python-jsonrpc-server/default.nix b/pkgs/development/python-modules/python-jsonrpc-server/default.nix index 587f27fd51b..586c6edfa82 100644 --- a/pkgs/development/python-modules/python-jsonrpc-server/default.nix +++ b/pkgs/development/python-modules/python-jsonrpc-server/default.nix @@ -1,6 +1,7 @@ { stdenv, buildPythonPackage, fetchFromGitHub, pythonOlder , pytest, mock, pytestcov, coverage , future, futures, ujson, isPy38 +, fetchpatch }: buildPythonPackage rec { @@ -16,6 +17,8 @@ buildPythonPackage rec { postPatch = '' sed -i 's/version=versioneer.get_version(),/version="${version}",/g' setup.py + # https://github.com/palantir/python-jsonrpc-server/issues/36 + sed -i -e 's!ujson<=!ujson>=!' setup.py ''; checkInputs = [ @@ -26,7 +29,16 @@ buildPythonPackage rec { pytest ''; - disabled = isPy38; + patches = [ + (fetchpatch { + url = "https://github.com/palantir/python-jsonrpc-server/commit/0a04cc4e9d44233b1038b12d63cd3bd437c2374e.patch"; + sha256 = "177zdnp1808r2pg189bvzab44l8i2alsgv04kmrlhhnv40h66qyg"; + }) + (fetchpatch { + url = "https://github.com/palantir/python-jsonrpc-server/commit/5af6e43d0c1fb9a6a29b96d38cfd6dbeec85d0ea.patch"; + sha256 = "1gx7lc1jxar1ngqqfkdn21s46y1mfnjf7ky2886ydk53nkaba91m"; + }) + ]; propagatedBuildInputs = [ future ujson ] ++ stdenv.lib.optional (pythonOlder "3.2") futures; From 5d52144fecb057889a9f928271698dac8ecf40f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 16 Jun 2020 16:05:13 +0100 Subject: [PATCH 5/5] python3.pkgs.python-language-server: 0.31.9 -> 0.33.1 --- .../python-language-server/default.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/python-language-server/default.nix b/pkgs/development/python-modules/python-language-server/default.nix index 9f42839960d..c223ccb89b8 100644 --- a/pkgs/development/python-modules/python-language-server/default.nix +++ b/pkgs/development/python-modules/python-language-server/default.nix @@ -21,15 +21,20 @@ in buildPythonPackage rec { pname = "python-language-server"; - version = "0.31.9"; + version = "0.33.1"; src = fetchFromGitHub { owner = "palantir"; repo = "python-language-server"; rev = version; - sha256 = "06hd6a1hhd57hrq4vbwfs0saplkhsrz2krv8kq9kw4fz4hx7zj74"; + sha256 = "064ck4ikrrrhq8wjpbs5k6hzkrjvfg91pd6351471xpsij0kj16f"; }; + postPatch = '' + # https://github.com/palantir/python-jsonrpc-server/issues/36 + sed -i -e 's!ujson<=!ujson>=!' setup.py + ''; + # The tests require all the providers, disable otherwise. doCheck = providers == ["*"]; @@ -53,10 +58,8 @@ buildPythonPackage rec { "test_pandas_completions" "test_matplotlib_completions" "test_snippet_parsing" + "test_numpy_hover" ] ++ stdenv.lib.optional isPy27 "test_flake8_lint"; - # checkPhase = '' - # HOME=$TEMPDIR pytest -k "not test_pyqt_completion and not - # ''; propagatedBuildInputs = [ setuptools jedi pluggy future python-jsonrpc-server flake8 ujson ] ++ stdenv.lib.optional (withProvider "autopep8") autopep8