about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
authorMauricio Collares <mauricio@collares.org>2023-01-18 15:34:55 +0100
committerMauricio Collares <mauricio@collares.org>2023-01-18 15:56:21 +0100
commita89dae74dd9b6e19e055ceb51d5b137c69e48f8f (patch)
treebe890dd4badbd90aaa8d013018ea080d9a51549b /pkgs/applications/science
parent59fc1d36478ed22292197bd7413402450db215f0 (diff)
sage: paper over ipywidgets deprecation warning
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/math/sage/patches/ipywidgets-on_submit-deprecationwarning.patch13
-rw-r--r--pkgs/applications/science/math/sage/sage-src.nix3
2 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/sage/patches/ipywidgets-on_submit-deprecationwarning.patch b/pkgs/applications/science/math/sage/patches/ipywidgets-on_submit-deprecationwarning.patch
new file mode 100644
index 0000000000000..b0f3634340f53
--- /dev/null
+++ b/pkgs/applications/science/math/sage/patches/ipywidgets-on_submit-deprecationwarning.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/interacts/library.py b/src/sage/interacts/library.py
+index 06d680109a..139b00bfd1 100644
+--- a/src/sage/interacts/library.py
++++ b/src/sage/interacts/library.py
+@@ -1434,6 +1434,8 @@ def riemann_sum(
+     creates the mathlet::
+ 
+         sage: interacts.calculus.riemann_sum()
++        ...
++        DeprecationWarning: on_submit is deprecated. Instead, set the .continuous_update attribute to False and observe the value changing with: mywidget.observe(callback, 'value').
+         Manual interactive function <function riemann_sum at ...> with 9 widgets
+           title: HTMLText(value='<h2>Riemann integral with random sampling</h2>')
+           f: EvalText(value='x^2+1', description='$f(x)=$', layout=Layout(max_width='41em'))
diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix
index 8c2e5d1d6f913..a8cd49819fb10 100644
--- a/pkgs/applications/science/math/sage/sage-src.nix
+++ b/pkgs/applications/science/math/sage/sage-src.nix
@@ -183,6 +183,9 @@ stdenv.mkDerivation rec {
       sha256 = "sha256-yhDdyxnXSSkqLcuOPBWSEBc26rk1Od3gLcWW8S2p8bY=";
     })
 
+    # temporarily paper over https://github.com/jupyter-widgets/ipywidgets/issues/3669
+    ./patches/ipywidgets-on_submit-deprecationwarning.patch
+
     # Sage uses mixed integer programs (MIPs) to find edge disjoint
     # spanning trees. For some reason, aarch64 glpk takes much longer
     # than x86_64 glpk to solve such MIPs. Since the MIP formulation