From 3157f9a4041dc2618eeb5e6dc18f3d66ed86c7b6 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 10 Oct 2021 05:17:46 +0200 Subject: [PATCH] python3Packages.jedi: 2020-08-06 -> 0.18.0 Migrate to pytestCheckHook, sadly some compatibility issues with pytest6 exist. --- .../python-modules/jedi/default.nix | 40 +++++++++++++------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/jedi/default.nix b/pkgs/development/python-modules/jedi/default.nix index 0dba5e8f192c..c818d9d9ddcd 100644 --- a/pkgs/development/python-modules/jedi/default.nix +++ b/pkgs/development/python-modules/jedi/default.nix @@ -1,29 +1,45 @@ -{ lib, buildPythonPackage, fetchFromGitHub, fetchPypi, pytest, glibcLocales, tox, pytest-cov, parso }: +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, fetchPypi +, colorama +, django +, docopt +, pytestCheckHook +, parso +}: buildPythonPackage rec { pname = "jedi"; - # switch back to stable version on the next release. - # current stable is incompatible with parso - version = "2020-08-06"; + version = "0.18.0"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "davidhalter"; repo = "jedi"; - rev = "216f976fd5cab7a460e5d287e853d11759251e52"; - sha256 = "1kb2ajzigadl95pnwglg8fxz9cvpg9hx30hqqj91jkgrc7djdldj"; + rev = "v${version}"; + sha256 = "0d8zdj56hyxbsvvrid6r3nprm0ygxaad6zpsbhbj6k7p3dcx7acw"; fetchSubmodules = true; }; - checkInputs = [ pytest glibcLocales tox pytest-cov ]; - propagatedBuildInputs = [ parso ]; - checkPhase = '' - LC_ALL="en_US.UTF-8" py.test test + checkInputs = [ + colorama + django + docopt + pytestCheckHook + ]; + + preCheck = '' + export HOME=$TMPDIR ''; - # tox required for tests: https://github.com/davidhalter/jedi/issues/808 - doCheck = false; + disabledTests = [ + # Assertions mismatches with pytest>=6.0 + "test_completion" + ]; meta = with lib; { homepage = "https://github.com/davidhalter/jedi";