[arch-commits] Commit in sagemath/trunk (PKGBUILD sagemath-ipywidgets-8.patch)
Antonio Rojas
arojas at gemini.archlinux.org
Wed Aug 31 08:37:52 UTC 2022
Date: Wednesday, August 31, 2022 @ 08:37:52
Author: arojas
Revision: 1289132
upgpkg: sagemath 9.6-9: Fixes for ipywidgets 8
Added:
sagemath/trunk/sagemath-ipywidgets-8.patch
Modified:
sagemath/trunk/PKGBUILD
-----------------------------+
PKGBUILD | 12 +++++++---
sagemath-ipywidgets-8.patch | 46 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 54 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-08-31 08:32:54 UTC (rev 1289131)
+++ PKGBUILD 2022-08-31 08:37:52 UTC (rev 1289132)
@@ -7,7 +7,7 @@
pkgname=sagemath
pkgver=9.6
-pkgrel=8
+pkgrel=9
pkgdesc='Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab'
arch=(x86_64)
url='http://www.sagemath.org'
@@ -59,7 +59,8 @@
sagemath-bliss-0.77.patch
sagemath-tachyon-0.99.patch
sagemath-jupyter-jsmol.patch
- sagemath-gap-4.12.patch)
+ sagemath-gap-4.12.patch
+ sagemath-ipywidgets-8.patch)
sha256sums=('c6225d48f70ac955fceed5c1fddfdd7294001d460b43a686329d5d44d836f6a3'
'e24c075a9f8e562fe9d85e6fd5b01eac4691683c01d4d22c83cde145b63f4dba'
'bd188af45ce31579b82407adee8e9bf6033a996f7ea6e328fabca526f31c08ba'
@@ -68,7 +69,8 @@
'b467a41e1e0a0850f7722d875a743233751966a206c2f61401c7582aa722f84e'
'4ee8071efd7b9ad66ac5bbfe081fe670cc58cfcac8fb783d5a40b6da3593cbf4'
'14431ef93a68324ed276d79d7be66b0fb6b73df74f0e049be522480153e22afa'
- 'dfa0288904504065ffae13e19ccd11e625f5b4a61fd07bf2f78f90ca2e2cb0be')
+ 'dfa0288904504065ffae13e19ccd11e625f5b4a61fd07bf2f78f90ca2e2cb0be'
+ '9d6ac3b241eaf6c110a090807d99643eae83b20708baa35f322cdfb70ac2b565')
prepare(){
cd sage-$pkgver
@@ -80,8 +82,10 @@
patch -p1 -i ../sagemath-bliss-0.77.patch
# Fix tests with tachyon 0.99 https://trac.sagemath.org/ticket/23712
patch -p1 -i ../sagemath-tachyon-0.99.patch
-# Port to GAP 4.12
+# Port to GAP 4.12 https://trac.sagemath.org/ticket/34391
patch -p1 -i ../sagemath-gap-4.12.patch
+# Fixes for ipywidgets 8 https://trac.sagemath.org/ticket/34460
+ patch -p1 -i ../sagemath-ipywidgets-8.patch
# Arch-specific patches
# assume all optional packages are installed
Added: sagemath-ipywidgets-8.patch
===================================================================
--- sagemath-ipywidgets-8.patch (rev 0)
+++ sagemath-ipywidgets-8.patch 2022-08-31 08:37:52 UTC (rev 1289132)
@@ -0,0 +1,46 @@
+diff --git a/src/sage/combinat/cluster_algebra_quiver/interact.py b/src/sage/combinat/cluster_algebra_quiver/interact.py
+index 4e54c64..1c88e61 100644
+--- a/src/sage/combinat/cluster_algebra_quiver/interact.py
++++ b/src/sage/combinat/cluster_algebra_quiver/interact.py
+@@ -107,7 +107,7 @@ def cluster_interact(self, fig_size=1, circular=True, kind='seed'):
+ show_lastmutation.observe(refresh, 'value')
+ which_plot.observe(refresh, 'value')
+
+- mut_buttons.on_displayed(refresh)
++ mut_buttons.on_widget_constructed(refresh)
+
+ if kind == 'seed':
+ top = widgets.HBox([show_seq, show_vars])
+diff --git a/src/sage/repl/ipython_kernel/interact.py b/src/sage/repl/ipython_kernel/interact.py
+index 9b94bc4..a2665a4 100644
+--- a/src/sage/repl/ipython_kernel/interact.py
++++ b/src/sage/repl/ipython_kernel/interact.py
+@@ -126,7 +126,7 @@ class sage_interactive(interactive):
+ super(sage_interactive, self).__init__(f, options, **kwds)
+ if self.manual:
+ # In Sage, manual interacts are always run once
+- self.on_displayed(self.update)
++ self.on_widget_constructed(self.update)
+ else:
+ # In automatic mode, clicking on a ToggleButtons button
+ # should also run the interact
+diff --git a/src/sage/repl/ipython_kernel/widgets_sagenb.py b/src/sage/repl/ipython_kernel/widgets_sagenb.py
+index 2ce59d7..76f4f52 100644
+--- a/src/sage/repl/ipython_kernel/widgets_sagenb.py
++++ b/src/sage/repl/ipython_kernel/widgets_sagenb.py
+@@ -470,15 +470,6 @@ def selector(values, label=None, default=None, nrows=None, ncols=None, width=Non
+ sage: selector([(1,"one"), (2,"two"), (3,"three")], buttons=True)
+ ToggleButtons(options=(('one', 1), ('two', 2), ('three', 3)), value=1)
+
+- A dict of ``label:value`` pairs is also allowed. Since a ``dict``
+- is not ordered, it is better to use an :class:`OrderedDict`::
+-
+- sage: from collections import OrderedDict
+- sage: selector(OrderedDict(one=1, two=2, three=3))
+- Dropdown(options=OrderedDict([('one', 1), ('two', 2), ('three', 3)]), value=1)
+- sage: selector(OrderedDict(one=1, two=2, three=3), buttons=True)
+- ToggleButtons(options=OrderedDict([('one', 1), ('two', 2), ('three', 3)]), value=1)
+-
+ The values can be any kind of object:
+
+ sage: selector([sin(x^2), GF(29), EllipticCurve('37a1')])
More information about the arch-commits
mailing list