From 1c094a76c041a6dfb1890476ab9aa0ca6412d727 Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Tue, 29 Dec 2020 15:45:59 -0500 Subject: [PATCH 01/12] python39Packages.billiard: unbreak --- .../python-modules/billiard/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/billiard/default.nix b/pkgs/development/python-modules/billiard/default.nix index 5bccf792452..ff87ba2e669 100644 --- a/pkgs/development/python-modules/billiard/default.nix +++ b/pkgs/development/python-modules/billiard/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, isPyPy, pytest, case, psutil }: +{ stdenv, buildPythonPackage, fetchPypi, isPyPy, pytestCheckHook, case, psutil, fetchpatch }: buildPythonPackage rec { pname = "billiard"; @@ -9,11 +9,15 @@ buildPythonPackage rec { inherit pname version; sha256 = "0spssl3byzqsplra166d59jx8iqfxyzvcbx7vybkmwr5ck72a5yr"; }; + patches = [(fetchpatch { + # Add Python 3.9 support to spawnv_passfds() + # Should be included in next release after 3.6.3.0 + url = "https://github.com/celery/billiard/pull/310/commits/a508ebafadcfe2e25554b029593f3e66d01ede6c.patch"; + sha256 = "05zsr1bvjgi01qg7r274c0qvbn65iig3clyz14c08mpfyn38h84i"; + excludes = [ "tox.ini" ]; + })]; - checkInputs = [ pytest case psutil ]; - checkPhase = '' - pytest - ''; + checkInputs = [ pytestCheckHook case psutil ]; meta = with stdenv.lib; { homepage = "https://github.com/celery/billiard"; From 08bccaa1f768c57a3cf35fbd6c5660c4bf657954 Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Tue, 29 Dec 2020 15:46:24 -0500 Subject: [PATCH 02/12] python3Packages.datasets: unbreak --- pkgs/development/python-modules/datasets/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/datasets/default.nix b/pkgs/development/python-modules/datasets/default.nix index 4214304a9c9..fc349cdc277 100644 --- a/pkgs/development/python-modules/datasets/default.nix +++ b/pkgs/development/python-modules/datasets/default.nix @@ -35,6 +35,10 @@ buildPythonPackage rec { xxhash ]; + postPatch = '' + substituteInPlace setup.py --replace '"tqdm>=4.27,<4.50.0"' '"tqdm>=4.27"' + ''; + # Tests require pervasive internet access. doCheck = false; From 7ae5cac752ee5ec685148fe27db4df305129408f Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Tue, 29 Dec 2020 15:46:48 -0500 Subject: [PATCH 03/12] python3Packages.fastparquet: 0.4.1 -> 0.5 --- pkgs/development/python-modules/fastparquet/default.nix | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/fastparquet/default.nix b/pkgs/development/python-modules/fastparquet/default.nix index 47c7d506309..07922ee19ef 100644 --- a/pkgs/development/python-modules/fastparquet/default.nix +++ b/pkgs/development/python-modules/fastparquet/default.nix @@ -3,22 +3,19 @@ thrift, pytest, python-snappy, lz4, zstd }: buildPythonPackage rec { pname = "fastparquet"; - version = "0.4.1"; + version = "0.5.0"; src = fetchFromGitHub { owner = "dask"; repo = pname; rev = version; - sha256 = "ViZRGEv227/RgCBYAQN8F3Z0m8WrNUT5KUdyFosjg9s="; + sha256 = "17i091kky34m2xivk29fqsyxxxa7v4352n79w01n7ni93za6wana"; }; postPatch = '' # FIXME: package zstandard # removing the test dependency for now substituteInPlace setup.py --replace "'zstandard'," "" - - # workaround for https://github.com/dask/fastparquet/issues/517 - rm fastparquet/test/test_partition_filters_specialstrings.py ''; nativeBuildInputs = [ pytestrunner ]; From d9dd5d7310daa6dde6317ecc56ae5755cc38b8d7 Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Tue, 29 Dec 2020 15:47:20 -0500 Subject: [PATCH 04/12] python39Packages.fixtures: mark as broken --- pkgs/development/python-modules/fixtures/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/fixtures/default.nix b/pkgs/development/python-modules/fixtures/default.nix index 3042acbbe84..9f1549e98f9 100644 --- a/pkgs/development/python-modules/fixtures/default.nix +++ b/pkgs/development/python-modules/fixtures/default.nix @@ -5,6 +5,7 @@ , testtools , mock , python +, isPy39 }: buildPythonPackage rec { @@ -26,5 +27,6 @@ buildPythonPackage rec { description = "Reusable state for writing clean tests and more"; homepage = "https://pypi.python.org/pypi/fixtures"; license = lib.licenses.asl20; + broken = isPy39; # see https://github.com/testing-cabal/fixtures/issues/44 }; } From 76a7064097dd9a3a339dcc1504d6d1f9fb37e8ad Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Tue, 29 Dec 2020 15:47:53 -0500 Subject: [PATCH 05/12] python39Packages.imageio-ffmpeg: fix for python3.9 --- .../python-modules/imageio-ffmpeg/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/imageio-ffmpeg/default.nix b/pkgs/development/python-modules/imageio-ffmpeg/default.nix index d9991ee7845..db59ba70bb2 100644 --- a/pkgs/development/python-modules/imageio-ffmpeg/default.nix +++ b/pkgs/development/python-modules/imageio-ffmpeg/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, fetchpatch , isPy3k }: @@ -9,9 +10,15 @@ buildPythonPackage rec { version = "0.4.2"; src = fetchPypi { - sha256 = "13b05b17a941a9f4a90b16910b1ffac159448cff051a153da8ba4b4343ffa195"; inherit pname version; + sha256 = "13b05b17a941a9f4a90b16910b1ffac159448cff051a153da8ba4b4343ffa195"; }; + patches = [ (fetchpatch { + # Fixes compatibility with python3.9 + # Should be included in the next release after 0.4.2 + url = "https://github.com/imageio/imageio-ffmpeg/pull/43/commits/b90c39fe3d29418d67d953588ed9fdf4d848f811.patch"; + sha256 = "0d9kf4w6ldwag3s2dr9zjin6wrj66fnl4fn8379ci4q4qfsqgx3f"; + })]; disabled = !isPy3k; From 7b90b3737fab03bb7aef59a61739b064b407d070 Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Tue, 29 Dec 2020 15:48:29 -0500 Subject: [PATCH 06/12] python3Packages.fiona: unbreak build --- pkgs/development/python-modules/fiona/default.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/fiona/default.nix b/pkgs/development/python-modules/fiona/default.nix index 0e90bb10f95..665bb0c8df0 100644 --- a/pkgs/development/python-modules/fiona/default.nix +++ b/pkgs/development/python-modules/fiona/default.nix @@ -41,9 +41,7 @@ buildPythonPackage rec { checkPhase = '' rm -r fiona # prevent importing local fiona # Some tests access network, others test packaging - pytest -k "not test_*_http \ - and not test_*_https \ - and not test_*_wheel" + pytest -k "not (http or https or wheel)" ''; meta = with lib; { From 23e230b8ebb08e901b4a6fcaf02231aaddd2e8d0 Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Tue, 29 Dec 2020 15:48:51 -0500 Subject: [PATCH 07/12] python3Packages.imbalanced-learn: unbreak build --- .../imbalanced-learn/default.nix | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/imbalanced-learn/default.nix b/pkgs/development/python-modules/imbalanced-learn/default.nix index 1cb3dc2a7b9..21018518ca2 100644 --- a/pkgs/development/python-modules/imbalanced-learn/default.nix +++ b/pkgs/development/python-modules/imbalanced-learn/default.nix @@ -1,7 +1,6 @@ { stdenv, buildPythonPackage, fetchPypi, isPy27 -, nose , pandas -, pytest +, pytestCheckHook , scikitlearn , tensorflow }: @@ -17,16 +16,17 @@ buildPythonPackage rec { }; propagatedBuildInputs = [ scikitlearn ]; - checkInputs = [ nose pytest pandas ]; - checkPhase = '' + checkInputs = [ pytestCheckHook pandas ]; + preCheck = '' export HOME=$TMPDIR - # skip some tests that fail because of minimal rounding errors - # or very large dependencies (keras + tensorflow) - py.test imblearn -k 'not estimator \ - and not classification \ - and not _generator \ - and not show_versions' ''; + disabledTests = [ + "estimator" + "classification" + "_generator" + "show_versions" + "test_make_imbalanced_iris" + ]; meta = with stdenv.lib; { description = "Library offering a number of re-sampling techniques commonly used in datasets showing strong between-class imbalance"; From 9e5c99331b074ee8c376e142e02a2b7559deba3b Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Tue, 29 Dec 2020 15:49:09 -0500 Subject: [PATCH 08/12] python39Packages.typing-inspect: mark as broken --- pkgs/development/python-modules/typing-inspect/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/typing-inspect/default.nix b/pkgs/development/python-modules/typing-inspect/default.nix index 849b56d2d0c..569096cb466 100644 --- a/pkgs/development/python-modules/typing-inspect/default.nix +++ b/pkgs/development/python-modules/typing-inspect/default.nix @@ -3,6 +3,7 @@ , fetchPypi , typing-extensions , mypy-extensions +, isPy39 }: buildPythonPackage rec { @@ -25,5 +26,6 @@ buildPythonPackage rec { homepage = "https://github.com/ilevkivskyi/typing_inspect"; license = licenses.mit; maintainers = with maintainers; [ albakham ]; + broken = isPy39; # see https://github.com/ilevkivskyi/typing_inspect/issues/65 }; } From 1a75fd39405d42d1daccf51cf1d031f44ef1e06a Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Tue, 29 Dec 2020 21:15:19 -0500 Subject: [PATCH 09/12] python3Packages.clifford: unbreak with h5py>=3 --- pkgs/development/python-modules/clifford/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/clifford/default.nix b/pkgs/development/python-modules/clifford/default.nix index 9fe60ba55da..68ac9e45bb4 100644 --- a/pkgs/development/python-modules/clifford/default.nix +++ b/pkgs/development/python-modules/clifford/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, fetchpatch , isPy27 , future , h5py @@ -21,6 +22,12 @@ buildPythonPackage rec { inherit pname version; sha256 = "ade11b20d0631dfc9c2f18ce0149f1e61e4baf114108b27cfd68e5c1619ecc0c"; }; + patches = [ (fetchpatch { + # Compatibility with h5py 3. + # Will be included in the next releasse after 1.3.1 + url = "https://github.com/pygae/clifford/pull/388/commits/955d141662c68d3d61aa50a162b39e656684c208.patch"; + sha256 = "00m8ias58xycn5n78sy9wywf4wck1v0gb8gzmg40inzdiha93jyz"; + }) ]; propagatedBuildInputs = [ future From 107c9a790901e38ce132df3e068b6d5889ca663f Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Wed, 30 Dec 2020 17:44:57 -0500 Subject: [PATCH 10/12] python3Packages.geopandas: fix build with fiona >= 1.8.16 --- .../python-modules/geopandas/default.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/geopandas/default.nix b/pkgs/development/python-modules/geopandas/default.nix index 200dfffa562..bd38d2663bc 100644 --- a/pkgs/development/python-modules/geopandas/default.nix +++ b/pkgs/development/python-modules/geopandas/default.nix @@ -1,6 +1,6 @@ { stdenv, buildPythonPackage, fetchFromGitHub, isPy27 , pandas, shapely, fiona, descartes, pyproj -, pytest, Rtree, fetchpatch }: +, pytestCheckHook, Rtree, fetchpatch }: buildPythonPackage rec { pname = "geopandas"; @@ -20,13 +20,18 @@ buildPythonPackage rec { url = "https://github.com/geopandas/geopandas/pull/1544/commits/6ce868a33a2f483b071089d51e178030fa4414d0.patch"; sha256 = "1sjgxrqgbhz5krx51hrv230ywszcdl6z8q3bj6830kfad8n8b5dq"; }) + # Fix GeoJSON for Fiona>=1.8.16 (Sep. 7, 2020). + # https://github.com/geopandas/geopandas/issues/1606 + # Will be included in next upstream release after 0.8.1 + (fetchpatch { + url = "https://github.com/geopandas/geopandas/commit/72427d3d8c128039bfce1d54a76c0b652887b276.patch"; + sha256 = "1726mrpddgmba0ngff73a5bsb6ywpsg63a2pdd2grp9339bgvi4a"; + }) ]; - checkInputs = [ pytest Rtree ]; - - checkPhase = '' - py.test geopandas -m "not web" - ''; + checkInputs = [ pytestCheckHook Rtree ]; + disabledTests = [ "web" ]; + pytestFlagsArray = [ "geopandas" ]; propagatedBuildInputs = [ pandas From 5c90064e138f5ecbae2aa228a06749ab219cc815 Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Wed, 30 Dec 2020 18:04:08 -0500 Subject: [PATCH 11/12] python3Packages.datashader: unbreak build with pyct==0.48 --- pkgs/development/python-modules/datashader/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/development/python-modules/datashader/default.nix b/pkgs/development/python-modules/datashader/default.nix index 233aac688ab..c49e2e30b80 100644 --- a/pkgs/development/python-modules/datashader/default.nix +++ b/pkgs/development/python-modules/datashader/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, fetchpatch , dask , distributed , bokeh @@ -36,6 +37,12 @@ buildPythonPackage rec { inherit pname version; sha256 = "b1f80415f72f92ccb660aaea7b2881ddd35d07254f7c44101709d42e819d6be6"; }; + patches = [ (fetchpatch { + # Unpins pyct==0.46 (Sep. 11, 2020). + # Will be incorporated into the next datashader release after 0.11.1 + url = "https://github.com/holoviz/datashader/pull/960/commits/d7a462fa399106c34fd0d44505a8a73789dbf874.patch"; + sha256 = "1wqsk9dpxnkxr49fa7y5q6ahin80cvys05lnirs2w2p1dja35y4x"; + })]; propagatedBuildInputs = [ dask From 7f213306f938e8a9bddd925f166a1a0ba278efe7 Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Wed, 30 Dec 2020 18:18:47 -0500 Subject: [PATCH 12/12] python3Packages.flower: mark as broken by celery 5.0 --- pkgs/development/python-modules/flower/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/flower/default.nix b/pkgs/development/python-modules/flower/default.nix index b31cbc7424d..605d08d1258 100644 --- a/pkgs/development/python-modules/flower/default.nix +++ b/pkgs/development/python-modules/flower/default.nix @@ -22,6 +22,7 @@ buildPythonPackage rec { # rely on using example programs (flowers/examples/tasks.py) which # are not part of the distribution rm tests/load.py + substituteInPlace requirements/default.txt --replace "prometheus_client==0.8.0" "prometheus_client>=0.8.0" ''; propagatedBuildInputs = [ @@ -39,5 +40,6 @@ buildPythonPackage rec { homepage = "https://github.com/mher/flower"; license = licenses.bsdOriginal; maintainers = [ maintainers.arnoldfarkas ]; + broken = (celery.version == "5.0.2"); # currently broken with celery>=5.0 by https://github.com/mher/flower/pull/1021 }; }