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 17:02:49 +0100
committerGitHub <noreply@github.com>2023-01-18 17:02:49 +0100
commit44fc962f76f771b80bdffe7c209c11b0c29526d7 (patch)
tree85b16219dd02e161db906464450260780eecd9ca /pkgs/applications/science
parentc667f030692a7dfdf0aacef0e80c9803d772b76f (diff)
parenta89dae74dd9b6e19e055ceb51d5b137c69e48f8f (diff)
Merge pull request #211390 from collares/sage-matplotlib-3.6
sage: staging-next 2023-01-05 upgrade fixes
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/patches/sphinx-fix-matplotlib-css-perms.patch21
-rw-r--r--pkgs/applications/science/math/sage/sage-src.nix31
3 files changed, 40 insertions, 25 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/patches/sphinx-fix-matplotlib-css-perms.patch b/pkgs/applications/science/math/sage/patches/sphinx-fix-matplotlib-css-perms.patch
deleted file mode 100644
index 764ecffa23772..0000000000000
--- a/pkgs/applications/science/math/sage/patches/sphinx-fix-matplotlib-css-perms.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/src/sage_docbuild/ext/multidocs.py b/src/sage_docbuild/ext/multidocs.py
-index f91c7753ca..edeb81ff2e 100644
---- a/src/sage_docbuild/ext/multidocs.py
-+++ b/src/sage_docbuild/ext/multidocs.py
-@@ -284,6 +284,16 @@ def init_subdoc(app):
-         if not app.config.multidoc_first_pass:
-             app.connect('env-updated', fetch_citation)
- 
-+            def fix_matplotlib_css_permissions(app: Sphinx, env):
-+                css_file = os.path.join(app.builder.outdir, '_static', 'plot_directive.css')
-+                try:
-+                    os.chmod(css_file, 0o644)
-+                except:
-+                    pass
-+
-+            # executed after matplotlib's _copy_css_file
-+            app.connect('build-finished', fix_matplotlib_css_permissions, priority=600)
-+
-         # Monkey patch copy_static_files to make a symlink to "../"
-         def link_static_files():
-             """
diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix
index cd553843d69d3..a8cd49819fb10 100644
--- a/pkgs/applications/science/math/sage/sage-src.nix
+++ b/pkgs/applications/science/math/sage/sage-src.nix
@@ -80,10 +80,6 @@ stdenv.mkDerivation rec {
     # Parallelize docubuild using subprocesses, fixing an isolation issue. See
     # https://groups.google.com/forum/#!topic/sage-packaging/YGOm8tkADrE
     ./patches/sphinx-docbuild-subprocesses.patch
-
-    # Docbuilding copies files from the Nix store and expects them to be writable.
-    # Remove when https://github.com/matplotlib/matplotlib/pull/23805 lands.
-    ./patches/sphinx-fix-matplotlib-css-perms.patch
   ];
 
   # Since sage unfortunately does not release bugfix releases, packagers must
@@ -163,6 +159,33 @@ stdenv.mkDerivation rec {
     # conflicts. The patch below contains rebased versions.
     ./patches/pari-2.15.1-upgrade-rebased.patch
 
+    # https://trac.sagemath.org/ticket/34668
+    (fetchSageDiff {
+      name = "matplotlib-3.6-upgrade.patch";
+      base = "9.8.beta2";
+      rev = "5501e0de0dca1cff0355326dd42bd8c7e5749568";
+      sha256 = "sha256-ceJkVaecIsZewN8v/3gPQXFbFjv5Akz6zEFg/ToXdek=";
+    })
+
+    # https://trac.sagemath.org/ticket/34693
+    (fetchSageDiff {
+      name = "matplotlib-3.6-docbuilding.patch";
+      base = "9.8.beta4";
+      rev = "64589686c261d33e6b5aff2589bcae8af004bcc6";
+      sha256 = "sha256-j5AMY1TmhP+HBBBYaFZSkABJ5vtwe6iP2LRfGEgSm8Q=";
+    })
+
+    # https://trac.sagemath.org/ticket/34615
+    (fetchSageDiff {
+      name = "sphinx-5.2-upgrade.patch";
+      base = "9.8.beta1";
+      rev = "8f8af65e54d3a9962cfab40f15dc23f4e955b43f";
+      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