about summary refs log tree commit diff
path: root/pkgs/applications/science/math/sage
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2019-11-02 14:20:12 +0100
committerTimo Kaufmann <timokau@zoho.com>2019-11-06 14:40:13 +0100
commitaf480796c9e447e63f2c3720543b8e1c148cf34b (patch)
treea152d10aa64ac0618b0d136eb13b6bef81393def /pkgs/applications/science/math/sage
parentd8e7f7e2466680462202cf2e72c7bf453b326bed (diff)
downloadnixlib-af480796c9e447e63f2c3720543b8e1c148cf34b.tar
nixlib-af480796c9e447e63f2c3720543b8e1c148cf34b.tar.gz
nixlib-af480796c9e447e63f2c3720543b8e1c148cf34b.tar.bz2
nixlib-af480796c9e447e63f2c3720543b8e1c148cf34b.tar.lz
nixlib-af480796c9e447e63f2c3720543b8e1c148cf34b.tar.xz
nixlib-af480796c9e447e63f2c3720543b8e1c148cf34b.tar.zst
nixlib-af480796c9e447e63f2c3720543b8e1c148cf34b.zip
sage: ignore cmp deprecation in sagenb
Diffstat (limited to 'pkgs/applications/science/math/sage')
-rw-r--r--pkgs/applications/science/math/sage/patches/sagenb-cmp-deprecation.patch13
-rw-r--r--pkgs/applications/science/math/sage/sagenb.nix5
2 files changed, 18 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/sage/patches/sagenb-cmp-deprecation.patch b/pkgs/applications/science/math/sage/patches/sagenb-cmp-deprecation.patch
new file mode 100644
index 000000000000..9f502a669517
--- /dev/null
+++ b/pkgs/applications/science/math/sage/patches/sagenb-cmp-deprecation.patch
@@ -0,0 +1,13 @@
+diff --git a/sagenb/__init__.py b/sagenb/__init__.py
+index 4db0d2cb..2fc5f01e 100644
+--- a/sagenb/__init__.py
++++ b/sagenb/__init__.py
+@@ -1,3 +1,8 @@
+ # -*- coding: utf-8 -*
+   # init
++import warnings
+ from . import storage
++
++# deprecation in attrs, needs to be fixed in twisted
++warnings.filterwarnings('ignore', category=DeprecationWarning,
++    message=r'The usage of `cmp` is deprecated and will be removed.*')
diff --git a/pkgs/applications/science/math/sage/sagenb.nix b/pkgs/applications/science/math/sage/sagenb.nix
index 03b5b7a3bbf9..77b2168ad974 100644
--- a/pkgs/applications/science/math/sage/sagenb.nix
+++ b/pkgs/applications/science/math/sage/sagenb.nix
@@ -26,6 +26,11 @@ buildPythonPackage rec {
     sha256 = "0bxvhr03qh2nsjdfc4pyfiqrn9jhp3vf7irsc9gqx0185jlblbxs";
   };
 
+  patches = [
+    # cmp deprecation in attrs needs to be handled in twisted
+    ./patches/sagenb-cmp-deprecation.patch
+  ];
+
   propagatedBuildInputs = [
     twisted
     flask