about summary refs log tree commit diff
path: root/pkgs/development/python-modules/apache-beam
diff options
context:
space:
mode:
authorTheodore Ni <3806110+tjni@users.noreply.github.com>2022-11-13 02:39:55 -0800
committerTheodore Ni <3806110+tjni@users.noreply.github.com>2022-11-15 00:50:00 -0800
commit7dd0719b2ffe3654ab677e1fd66f235658ef7cf7 (patch)
tree50666d37f8dafb69b6e6e1e32c8e40f524a437b5 /pkgs/development/python-modules/apache-beam
parent77ff917232e40178e76e884b2ab4f036ad35202d (diff)
python310Packages.apache-beam: fix for dill 0.3.6
Diffstat (limited to 'pkgs/development/python-modules/apache-beam')
-rw-r--r--pkgs/development/python-modules/apache-beam/default.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/apache-beam/default.nix b/pkgs/development/python-modules/apache-beam/default.nix
index ec7555b224929..612cb70d6f650 100644
--- a/pkgs/development/python-modules/apache-beam/default.nix
+++ b/pkgs/development/python-modules/apache-beam/default.nix
@@ -5,6 +5,7 @@
 , dill
 , fastavro
 , fetchFromGitHub
+, fetchpatch
 , freezegun
 , grpcio
 , grpcio-tools
@@ -53,6 +54,16 @@ buildPythonPackage rec {
     sha256 = "sha256-0S7Dj6PMSbZkEAY6ZLUpKVfe/tFxsq60TTAFj0Qhtv0=";
   };
 
+  patches = [
+    (fetchpatch {
+      # https://github.com/apache/beam/pull/24143
+      name = "fix-for-dill-0.3.6.patch";
+      url = "https://github.com/apache/beam/commit/7e014435b816015d21cc07f3f6c80809f3d8023d.patch";
+      hash = "sha256-iUmnzrItTFM98w3mpadzrmtI3t0fucpSujAg/6qxCGk=";
+      stripLen = 2;
+    })
+  ];
+
   pythonRelaxDeps = [
     # See https://github.com/NixOS/nixpkgs/issues/156957
     "dill"
@@ -138,6 +149,10 @@ buildPythonPackage rec {
     "apache_beam/runners/portability/flink_runner_test.py"
     "apache_beam/runners/portability/samza_runner_test.py"
     "apache_beam/runners/portability/spark_runner_test.py"
+
+    # Fails starting from dill 0.3.6 because it tries to pickle pytest globals:
+    # https://github.com/uqfoundation/dill/issues/482#issuecomment-1139017499.
+    "apache_beam/transforms/window_test.py"
   ];
 
   disabledTests = [