diff options
author | Robert Schütz <dev@schuetz-co.de> | 2021-06-01 12:57:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 12:57:12 +0200 |
commit | 1c2986bbb806c57f9470bf3231d8da7250ab9091 (patch) | |
tree | 4dbb6a48b41242095a02ab64a20e9749a34857a7 /pkgs | |
parent | d75508257f7a8c2d05b94406e3105afa95d759f1 (diff) | |
parent | 6f6270d477a33bb727b26d45af71a45fdb559cc2 (diff) |
Merge pull request #120684 from sveitser/python3-black-update
python3Packages.black: 20.8b1 -> 21.4b2
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/black/default.nix | 15 | ||||
-rw-r--r-- | pkgs/development/python-modules/pyls-black/default.nix | 11 |
2 files changed, 18 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/black/default.nix b/pkgs/development/python-modules/black/default.nix index 3346afbb4ab9f..0ce3b8d0eaea8 100644 --- a/pkgs/development/python-modules/black/default.nix +++ b/pkgs/development/python-modules/black/default.nix @@ -8,6 +8,7 @@ , dataclasses , mypy-extensions , pathspec +, parameterized , regex , toml , typed-ast @@ -15,13 +16,13 @@ buildPythonPackage rec { pname = "black"; - version = "20.8b1"; + version = "21.5b1"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "1spv6sldp3mcxr740dh3ywp25lly9s8qlvs946fin44rl1x5a0hw"; + sha256 = "1cdkrl5vw26iy7s23v2zpr39m6g5xsgxhfhagzzflgfbvdc56s93"; }; nativeBuildInputs = [ setuptools_scm ]; @@ -30,19 +31,19 @@ buildPythonPackage rec { # Black starts a local server and needs to bind a local address. __darwinAllowLocalNetworking = true; - checkInputs = [ pytestCheckHook ]; + checkInputs = [ pytestCheckHook parameterized ]; preCheck = '' export PATH="$PATH:$out/bin" + + # The top directory /build matches black's DEFAULT_EXCLUDE regex. + # Make /build the project root for black tests to avoid excluding files. + touch ../.git ''; disabledTests = [ - # Don't know why these tests fails - "test_cache_multiple_files" - "test_failed_formatting_does_not_get_cached" # requires network access "test_gen_check_output" - "test_process_queue" ] ++ lib.optionals stdenv.isDarwin [ # fails on darwin "test_expression_diff" diff --git a/pkgs/development/python-modules/pyls-black/default.nix b/pkgs/development/python-modules/pyls-black/default.nix index c59a67606ee6c..7c8652b0a5e3f 100644 --- a/pkgs/development/python-modules/pyls-black/default.nix +++ b/pkgs/development/python-modules/pyls-black/default.nix @@ -1,4 +1,4 @@ -{ lib, buildPythonPackage, fetchFromGitHub +{ lib, buildPythonPackage, fetchFromGitHub, fetchpatch , black, toml, pytest, python-language-server, isPy3k }: @@ -13,6 +13,15 @@ buildPythonPackage rec { sha256 = "0cjf0mjn156qp0x6md6mncs31hdpzfim769c2lixaczhyzwywqnj"; }; + # Fix test failure with black 21.4b0+ + # Remove if https://github.com/rupert/pyls-black/pull/39 merged. + patches = [ + (fetchpatch { + url = "https://github.com/rupert/pyls-black/commit/728207b540d9c25eb0d1cd96419ebfda2e257f63.patch"; + sha256 = "0i3w5myhjl5lq1lpkizagnmk6m8fkn3igfyv5f2qcrn5n7f119ak"; + }) + ]; + disabled = !isPy3k; checkPhase = '' |