summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD22
-rw-r--r--sagemath-gap-4.11.patch212
-rw-r--r--sagemath-ipython7.patch286
-rw-r--r--sagemath-matplotlib-3.2.patch13
-rw-r--r--sagemath-pari-2.11.3.patch244
-rw-r--r--sagemath-python-3.8.patch46
-rw-r--r--sagemath-singular-4.1.2.patch2
8 files changed, 753 insertions, 84 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f385766498ba..ef712698b15d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -103,16 +103,22 @@ pkgbase = sagemath-git
source = sagemath-ipython7.patch
source = sagemath-python-3.8.patch
source = sagemath-pexpect-4.8.patch
+ source = sagemath-gap-4.11.patch
+ source = sagemath-matplotlib-3.2.patch
+ source = sagemath-pari-2.11.3.patch
sha256sums = SKIP
sha256sums = 9cbb72a1422416152cedd6849944d3c02a1639642758b470931f9fc5ddf42d22
sha256sums = 6a5470d7044a50a35a6478f57c19adf72fe54aefebeea8a095915b63f9e219ac
sha256sums = 876fd1c0fc3471b56e54d960d79e5ce1d5fc49cebf6eed27043a7380854c792c
sha256sums = 937074fa7a8a4e2aba9ea77ec622fe937985a1a9176c48460d51325ee877a4f5
- sha256sums = a52ee71d29817517d50bb948c49fb1a8e37f2d971a20266ee2d248a5cf37e604
+ sha256sums = ab7f6db1245add08447a95c6bbdda84dbab49b043d01c2f288460bc10515c8fd
sha256sums = e44bbde87f3312548faad75b7383ef21fade55be251ab5804de41cd3842ca8a0
- sha256sums = 71ab0f48c2184ddbac5303ba266fe21c0071c8fa605af036fe2cf9ac660341a7
- sha256sums = 6ffeef6d53ee827d2c241480792f0318ad835e1ab3b7a9431bbe73133d965a8d
+ sha256sums = e0b970a5914b8221c33f2018f5da2e5a3661f1b45068bc7635517135155275fd
+ sha256sums = f812e32718eab0292d726bed386217524dcdae3d4078ce82c66c20d00b9806f7
sha256sums = 5e6d1aa34959bd4369bd08a80648a5c7bc2d38e72c97e9a5f986e91f8a7aca07
+ sha256sums = d75f551fd942963b0158f5b25cefbecb213c37549375dd2e0f88e1856555fa1e
+ sha256sums = f7f3f914437f714427748f1fda1355e7f32ad98b76b89c54855efadd6e731c7a
+ sha256sums = 3f73cb49cb17865c2e50ddab0d43a21c5450190bb193c62d19cb86a6a99dacbc
pkgname = sagemath-git
optdepends = cython: to compile cython code
diff --git a/PKGBUILD b/PKGBUILD
index b8582c2e4588..1620910e950a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -43,17 +43,23 @@ source=(git://git.sagemath.org/sage.git#branch=develop
sagemath-ecl-sigfpe.patch
sagemath-ipython7.patch
sagemath-python-3.8.patch
- sagemath-pexpect-4.8.patch)
+ sagemath-pexpect-4.8.patch
+ sagemath-gap-4.11.patch
+ sagemath-matplotlib-3.2.patch
+ sagemath-pari-2.11.3.patch)
sha256sums=('SKIP'
'9cbb72a1422416152cedd6849944d3c02a1639642758b470931f9fc5ddf42d22'
'6a5470d7044a50a35a6478f57c19adf72fe54aefebeea8a095915b63f9e219ac'
'876fd1c0fc3471b56e54d960d79e5ce1d5fc49cebf6eed27043a7380854c792c'
'937074fa7a8a4e2aba9ea77ec622fe937985a1a9176c48460d51325ee877a4f5'
- 'a52ee71d29817517d50bb948c49fb1a8e37f2d971a20266ee2d248a5cf37e604'
+ 'ab7f6db1245add08447a95c6bbdda84dbab49b043d01c2f288460bc10515c8fd'
'e44bbde87f3312548faad75b7383ef21fade55be251ab5804de41cd3842ca8a0'
- '71ab0f48c2184ddbac5303ba266fe21c0071c8fa605af036fe2cf9ac660341a7'
- '6ffeef6d53ee827d2c241480792f0318ad835e1ab3b7a9431bbe73133d965a8d'
- '5e6d1aa34959bd4369bd08a80648a5c7bc2d38e72c97e9a5f986e91f8a7aca07')
+ 'e0b970a5914b8221c33f2018f5da2e5a3661f1b45068bc7635517135155275fd'
+ 'f812e32718eab0292d726bed386217524dcdae3d4078ce82c66c20d00b9806f7'
+ '5e6d1aa34959bd4369bd08a80648a5c7bc2d38e72c97e9a5f986e91f8a7aca07'
+ 'd75f551fd942963b0158f5b25cefbecb213c37549375dd2e0f88e1856555fa1e'
+ 'f7f3f914437f714427748f1fda1355e7f32ad98b76b89c54855efadd6e731c7a'
+ '3f73cb49cb17865c2e50ddab0d43a21c5450190bb193c62d19cb86a6a99dacbc')
pkgver() {
cd sage
@@ -78,6 +84,12 @@ prepare(){
patch -p1 -i ../sagemath-ipython7.patch
# Fix mathjax path
sed -e 's|mathjax|mathjax2|g' -i src/sage/env.py
+# Fix gap.version() and doctests with GAP 4.11
+ patch -p1 -i ../sagemath-gap-4.11.patch
+# Fix warnings with matplotlib 3.2
+ patch -p1 -i ../sagemath-matplotlib-3.2.patch
+# Fix doctests with pari 2.11.3
+ patch -p1 -i ../sagemath-pari-2.11.3.patch
# Upstream patches
# use Features to detect Cremona databases https://trac.sagemath.org/ticket/25825
diff --git a/sagemath-gap-4.11.patch b/sagemath-gap-4.11.patch
new file mode 100644
index 000000000000..01c921f12fa4
--- /dev/null
+++ b/sagemath-gap-4.11.patch
@@ -0,0 +1,212 @@
+diff --git a/src/sage/interfaces/gap.py b/src/sage/interfaces/gap.py
+index 2b1cb8aef4..0bbc018499 100644
+--- a/src/sage/interfaces/gap.py
++++ b/src/sage/interfaces/gap.py
+@@ -891,7 +891,7 @@ class Gap_generic(ExtraTabCompletion, Expect):
+ sage: print(gap.version())
+ 4...
+ """
+- return self.eval('VERSION')[1:-1]
++ return self.eval('GAPInfo.Version')[1:-1]
+
+ def function_call(self, function, args=None, kwds=None):
+ """
+diff --git a/src/sage/coding/linear_code.py b/src/sage/coding/linear_code.py
+index e106498063..b56388830b 100644
+--- a/src/sage/coding/linear_code.py
++++ b/src/sage/coding/linear_code.py
+@@ -540,17 +540,17 @@ class AbstractLinearCode(AbstractCode, Module):
+ 0
+ sage: C = codes.HammingCode(GF(4, 'z'), 3)
+ sage: C.automorphism_group_gens()
+- ([((1, z, z + 1, z, z, 1, 1, z, z + 1, z, z, 1, z, z + 1, z, z, 1, z, z + 1, z, z); (1,5,18,7,11,8)(2,12,21)(3,20,14,10,19,15)(4,9)(13,17,16), Ring endomorphism of Finite Field in z of size 2^2
+- Defn: z |--> z + 1),
+- ((1, 1, z, z + 1, z, z, z + 1, z + 1, z, 1, 1, z, z, z + 1, z + 1, 1, z, z, 1, z, z + 1); (2,11)(3,13)(4,14)(5,20)(6,17)(8,15)(16,19), Ring endomorphism of Finite Field in z of size 2^2
++ ([((1, 1, 1, 1, 1, z + 1, z, z + 1, z, z, z, 1, 1, z + 1, z + 1, z, z + 1, z, z + 1, z + 1, z + 1); (1,14,6,7,4,10,11,19)(2,8,16,13,3,17,21,15)(9,12,18,20), Ring endomorphism of Finite Field in z of size 2^2
+ Defn: z |--> z + 1),
++ ((z + 1, 1, 1, z, z + 1, z, z, z + 1, z + 1, z + 1, 1, z + 1, z, z, 1, z + 1, 1, z, z + 1, z + 1, z); (1,18,6,19,2,9,17,10,13,14,21,11,4,5,12)(3,20,7,16,8), Ring endomorphism of Finite Field in z of size 2^2
++ Defn: z |--> z),
+ ((z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z); (), Ring endomorphism of Finite Field in z of size 2^2
+ Defn: z |--> z)],
+ 362880)
+ sage: C.automorphism_group_gens(equivalence="linear")
+- ([((z, 1, 1, z, z + 1, z, z, z + 1, z + 1, z + 1, 1, z + 1, z, z, 1, 1, 1, z, z, z + 1, z); (1,6)(2,20,9,16)(3,10,8,11)(4,15,21,5)(12,17)(13,14,19,18), Ring endomorphism of Finite Field in z of size 2^2
++ ([((z + 1, 1, z + 1, z + 1, z + 1, z, 1, z, 1, 1, 1, 1, z + 1, z + 1, z + 1, z, z, 1, z, z, z); (1,15,2,8,16,18,3)(4,9,12,13,20,10,11)(5,21,14,6,7,19,17), Ring endomorphism of Finite Field in z of size 2^2
+ Defn: z |--> z),
+- ((1, z, z + 1, z, z, z, z + 1, z + 1, 1, z, z, z, 1, z, 1, z + 1, z, z + 1, z, z + 1, 1); (1,15,20,5,8,6,12,14,13,7,16,11,19,3,21,4,9,10,18,17,2), Ring endomorphism of Finite Field in z of size 2^2
++ ((z + 1, z + 1, z + 1, z + 1, z + 1, 1, z, 1, z, z, z, 1, z, 1, 1, 1, z + 1, z + 1, z + 1, 1, z); (1,15,21,8,9)(2,18,5,3,11,16,7,10,19,13,12,4,17,6,20), Ring endomorphism of Finite Field in z of size 2^2
+ Defn: z |--> z),
+ ((z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1); (), Ring endomorphism of Finite Field in z of size 2^2
+ Defn: z |--> z)],
+@@ -816,10 +816,10 @@ class AbstractLinearCode(AbstractCode, Module):
+ sage: C_iso == aut_group_can_label.get_canonical_form()
+ True
+ sage: aut_group_can_label.get_autom_gens()
+- [((1, z, z + 1, z, z, 1, 1, z, z + 1, z, z, 1, z, z + 1, z, z, 1, z, z + 1, z, z); (1,5,18,7,11,8)(2,12,21)(3,20,14,10,19,15)(4,9)(13,17,16), Ring endomorphism of Finite Field in z of size 2^2
+- Defn: z |--> z + 1),
+- ((1, 1, z, z + 1, z, z, z + 1, z + 1, z, 1, 1, z, z, z + 1, z + 1, 1, z, z, 1, z, z + 1); (2,11)(3,13)(4,14)(5,20)(6,17)(8,15)(16,19), Ring endomorphism of Finite Field in z of size 2^2
++ [((1, 1, 1, 1, 1, z + 1, z, z + 1, z, z, z, 1, 1, z + 1, z + 1, z, z + 1, z, z + 1, z + 1, z + 1); (1,14,6,7,4,10,11,19)(2,8,16,13,3,17,21,15)(9,12,18,20), Ring endomorphism of Finite Field in z of size 2^2
+ Defn: z |--> z + 1),
++ ((z + 1, 1, 1, z, z + 1, z, z, z + 1, z + 1, z + 1, 1, z + 1, z, z, 1, z + 1, 1, z, z + 1, z + 1, z); (1,18,6,19,2,9,17,10,13,14,21,11,4,5,12)(3,20,7,16,8), Ring endomorphism of Finite Field in z of size 2^2
++ Defn: z |--> z),
+ ((z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z); (), Ring endomorphism of Finite Field in z of size 2^2
+ Defn: z |--> z)]
+ """
+diff --git a/src/sage/combinat/tiling.py b/src/sage/combinat/tiling.py
+index acc4640675..4ee841d681 100644
+--- a/src/sage/combinat/tiling.py
++++ b/src/sage/combinat/tiling.py
+@@ -324,21 +324,21 @@ def ncube_isometry_group(n, orientation_preserving=True):
+
+ sage: ncube_isometry_group(3)
+ [
+- [1 0 0] [ 1 0 0] [ 0 1 0] [ 0 0 -1] [ 1 0 0] [ 0 1 0]
+- [0 1 0] [ 0 0 1] [ 0 0 -1] [ 0 -1 0] [ 0 0 -1] [-1 0 0]
+- [0 0 1], [ 0 -1 0], [-1 0 0], [-1 0 0], [ 0 1 0], [ 0 0 1],
++ [1 0 0] [ 1 0 0] [ 1 0 0] [ 0 1 0] [0 1 0] [ 0 0 1]
++ [0 1 0] [ 0 0 1] [ 0 0 -1] [-1 0 0] [0 0 1] [ 0 -1 0]
++ [0 0 1], [ 0 -1 0], [ 0 1 0], [ 0 0 1], [1 0 0], [ 1 0 0],
+ <BLANKLINE>
+- [ 1 0 0] [ 0 0 1] [0 1 0] [ 0 0 1] [ 0 0 -1] [ 0 -1 0]
+- [ 0 -1 0] [-1 0 0] [0 0 1] [ 0 -1 0] [-1 0 0] [-1 0 0]
+- [ 0 0 -1], [ 0 -1 0], [1 0 0], [ 1 0 0], [ 0 1 0], [ 0 0 -1],
++ [-1 0 0] [ 0 -1 0] [-1 0 0] [-1 0 0] [ 0 -1 0] [ 0 0 -1]
++ [ 0 -1 0] [ 0 0 -1] [ 0 0 -1] [ 0 1 0] [ 0 0 1] [ 1 0 0]
++ [ 0 0 1], [ 1 0 0], [ 0 -1 0], [ 0 0 -1], [-1 0 0], [ 0 -1 0],
+ <BLANKLINE>
+- [ 0 1 0] [ 0 0 1] [ 0 0 -1] [ 0 -1 0] [0 0 1] [ 0 -1 0]
+- [ 1 0 0] [ 0 1 0] [ 1 0 0] [ 0 0 1] [1 0 0] [ 1 0 0]
+- [ 0 0 -1], [-1 0 0], [ 0 -1 0], [-1 0 0], [0 1 0], [ 0 0 1],
++ [ 0 1 0] [ 0 0 1] [0 0 1] [ 0 -1 0] [ 0 0 -1] [-1 0 0]
++ [ 1 0 0] [ 0 1 0] [1 0 0] [ 1 0 0] [ 0 1 0] [ 0 0 1]
++ [ 0 0 -1], [-1 0 0], [0 1 0], [ 0 0 1], [ 1 0 0], [ 0 1 0],
+ <BLANKLINE>
+- [-1 0 0] [-1 0 0] [ 0 0 -1] [-1 0 0] [ 0 -1 0] [-1 0 0]
+- [ 0 1 0] [ 0 0 -1] [ 0 1 0] [ 0 0 1] [ 0 0 -1] [ 0 -1 0]
+- [ 0 0 -1], [ 0 -1 0], [ 1 0 0], [ 0 1 0], [ 1 0 0], [ 0 0 1]
++ [ 0 -1 0] [ 0 0 -1] [ 0 0 1] [ 1 0 0] [ 0 0 -1] [ 0 1 0]
++ [-1 0 0] [-1 0 0] [-1 0 0] [ 0 -1 0] [ 0 -1 0] [ 0 0 -1]
++ [ 0 0 -1], [ 0 1 0], [ 0 -1 0], [ 0 0 -1], [-1 0 0], [-1 0 0]
+ ]
+
+ TESTS::
+diff --git a/src/sage/tests/books/judson-abstract-algebra/sylow-sage.py b/src/sage/tests/books/judson-abstract-algebra/sylow-sage.py
+index b60931344c..0051f20652 100644
+--- a/src/sage/tests/books/judson-abstract-algebra/sylow-sage.py
++++ b/src/sage/tests/books/judson-abstract-algebra/sylow-sage.py
+@@ -236,7 +236,7 @@ r"""
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
+
+ sage: G.Center()
+- Group( [ ( 1, 3, 5)( 2, 4, 6) ] )
++ Group( [ (1,3,5)(2,4,6) ] )
+
+ ~~~~~~~~~~~~~~~~~~~~~~ ::
+
+diff --git a/src/sage/groups/finitely_presented.py b/src/sage/groups/finitely_presented.py
+index 1642d48166..4d1dd4c548 100644
+--- a/src/sage/groups/finitely_presented.py
++++ b/src/sage/groups/finitely_presented.py
+@@ -1201,7 +1201,7 @@ class FinitelyPresentedGroup(GroupMixinLibGAP, UniqueRepresentation,
+ sage: D = C2.semidirect_product(C8, hom); D
+ Finitely presented group < a, b | a^2, b^8, a^-1*b*a*b >
+ sage: D = C2.semidirect_product(C8, hom, reduced=True); D
+- Finitely presented group < a, b | a^2, (a*b)^2, b^8 >
++ Finitely presented group < a, b | a^2, a*b*a*b, b^8 >
+
+ sage: C3 = groups.presentation.Cyclic(3)
+ sage: C4 = groups.presentation.Cyclic(4)
+@@ -1442,22 +1442,25 @@ class FinitelyPresentedGroup(GroupMixinLibGAP, UniqueRepresentation,
+ sage: H = AlternatingGroup(3)
+ sage: G.epimorphisms(H)
+ [Generic morphism:
+- From: Finitely presented group < x0, x1, x2 | (x0*x1*x2)^2, x0^3 >
++ From: Finitely presented group < x0, x1, x2 | x0*x1*x2*x0*x1*x2, x0^3 >
+ To: Alternating group of order 3!/2 as a permutation group
+ Defn: x0 |--> ()
+ x1 |--> (1,3,2)
+- x2 |--> (1,2,3), Generic morphism:
+- From: Finitely presented group < x0, x1, x2 | (x0*x1*x2)^2, x0^3 >
++ x2 |--> (1,2,3),
++ Generic morphism:
++ From: Finitely presented group < x0, x1, x2 | x0*x1*x2*x0*x1*x2, x0^3 >
+ To: Alternating group of order 3!/2 as a permutation group
+ Defn: x0 |--> (1,3,2)
+ x1 |--> ()
+- x2 |--> (1,2,3), Generic morphism:
+- From: Finitely presented group < x0, x1, x2 | (x0*x1*x2)^2, x0^3 >
++ x2 |--> (1,2,3),
++ Generic morphism:
++ From: Finitely presented group < x0, x1, x2 | x0*x1*x2*x0*x1*x2, x0^3 >
+ To: Alternating group of order 3!/2 as a permutation group
+ Defn: x0 |--> (1,3,2)
+ x1 |--> (1,2,3)
+- x2 |--> (), Generic morphism:
+- From: Finitely presented group < x0, x1, x2 | (x0*x1*x2)^2, x0^3 >
++ x2 |--> (),
++ Generic morphism:
++ From: Finitely presented group < x0, x1, x2 | x0*x1*x2*x0*x1*x2, x0^3 >
+ To: Alternating group of order 3!/2 as a permutation group
+ Defn: x0 |--> (1,2,3)
+ x1 |--> (1,2,3)
+@@ -1548,11 +1551,11 @@ class FinitelyPresentedGroup(GroupMixinLibGAP, UniqueRepresentation,
+ sage: G = F / [a^2,b^3,(a*b/a)^3,b*a*b*a]
+ sage: k = G.rewriting_system()
+ sage: k
+- Rewriting system of Finitely presented group < a, b | a^2, b^3, a*b^3*a^-1, (b*a)^2 >
++ Rewriting system of Finitely presented group < a, b | a^2, b^3, a*b^3*a^-1, b*a*b*a >
+ with rules:
+ a^2 ---> 1
+ b^3 ---> 1
+- (b*a)^2 ---> 1
++ b*a*b*a ---> 1
+ a*b^3*a^-1 ---> 1
+
+ sage: G([1,1,2,2,2])
+diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py
+index 8512b01122..245fdd868b 100644
+--- a/src/sage/groups/perm_gps/permgroup.py
++++ b/src/sage/groups/perm_gps/permgroup.py
+@@ -840,7 +840,7 @@ class PermutationGroup_generic(FiniteGroup):
+ sage: f=PG._coerce_map_from_(MG)
+ sage: mg = MG.an_element()
+ sage: p = f(mg); p
+- (1,2,6,19,35,33)(3,9,26,14,31,23)(4,13,5)(7,22,17)(8,24,12)(10,16,32,27,20,28)(11,30,18)(15,25,36,34,29,21)
++ (2,33,32,23,31,55)(3,49,38,44,40,28)(4,17,59,62,58,46)(5,21,47,20,43,8)(6,53,50)(7,37,12,57,14,29)(9,41,56,34,64,10)(11,25,19)(13,61,26,51,22,15)(16,45,36)(18,27,35,48,52,54)(24,63,42)(30,39,60)
+ sage: PG(p._gap_()) == p
+ True
+
+@@ -889,9 +889,9 @@ class PermutationGroup_generic(FiniteGroup):
+ False
+ sage: g1, g2, g3 = G.gens()
+ sage: P(g1*g2)
+- (1,9,7,6)(2,10)(3,11)(4,5,8,12)
++ (1,3,7,12)(2,4,8,10)(5,11)(6,9)
+ sage: P1(g1*g2)
+- (1,4,13,11)(2,5,14,18)(3,15,8,16)(6,7)(9,20,19,12)(10,17)
++ (2,29,25,68)(3,57,13,54)(4,11,72,37)(5,39,60,23)(6,64,75,63)(7,21,50,73)(8,46,38,32)(9,74,35,18)(10,44,49,48)(12,16,34,71)(14,79,27,40)(15,26)(17,62,59,76)(19,78,70,65)(20,22,58,51)(24,33,36,43)(28,81,80,52)(30,53,56,69)(31,61)(41,42,67,55)(45,77)(47,66)
+
+ Another check for :trac:`5583`::
+
+diff --git a/src/sage/groups/matrix_gps/finitely_generated.py b/src/sage/groups/matrix_gps/finitely_generated.py
+index d356c9cfc1..5f78373a3f 100644
+--- a/src/sage/groups/matrix_gps/finitely_generated.py
++++ b/src/sage/groups/matrix_gps/finitely_generated.py
+@@ -549,7 +549,7 @@ class FinitelyGeneratedMatrixGroup_gap(MatrixGroup_gap):
+ sage: A = MS([[0,0,0,0,1],[0,0,0,1,0],[0,0,1,0,0],[0,1,0,0,0],[1,0,0,0,0]])
+ sage: G = MatrixGroup([A])
+ sage: G.as_permutation_group()
+- Permutation Group with generators [(1,2)]
++ Permutation Group with generators [(2,17)(3,9)(4,25)(6,21)(7,13)(8,29)(10,19)(12,27)(14,23)(16,31)(20,26)(24,30)]
+
+ A finite subgroup of GL(12,Z) as a permutation group::
+
+@@ -624,7 +624,7 @@ class FinitelyGeneratedMatrixGroup_gap(MatrixGroup_gap):
+ sage: PG = MG.as_permutation_group()
+ sage: mg = MG.an_element()
+ sage: PG(mg)
+- (1,2,6,19,35,33)(3,9,26,14,31,23)(4,13,5)(7,22,17)(8,24,12)(10,16,32,27,20,28)(11,30,18)(15,25,36,34,29,21)
++ (2,33,32,23,31,55)(3,49,38,44,40,28)(4,17,59,62,58,46)(5,21,47,20,43,8)(6,53,50)(7,37,12,57,14,29)(9,41,56,34,64,10)(11,25,19)(13,61,26,51,22,15)(16,45,36)(18,27,35,48,52,54)(24,63,42)(30,39,60)
+ """
+ # Note that the output of IsomorphismPermGroup() depends on
+ # memory locations and will change if you change the order of
diff --git a/sagemath-ipython7.patch b/sagemath-ipython7.patch
index 9c817fefc792..4666b7571678 100644
--- a/sagemath-ipython7.patch
+++ b/sagemath-ipython7.patch
@@ -91,7 +91,7 @@ diff --git a/src/sage/algebras/weyl_algebra.py b/src/sage/algebras/weyl_algebra.
index 95e12d460b..26a238725c 100644
--- a/src/sage/algebras/weyl_algebra.py
+++ b/src/sage/algebras/weyl_algebra.py
-@@ -590,7 +590,7 @@ class DifferentialWeylAlgebraElement(AlgebraElement):
+@@ -583,7 +583,7 @@ class DifferentialWeylAlgebraElement(AlgebraElement):
sage: x
t^3*dt^3 + t^4*dt^2 + 9*t^2*dt^2 + 8*t^3*dt + 18*t*dt + 12*t^2 + 6
sage: x.factor_differentials()
@@ -100,7 +100,7 @@ index 95e12d460b..26a238725c 100644
sage: D.zero().factor_differentials()
{}
-@@ -602,17 +602,17 @@ class DifferentialWeylAlgebraElement(AlgebraElement):
+@@ -595,17 +595,17 @@ class DifferentialWeylAlgebraElement(AlgebraElement):
x^3*dy^3 + x*y*z*dx*dy*dz + y^3*dx^3 + x^3*dx^3 - x*z*dx^3 + y*z*dy*dz
+ x*z*dx*dz + x*y*dx*dy + 9*x^2*dx^2 + z*dz + y*dy + 19*x*dx + 7
sage: elt.factor_differentials()
@@ -129,7 +129,7 @@ diff --git a/src/sage/categories/category.py b/src/sage/categories/category.py
index ff6557068b..1cf0bb41a0 100644
--- a/src/sage/categories/category.py
+++ b/src/sage/categories/category.py
-@@ -1771,8 +1771,8 @@ class Category(UniqueRepresentation, SageObject):
+@@ -1770,8 +1770,8 @@ class Category(UniqueRepresentation, SageObject):
{'element': {'optional': ['_add_', '_mul_'], 'required': ['__nonzero__']},
'parent': {'optional': ['algebra_generators'], 'required': ['__contains__']}}
sage: Algebras(QQ).required_methods() # py3
@@ -168,7 +168,7 @@ diff --git a/src/sage/categories/crystals.py b/src/sage/categories/crystals.py
index f19a7d963e..e6536f5eae 100644
--- a/src/sage/categories/crystals.py
+++ b/src/sage/categories/crystals.py
-@@ -76,7 +76,7 @@ class Crystals(Category_singleton):
+@@ -75,7 +75,7 @@ class Crystals(Category_singleton):
sage: from sage.misc.abstract_method import abstract_methods_of_class
sage: abstract_methods_of_class(Crystals().element_class)
@@ -286,7 +286,7 @@ diff --git a/src/sage/coding/linear_code.py b/src/sage/coding/linear_code.py
index 57ef7fb896..db347b9e2f 100644
--- a/src/sage/coding/linear_code.py
+++ b/src/sage/coding/linear_code.py
-@@ -3843,22 +3843,22 @@ class LinearCodeSyndromeDecoder(Decoder):
+@@ -3840,22 +3840,22 @@ class LinearCodeSyndromeDecoder(Decoder):
sage: D = codes.decoders.LinearCodeSyndromeDecoder(C, maximum_error_weight = 1)
sage: D._build_lookup_table()
{(0, 0, 0, 0): (0, 0, 0, 0, 0, 0, 0, 0),
@@ -321,7 +321,7 @@ index 57ef7fb896..db347b9e2f 100644
TESTS:
-@@ -3872,11 +3872,11 @@ class LinearCodeSyndromeDecoder(Decoder):
+@@ -3869,11 +3869,11 @@ class LinearCodeSyndromeDecoder(Decoder):
sage: D = codes.decoders.LinearCodeSyndromeDecoder(C)
sage: D.syndrome_table()
{(0, 0): (0, 0, 0),
@@ -607,7 +607,7 @@ diff --git a/src/sage/combinat/finite_state_machine.py b/src/sage/combinat/finit
index 45f15cdb5c..0a85bf72e8 100644
--- a/src/sage/combinat/finite_state_machine.py
+++ b/src/sage/combinat/finite_state_machine.py
-@@ -2134,8 +2134,7 @@ class FSMState(SageObject):
+@@ -2133,8 +2133,7 @@ class FSMState(SageObject):
sage: A.state(0)._in_epsilon_cycle_(A)
True
sage: A.state(4)._epsilon_successors_(A)
@@ -617,7 +617,7 @@ index 45f15cdb5c..0a85bf72e8 100644
sage: A.state(4)._in_epsilon_cycle_(A)
False
"""
-@@ -7222,7 +7221,7 @@ class FiniteStateMachine(SageObject):
+@@ -7221,7 +7220,7 @@ class FiniteStateMachine(SageObject):
sage: S.epsilon_successors(0)
{0: [['a', 'b']], 1: [['a']]}
sage: S.epsilon_successors(1)
@@ -626,7 +626,7 @@ index 45f15cdb5c..0a85bf72e8 100644
"""
return self.state(state)._epsilon_successors_(self)
-@@ -15055,7 +15054,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+@@ -15054,7 +15053,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
This class has the additional attribute ``visited_states``::
sage: it.visited_states
@@ -635,7 +635,7 @@ index 45f15cdb5c..0a85bf72e8 100644
This means the following (let us skip the state `0` for a moment):
State `1` can be reached by a epsilon path which write ``'bc'`` as
-@@ -15082,7 +15081,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+@@ -15081,7 +15080,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+-- tape at 0, [['c']]
process (0 branches)
sage: it.visited_states
@@ -644,7 +644,7 @@ index 45f15cdb5c..0a85bf72e8 100644
TESTS::
-@@ -15110,7 +15109,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+@@ -15109,7 +15108,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+-- tape at 0, [[]]
process (0 branches)
sage: it.visited_states
@@ -653,7 +653,7 @@ index 45f15cdb5c..0a85bf72e8 100644
At this point note that in the previous output, state `1` (from
which we started) was also reached by a non-trivial
-@@ -15134,7 +15133,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+@@ -15133,7 +15132,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+-- tape at 0, [[]]
process (0 branches)
sage: it.visited_states
@@ -662,7 +662,7 @@ index 45f15cdb5c..0a85bf72e8 100644
sage: it = _FSMProcessIteratorEpsilon_(A, initial_state=A.state(3))
sage: for current in it:
....: print(current)
-@@ -15150,7 +15149,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+@@ -15149,7 +15148,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+-- tape at 0, [[]]
process (0 branches)
sage: it.visited_states
@@ -671,7 +671,7 @@ index 45f15cdb5c..0a85bf72e8 100644
sage: it = _FSMProcessIteratorEpsilon_(A, initial_state=A.state(4))
sage: for current in it:
....: print(current)
-@@ -15187,8 +15186,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+@@ -15186,8 +15185,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+-- tape at 0, [['b', 'c', 'e']]
process (0 branches)
sage: it.visited_states
@@ -681,7 +681,7 @@ index 45f15cdb5c..0a85bf72e8 100644
sage: it = _FSMProcessIteratorEpsilon_(T, initial_state=T.state(2),
....: format_output=lambda o: ''.join(o))
sage: for current in it:
-@@ -15206,8 +15204,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+@@ -15205,8 +15203,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+-- tape at 0, [['c', 'd', 'f']]
process (0 branches)
sage: it.visited_states
@@ -691,7 +691,7 @@ index 45f15cdb5c..0a85bf72e8 100644
sage: it = _FSMProcessIteratorEpsilon_(T, initial_state=T.state(3),
....: format_output=lambda o: ''.join(o))
sage: for current in it:
-@@ -15224,8 +15221,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+@@ -15223,8 +15220,7 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+-- tape at 0, [['d', 'f']]
process (0 branches)
sage: it.visited_states
@@ -701,7 +701,7 @@ index 45f15cdb5c..0a85bf72e8 100644
sage: it = _FSMProcessIteratorEpsilon_(T, initial_state=T.state(4),
....: format_output=lambda o: ''.join(o))
sage: for current in it:
-@@ -15372,9 +15368,9 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
+@@ -15371,9 +15367,9 @@ class _FSMProcessIteratorEpsilon_(FSMProcessIterator):
sage: T.state(0)._epsilon_successors_(T) # indirect doctest
{0: [['a', 'b', 'c']], 1: [['a']], 2: [['a', 'b']]}
sage: T.state(1)._epsilon_successors_(T) # indirect doctest
@@ -753,7 +753,7 @@ index 4feb5b52b3..243412d7d2 100644
sage: G.shape()
[3, 2] / [1]
-@@ -1538,14 +1538,14 @@ class GrowthDiagram(SageObject):
+@@ -1537,14 +1537,14 @@ class GrowthDiagram(SageObject):
sage: labels = [[], [1], [2], [2,1], [1,1], [1], []]
sage: G = GrowthDiagram(RuleRSK, labels=labels) # indirect doctest
sage: G._filling
@@ -2010,7 +2010,7 @@ diff --git a/src/sage/graphs/digraph.py b/src/sage/graphs/digraph.py
index 3f13b3324f..d91600dc2e 100644
--- a/src/sage/graphs/digraph.py
+++ b/src/sage/graphs/digraph.py
-@@ -2671,7 +2671,7 @@ class DiGraph(GenericGraph):
+@@ -2675,7 +2675,7 @@ class DiGraph(GenericGraph):
installed, so we don't test its relative values::
sage: H.layout_acyclic()
@@ -2019,7 +2019,7 @@ index 3f13b3324f..d91600dc2e 100644
sage: H = DiGraph({0: [1]})
sage: pos = H.layout_acyclic(rankdir='up')
-@@ -2716,15 +2716,15 @@ class DiGraph(GenericGraph):
+@@ -2720,15 +2720,15 @@ class DiGraph(GenericGraph):
sage: H = DiGraph({0: [1, 2], 1: [3], 2: [3], 3: [], 5: [1, 6], 6: [2, 3]})
sage: H.layout_acyclic_dummy()
@@ -2125,7 +2125,7 @@ index 8b8c98cb15..6823e13b26 100644
TESTS::
-@@ -16514,7 +16514,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -16511,7 +16511,7 @@ class GenericGraph(GenericGraph_pyx):
sage: D = graphs.DodecahedralGraph()
sage: D.shortest_paths(0)
@@ -2134,7 +2134,7 @@ index 8b8c98cb15..6823e13b26 100644
All these paths are obviously induced graphs::
-@@ -16524,7 +16524,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -16521,7 +16521,7 @@ class GenericGraph(GenericGraph_pyx):
::
sage: D.shortest_paths(0, cutoff=2)
@@ -2143,7 +2143,7 @@ index 8b8c98cb15..6823e13b26 100644
sage: G = Graph( { 0: {1: 1}, 1: {2: 1}, 2: {3: 1}, 3: {4: 2}, 4: {0: 2} }, sparse=True)
sage: G.plot(edge_labels=True).show() # long time
sage: G.shortest_paths(0, by_weight=True)
-@@ -16534,7 +16534,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -16531,7 +16531,7 @@ class GenericGraph(GenericGraph_pyx):
sage: D = DiGraph([(0,1,1),(1,2,3),(0,2,5)])
sage: D.shortest_paths(0)
@@ -2152,7 +2152,7 @@ index 8b8c98cb15..6823e13b26 100644
sage: D.shortest_paths(0, by_weight=True)
{0: [0], 1: [0, 1], 2: [0, 1, 2]}
-@@ -16783,7 +16783,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -16780,7 +16780,7 @@ class GenericGraph(GenericGraph_pyx):
sage: D = graphs.DodecahedralGraph()
sage: D.shortest_path_lengths(0)
@@ -2161,7 +2161,7 @@ index 8b8c98cb15..6823e13b26 100644
Weighted case::
-@@ -18867,18 +18867,18 @@ class GenericGraph(GenericGraph_pyx):
+@@ -18864,18 +18864,18 @@ class GenericGraph(GenericGraph_pyx):
'#00ff00': [((1,3,2,4), (1,4)(2,3), 3), ...],
'#ff0000': [((1,3,2,4), (1,3)(2,4), 1), ...]}
sage: G._color_by_label() # py3
@@ -2186,7 +2186,7 @@ index 8b8c98cb15..6823e13b26 100644
TESTS:
-@@ -19023,8 +19023,8 @@ class GenericGraph(GenericGraph_pyx):
+@@ -19020,8 +19020,8 @@ class GenericGraph(GenericGraph_pyx):
sage: g.layout(layout="acyclic_dummy", save_pos=True)
{('0', 0): [0.3..., 0],
@@ -2196,7 +2196,7 @@ index 8b8c98cb15..6823e13b26 100644
('1', 1): [0.6..., 1]}
sage: D3 = g.layout(dim=3); D3 # random
-@@ -19160,10 +19160,10 @@ class GenericGraph(GenericGraph_pyx):
+@@ -19157,10 +19157,10 @@ class GenericGraph(GenericGraph_pyx):
sage: g = graphs.LadderGraph(3)
sage: g.layout_ranked(heights={i: (i, i+3) for i in range(3)})
{0: [0.668..., 0],
@@ -2209,7 +2209,7 @@ index 8b8c98cb15..6823e13b26 100644
5: [1.33..., 2]}
sage: g = graphs.LadderGraph(7)
sage: g.plot(layout="ranked", heights={i: (i, i+7) for i in range(7)})
-@@ -19347,13 +19347,13 @@ class GenericGraph(GenericGraph_pyx):
+@@ -19344,13 +19344,13 @@ class GenericGraph(GenericGraph_pyx):
sage: G = graphs.BalancedTree(2, 2)
sage: G.layout_tree(tree_root=0)
@@ -2228,7 +2228,7 @@ index 8b8c98cb15..6823e13b26 100644
sage: G = graphs.BalancedTree(2, 4)
sage: G.plot(layout="tree", tree_root=0, tree_orientation="up")
-@@ -19365,15 +19365,15 @@ class GenericGraph(GenericGraph_pyx):
+@@ -19362,15 +19362,15 @@ class GenericGraph(GenericGraph_pyx):
sage: T.set_embedding({0: [1, 6, 3], 1: [2, 5, 0], 2: [1], 3: [4, 7, 8, 0],
....: 4: [3], 5: [1], 6: [0], 7: [3], 8: [3]})
sage: T.layout_tree()
@@ -2251,7 +2251,7 @@ index 8b8c98cb15..6823e13b26 100644
sage: T.plot(layout="tree", tree_root=3)
Graphics object consisting of 18 graphics primitives
-@@ -23532,7 +23532,8 @@ class GenericGraph(GenericGraph_pyx):
+@@ -23529,7 +23529,8 @@ class GenericGraph(GenericGraph_pyx):
sage: G = DiGraph({1: [10], 2:[10,11], 3:[10,11], 4:[], 5:[11, 4], 6:[11], 7:[10,11], 8:[10,11], 9:[10], 10:[11, 5, 8], 11:[6]})
sage: G.katz_centrality(.85)
@@ -2261,7 +2261,7 @@ index 8b8c98cb15..6823e13b26 100644
2: 0.000000000000000,
3: 0.000000000000000,
4: 16.7319819819820,
-@@ -23541,7 +23542,6 @@ class GenericGraph(GenericGraph_pyx):
+@@ -23538,7 +23539,6 @@ class GenericGraph(GenericGraph_pyx):
7: 0.000000000000000,
8: 18.6846846846847,
9: 0.000000000000000,
@@ -2269,7 +2269,7 @@ index 8b8c98cb15..6823e13b26 100644
11: 202.778914049184}
-@@ -23561,7 +23561,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -23558,7 +23558,7 @@ class GenericGraph(GenericGraph_pyx):
sage: graphs.PathGraph(4).katz_centrality(1/20,3)
21/379
sage: (graphs.PathGraph(3) + graphs.PathGraph(4)).katz_centrality(1/20)
@@ -2282,7 +2282,7 @@ diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py
index bcb9ff1be6..4d0c5ce933 100644
--- a/src/sage/graphs/graph.py
+++ b/src/sage/graphs/graph.py
-@@ -3817,7 +3817,7 @@ class Graph(GenericGraph):
+@@ -3820,7 +3820,7 @@ class Graph(GenericGraph):
EXAMPLES::
sage: graphs.CycleGraph(4).bipartite_color()
@@ -2291,7 +2291,7 @@ index bcb9ff1be6..4d0c5ce933 100644
sage: graphs.CycleGraph(5).bipartite_color()
Traceback (most recent call last):
...
-@@ -4100,10 +4100,10 @@ class Graph(GenericGraph):
+@@ -4103,10 +4103,10 @@ class Graph(GenericGraph):
sage: G.plot(partition=P)
Graphics object consisting of 16 graphics primitives
sage: G.coloring(hex_colors=True, algorithm="MILP")
@@ -2602,7 +2602,7 @@ diff --git a/src/sage/graphs/isgci.py b/src/sage/graphs/isgci.py
index 9cd43d11b4..10ae7c9731 100644
--- a/src/sage/graphs/isgci.py
+++ b/src/sage/graphs/isgci.py
-@@ -761,7 +761,7 @@ class GraphClasses(UniqueRepresentation):
+@@ -759,7 +759,7 @@ class GraphClasses(UniqueRepresentation):
sage: type(t)
<... 'list'>
sage: t[0]
@@ -2611,7 +2611,7 @@ index 9cd43d11b4..10ae7c9731 100644
"""
self._get_ISGCI()
return self.inclusions()
-@@ -778,12 +778,12 @@ class GraphClasses(UniqueRepresentation):
+@@ -776,12 +776,12 @@ class GraphClasses(UniqueRepresentation):
sage: t = graph_classes.smallgraphs()
sage: t
@@ -2660,7 +2660,7 @@ diff --git a/src/sage/graphs/tutte_polynomial.py b/src/sage/graphs/tutte_polynom
index 994ed72149..e6e7c50dae 100644
--- a/src/sage/graphs/tutte_polynomial.py
+++ b/src/sage/graphs/tutte_polynomial.py
-@@ -389,7 +389,7 @@ class VertexOrder(EdgeSelection):
+@@ -386,7 +386,7 @@ class VertexOrder(EdgeSelection):
sage: A.order
[4, 6, 3, 2, 1, 7]
sage: A.inverse_order
@@ -2694,7 +2694,7 @@ diff --git a/src/sage/knots/link.py b/src/sage/knots/link.py
index 36ddf4df38..16d75bf9cd 100644
--- a/src/sage/knots/link.py
+++ b/src/sage/knots/link.py
-@@ -753,47 +753,47 @@ class Link(SageObject):
+@@ -752,47 +752,47 @@ class Link(SageObject):
sage: L = Link([[1, 3, 2, 4], [2, 3, 1, 4]])
sage: tails, heads = L._directions_of_edges()
sage: tails
@@ -2919,7 +2919,7 @@ diff --git a/src/sage/libs/ppl.pyx b/src/sage/libs/ppl.pyx
index 3bcf99b09a..22c2aec42a 100644
--- a/src/sage/libs/ppl.pyx
+++ b/src/sage/libs/ppl.pyx
-@@ -2013,10 +2013,10 @@ cdef class Polyhedron(_mutable_or_immutable):
+@@ -2014,10 +2014,10 @@ cdef class Polyhedron(_mutable_or_immutable):
sage: p = C_Polyhedron(cs)
sage: p.maximize( x+y )
{'bounded': True,
@@ -2933,7 +2933,7 @@ index 3bcf99b09a..22c2aec42a 100644
Unbounded case::
-@@ -2027,10 +2027,10 @@ cdef class Polyhedron(_mutable_or_immutable):
+@@ -2028,10 +2028,10 @@ cdef class Polyhedron(_mutable_or_immutable):
{'bounded': False}
sage: p.maximize( -x )
{'bounded': True,
@@ -2947,7 +2947,7 @@ index 3bcf99b09a..22c2aec42a 100644
"""
cdef PPL_Coefficient sup_n
cdef PPL_Coefficient sup_d
-@@ -2092,10 +2092,10 @@ cdef class Polyhedron(_mutable_or_immutable):
+@@ -2093,10 +2093,10 @@ cdef class Polyhedron(_mutable_or_immutable):
sage: p = C_Polyhedron(cs)
sage: p.minimize( x+y )
{'bounded': True,
@@ -2961,7 +2961,7 @@ index 3bcf99b09a..22c2aec42a 100644
Unbounded case::
-@@ -2104,10 +2104,10 @@ cdef class Polyhedron(_mutable_or_immutable):
+@@ -2105,10 +2105,10 @@ cdef class Polyhedron(_mutable_or_immutable):
sage: p = NNC_Polyhedron(cs)
sage: p.minimize( +x )
{'bounded': True,
@@ -3224,7 +3224,7 @@ diff --git a/src/sage/modular/arithgroup/congroup_gammaH.py b/src/sage/modular/a
index 7c48016348..d47fc3fae3 100644
--- a/src/sage/modular/arithgroup/congroup_gammaH.py
+++ b/src/sage/modular/arithgroup/congroup_gammaH.py
-@@ -593,6 +593,7 @@ class GammaH_class(CongruenceSubgroup):
+@@ -595,6 +595,7 @@ class GammaH_class(CongruenceSubgroup):
sage: G = GammaH(240,[7,239])
sage: G._coset_reduction_data_second_coord()
{1: [1],
@@ -3232,7 +3232,7 @@ index 7c48016348..d47fc3fae3 100644
2: [1],
3: [1],
4: [1],
-@@ -610,8 +611,7 @@ class GammaH_class(CongruenceSubgroup):
+@@ -612,8 +613,7 @@ class GammaH_class(CongruenceSubgroup):
48: [1, 191],
60: [1, 49, 137, 233],
80: [1, 7, 49, 103],
@@ -3279,7 +3279,7 @@ diff --git a/src/sage/plot/graphics.py b/src/sage/plot/graphics.py
index 31131ab220..bc33919835 100644
--- a/src/sage/plot/graphics.py
+++ b/src/sage/plot/graphics.py
-@@ -1218,9 +1218,9 @@ class Graphics(WithEqualityById, SageObject):
+@@ -1296,9 +1296,9 @@ class Graphics(WithEqualityById, SageObject):
sage: kwds = {'f': lambda x: x, 'xmin': 0, 'figsize': [1,1], 'plot_points': (40, 40)}
sage: G_kwds = Graphics._extract_kwds_for_show(kwds, ignore='xmin')
sage: kwds # Note how this action modifies the passed dictionary
@@ -3292,7 +3292,7 @@ index 31131ab220..bc33919835 100644
sage: G_kwds
{'figsize': [1, 1]}
-@@ -2151,13 +2151,13 @@ class Graphics(WithEqualityById, SageObject):
+@@ -2244,13 +2244,13 @@ class Graphics(WithEqualityById, SageObject):
sage: l = line([(1e-19,-1), (-1e-19,+1)], aspect_ratio=1.0)
sage: l.get_minmax_data()
@@ -3311,7 +3311,7 @@ index 31131ab220..bc33919835 100644
"""
objects = self._objects
if objects:
-@@ -2210,18 +2210,18 @@ class Graphics(WithEqualityById, SageObject):
+@@ -2303,18 +2303,18 @@ class Graphics(WithEqualityById, SageObject):
sage: l = line([(0,0), (1,1)], aspect_ratio=1.0)
sage: l._limit_output_aspect_ratio(1, 2, 1e19, 3)
@@ -3343,7 +3343,7 @@ diff --git a/src/sage/plot/histogram.py b/src/sage/plot/histogram.py
index 8dd68e2fee..895689684b 100644
--- a/src/sage/plot/histogram.py
+++ b/src/sage/plot/histogram.py
-@@ -75,7 +75,7 @@ class Histogram(GraphicPrimitive):
+@@ -74,7 +74,7 @@ class Histogram(GraphicPrimitive):
sage: H = histogram([10,3,5], density=True); h = H[0]
sage: h.get_minmax_data() # rel tol 1e-15
@@ -3762,7 +3762,7 @@ diff --git a/src/sage/rings/polynomial/groebner_fan.py b/src/sage/rings/polynomi
index 2adafe3309..80ec1d8821 100644
--- a/src/sage/rings/polynomial/groebner_fan.py
+++ b/src/sage/rings/polynomial/groebner_fan.py
-@@ -1505,13 +1505,13 @@ class GroebnerFan(SageObject):
+@@ -1504,13 +1504,13 @@ class GroebnerFan(SageObject):
sage: R.<x,y> = PolynomialRing(QQ)
sage: G = R.ideal([y^3 - x^2, y^2 - 13*x]).groebner_fan()
sage: G._gfan_stats()
@@ -3785,7 +3785,7 @@ diff --git a/src/sage/rings/polynomial/laurent_polynomial.pyx b/src/sage/rings/p
index c8538ee54a..fa707f47a6 100644
--- a/src/sage/rings/polynomial/laurent_polynomial.pyx
+++ b/src/sage/rings/polynomial/laurent_polynomial.pyx
-@@ -2093,7 +2093,7 @@ cdef class LaurentPolynomial_mpair(LaurentPolynomial):
+@@ -2148,7 +2148,7 @@ cdef class LaurentPolynomial_mpair(LaurentPolynomial):
sage: L.<w,z> = LaurentPolynomialRing(QQ)
sage: a = w^2*z^-1 +3
sage: a.dict() # indirect doctest
@@ -3895,7 +3895,7 @@ diff --git a/src/sage/rings/qqbar.py b/src/sage/rings/qqbar.py
index 9c6ec027d0..4d3521c3e8 100644
--- a/src/sage/rings/qqbar.py
+++ b/src/sage/rings/qqbar.py
-@@ -8061,13 +8061,13 @@ class ANBinaryExpr(ANDescr):
+@@ -8096,13 +8096,13 @@ class ANBinaryExpr(ANDescr):
decrease it before we return::
sage: import sys; sys.getrecursionlimit()
@@ -3965,7 +3965,7 @@ diff --git a/src/sage/sandpiles/sandpile.py b/src/sage/sandpiles/sandpile.py
index cebed8fb19..6e4711a65f 100644
--- a/src/sage/sandpiles/sandpile.py
+++ b/src/sage/sandpiles/sandpile.py
-@@ -265,7 +265,7 @@ Working with sandpile divisors::
+@@ -264,7 +264,7 @@ Working with sandpile divisors::
sage: D.is_linearly_equivalent(E)
True
sage: D.q_reduced()
@@ -3974,7 +3974,7 @@ index cebed8fb19..6e4711a65f 100644
sage: S = sandpiles.Complete(4)
sage: D = SandpileDivisor(S, [0,0,0,5])
sage: E = D.stabilize(); E
-@@ -273,7 +273,7 @@ Working with sandpile divisors::
+@@ -272,7 +272,7 @@ Working with sandpile divisors::
sage: D.is_linearly_equivalent(E)
True
sage: D.q_reduced()
@@ -3983,7 +3983,7 @@ index cebed8fb19..6e4711a65f 100644
sage: D.rank()
2
sage: sorted(D.effective_div(), key=str)
-@@ -550,7 +550,7 @@ class Sandpile(DiGraph):
+@@ -549,7 +549,7 @@ class Sandpile(DiGraph):
[-1 -2 3 0]
[ 0 0 0 0]
sage: s.dict()
@@ -3992,7 +3992,7 @@ index cebed8fb19..6e4711a65f 100644
Sandpiles can be created from Graphs and DiGraphs. ::
-@@ -1978,13 +1978,13 @@ class Sandpile(DiGraph):
+@@ -1977,13 +1977,13 @@ class Sandpile(DiGraph):
sage: S = Sandpile({0:[1], 2:[0,1], 1:[2]})
sage: S.dict()
@@ -4008,7 +4008,7 @@ index cebed8fb19..6e4711a65f 100644
"""
# first order the vertices according to their distance from the sink
-@@ -2079,7 +2079,7 @@ class Sandpile(DiGraph):
+@@ -2078,7 +2078,7 @@ class Sandpile(DiGraph):
sage: s.group_order()
28
sage: s.jacobian_representatives()
@@ -4017,7 +4017,7 @@ index cebed8fb19..6e4711a65f 100644
Let `\tau` be the nonnegative generator of the kernel of the transpose of
the Laplacian, and let `tau_s` be it sink component, then the sandpile
-@@ -2427,7 +2427,8 @@ class Sandpile(DiGraph):
+@@ -2426,7 +2426,8 @@ class Sandpile(DiGraph):
sage: S = Sandpile({0:{},1:{0: 1, 2: 1, 3: 4},2:{3: 5},3:{1: 1, 2: 1}},0)
sage: p = S.betti_complexes()
sage: p[0]
@@ -4027,7 +4027,7 @@ index cebed8fb19..6e4711a65f 100644
sage: S.resolution()
'R^1 <-- R^5 <-- R^5 <-- R^1'
sage: S.betti()
-@@ -3005,9 +3006,9 @@ class SandpileConfig(dict):
+@@ -3004,9 +3005,9 @@ class SandpileConfig(dict):
sage: c.equivalent_recurrent()
{1: 1, 2: 1}
sage: c.__dict__
@@ -4040,7 +4040,7 @@ index cebed8fb19..6e4711a65f 100644
.. NOTE::
-@@ -4326,12 +4327,12 @@ class SandpileDivisor(dict):
+@@ -4324,12 +4325,12 @@ class SandpileDivisor(dict):
sage: D = SandpileDivisor(S,[0,1,1])
sage: eff = D.effective_div()
sage: D.__dict__
@@ -4057,7 +4057,7 @@ index cebed8fb19..6e4711a65f 100644
sage: D[0] += 1
sage: D.__dict__
{'_sandpile': Cycle sandpile graph: 3 vertices, sink = 0,
-@@ -4928,7 +4929,7 @@ class SandpileDivisor(dict):
+@@ -4926,7 +4927,7 @@ class SandpileDivisor(dict):
sage: s = sandpiles.Complete(4)
sage: D = SandpileDivisor(s,[2,-3,2,0])
sage: D.q_reduced()
@@ -4066,7 +4066,7 @@ index cebed8fb19..6e4711a65f 100644
sage: D.q_reduced(False)
[-2, 1, 2, 0]
-@@ -6360,13 +6361,13 @@ def glue_graphs(g, h, glue_g, glue_h):
+@@ -6358,13 +6359,13 @@ def glue_graphs(g, h, glue_g, glue_h):
sage: glue_y = {0: 1, 1: 2, 3: 1}
sage: z = glue_graphs(x,y,glue_x,glue_y); z
{'sink': {},
@@ -4227,7 +4227,7 @@ diff --git a/src/sage/schemes/projective/projective_space.py b/src/sage/schemes/
index ca8407020f..88f72f17aa 100644
--- a/src/sage/schemes/projective/projective_space.py
+++ b/src/sage/schemes/projective/projective_space.py
-@@ -1817,13 +1817,13 @@ class ProjectiveSpace_finite_field(ProjectiveSpace_field):
+@@ -1825,13 +1825,13 @@ class ProjectiveSpace_finite_field(ProjectiveSpace_field):
sage: P1 = ProjectiveSpace(GF(7),1,'x')
sage: P1.rational_points_dictionary()
{(0 : 1): 0,
@@ -4511,7 +4511,7 @@ diff --git a/src/sage/structure/unique_representation.py b/src/sage/structure/un
index 4fc44c8b86..482a288b90 100644
--- a/src/sage/structure/unique_representation.py
+++ b/src/sage/structure/unique_representation.py
-@@ -874,7 +874,7 @@ class CachedRepresentation(six.with_metaclass(ClasscallMetaclass)):
+@@ -859,7 +859,7 @@ class CachedRepresentation(six.with_metaclass(ClasscallMetaclass)):
arguments in the instance dictionary upon construction::
sage: x.__dict__
@@ -4538,3 +4538,163 @@ index c76b2f7de7..9464e1422a 100644
sage: C.show(vertex_colors = C.coloring(hex_colors = True))
Sage example in ./graphtheory.tex, line 644::
+diff --git a/src/sage/geometry/polyhedron/base.py b/src/sage/geometry/polyhedron/base.py
+index 8f740b7621..1a2ff5a135 100644
+--- a/src/sage/geometry/polyhedron/base.py
++++ b/src/sage/geometry/polyhedron/base.py
+@@ -6035,20 +6035,20 @@ class Polyhedron_base(Element):
+ sage: P = polytopes.twenty_four_cell()
+ sage: P.flag_f_vector()
+ {(-1,): 1,
+- (0,): 24,
+- (0, 1): 192,
+- (0, 1, 2): 576,
+ (0, 1, 2, 3): 1152,
++ (0, 1, 2): 576,
+ (0, 1, 3): 576,
+- (0, 2): 288,
+ (0, 2, 3): 576,
+- (0, 3): 144,
+- (1,): 96,
+- (1, 2): 288,
+ (1, 2, 3): 576,
++ (0, 1): 192,
++ (0, 2): 288,
++ (1, 2): 288,
++ (0, 3): 144,
+ (1, 3): 288,
+- (2,): 96,
+ (2, 3): 192,
++ (0,): 24,
++ (1,): 96,
++ (2,): 96,
+ (3,): 24,
+ (4,): 1}
+
+@@ -6078,18 +6078,18 @@ class Polyhedron_base(Element):
+ sage: P = (Polyhedron(lines=[[1]]) * polytopes.cross_polytope(3))
+ sage: P.flag_f_vector()
+ {(-1,): 1,
+- (0, 1): 0,
+ (0, 1, 2): 0,
+ (0, 1, 3): 0,
+- (0, 2): 0,
+ (0, 2, 3): 0,
++ (1, 2, 3): 48,
++ (0, 1): 0,
++ (0, 2): 0,
+ (0, 3): 0,
+- (0,): 0,
+ (1, 2): 24,
+- (1, 2, 3): 48,
+ (1, 3): 24,
+- (1,): 6,
+ (2, 3): 24,
++ (0,): 0,
++ (1,): 6,
+ (2,): 12,
+ (3,): 8,
+ 4: 1}
+@@ -6129,22 +6129,22 @@ class Polyhedron_base(Element):
+
+ sage: polytopes.hypercube(4)._flag_f_vector()
+ {(-1,): 1,
+- (0,): 16,
+- (0, 1): 64,
+- (0, 1, 2): 192,
+- (0, 1, 2, 3): 384,
+- (0, 1, 3): 192,
+- (0, 2): 96,
+- (0, 2, 3): 192,
+- (0, 3): 64,
+- (1,): 32,
+- (1, 2): 96,
+- (1, 2, 3): 192,
+- (1, 3): 96,
+- (2,): 24,
+- (2, 3): 48,
+- (3,): 8,
+- (4,): 1}
++ (0, 1, 2, 3): 384,
++ (0, 1, 2): 192,
++ (0, 1, 3): 192,
++ (0, 2, 3): 192,
++ (1, 2, 3): 192,
++ (0, 1): 64,
++ (0, 2): 96,
++ (1, 2): 96,
++ (0, 3): 64,
++ (1, 3): 96,
++ (2, 3): 48,
++ (0,): 16,
++ (1,): 32,
++ (2,): 24,
++ (3,): 8,
++ (4,): 1}
+ """
+ return self.combinatorial_polyhedron()._flag_f_vector()
+
+diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx
+index 0a05a75ef4..0fc48b551a 100644
+--- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx
++++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx
+@@ -1347,20 +1347,20 @@ cdef class CombinatorialPolyhedron(SageObject):
+ sage: C = polytopes.hypercube(4).combinatorial_polyhedron()
+ sage: C.flag_f_vector()
+ {(-1,): 1,
+- (0,): 16,
+- (0, 1): 64,
+- (0, 1, 2): 192,
+ (0, 1, 2, 3): 384,
++ (0, 1, 2): 192,
+ (0, 1, 3): 192,
+- (0, 2): 96,
+ (0, 2, 3): 192,
+- (0, 3): 64,
+- (1,): 32,
+- (1, 2): 96,
+ (1, 2, 3): 192,
++ (0, 1): 64,
++ (0, 2): 96,
++ (1, 2): 96,
++ (0, 3): 64,
+ (1, 3): 96,
+- (2,): 24,
+ (2, 3): 48,
++ (0,): 16,
++ (1,): 32,
++ (2,): 24,
+ (3,): 8,
+ (4,): 1}
+
+@@ -1389,7 +1389,7 @@ cdef class CombinatorialPolyhedron(SageObject):
+
+ sage: C = (Polyhedron(lines=[[1]]) * polytopes.hypercube(2)).combinatorial_polyhedron()
+ sage: C.flag_f_vector()
+- {(-1,): 1, (0, 1): 0, (0, 2): 0, (0,): 0, (1, 2): 8, (1,): 4, (2,): 4, 3: 1}
++ {(-1,): 1, (0, 1): 0, (0, 2): 0, (1, 2): 8, (0,): 0, (1,): 4, (2,): 4, 3: 1}
+
+ If the arguments are not stricly increasing or out of range, a key error is raised::
+
+@@ -1426,7 +1426,7 @@ cdef class CombinatorialPolyhedron(SageObject):
+
+ sage: C = CombinatorialPolyhedron(3)
+ sage: C._flag_f_vector()
+- {(-1,): 1, (0, 1): 0, (0, 2): 0, (0,): 0, (1, 2): 0, (1,): 0, (2,): 0, 3: 1}
++ {(-1,): 1, (0, 1): 0, (0, 2): 0, (1, 2): 0, (0,): 0, (1,): 0, (2,): 0, 3: 1}
+ """
+ poly = self.face_lattice().flag_f_polynomial()
+ variables = poly.variables()
+diff --git a/src/sage/rings/ring_extension.pyx b/src/sage/rings/ring_extension.pyx
+index 291ae46fe6..b62834d226 100644
+--- a/src/sage/rings/ring_extension.pyx
++++ b/src/sage/rings/ring_extension.pyx
+@@ -379,7 +379,7 @@ class RingExtensionFactory(UniqueFactory):
+ To: Rational Field
+ Defn: 1 |--> 1, (), ()),
+ {'constructors': [(<type 'sage.rings.ring_extension.RingExtension_generic'>,
+- {'print_options': {'print_elements_as': None, 'print_parent_as': None},
++ {'print_options': {'print_parent_as': None, 'print_elements_as': None},
+ 'is_backend_exposed': True})]})
+
+ sage: RingExtension.create_key_and_extra_args(GF(5^4), GF(5^2), names=('a',))
diff --git a/sagemath-matplotlib-3.2.patch b/sagemath-matplotlib-3.2.patch
new file mode 100644
index 000000000000..8f9ef8c548be
--- /dev/null
+++ b/sagemath-matplotlib-3.2.patch
@@ -0,0 +1,13 @@
+diff --git a/src/sage/plot/contour_plot.py b/src/sage/plot/contour_plot.py
+index a7533fa3d9..12a2b1f670 100644
+--- a/src/sage/plot/contour_plot.py
++++ b/src/sage/plot/contour_plot.py
+@@ -223,7 +223,7 @@ class ContourPlot(GraphicPrimitive):
+ cb.add_lines(CS)
+
+
+-@suboptions('colorbar', orientation='vertical', format=None, spacing=None)
++@suboptions('colorbar', orientation='vertical', format=None, spacing='uniform')
+ @suboptions('label', fontsize=9, colors='blue', inline=None, inline_spacing=3,
+ fmt="%1.2f")
+ @options(plot_points=100, fill=True, contours=None, linewidths=None,
diff --git a/sagemath-pari-2.11.3.patch b/sagemath-pari-2.11.3.patch
new file mode 100644
index 000000000000..41d59ec9651c
--- /dev/null
+++ b/sagemath-pari-2.11.3.patch
@@ -0,0 +1,244 @@
+diff --git a/src/sage/lfunctions/dokchitser.py b/src/sage/lfunctions/dokchitser.py
+index 680ac17dfd..1fe0671c10 100644
+--- a/src/sage/lfunctions/dokchitser.py
++++ b/src/sage/lfunctions/dokchitser.py
+@@ -110,8 +110,7 @@ class Dokchitser(SageObject):
+ sage: L.taylor_series(1,4)
+ 0.000000000000000 + 0.305999773834052*z + 0.186547797268162*z^2 - 0.136791463097188*z^3 + O(z^4)
+ sage: L.check_functional_equation()
+- 6.11218974700000e-18 # 32-bit
+- 6.04442711160669e-18 # 64-bit
++ 6.11218974700000e-18
+
+ RANK 2 ELLIPTIC CURVE:
+
+@@ -669,8 +668,7 @@ class Dokchitser(SageObject):
+
+ sage: L = Dokchitser(conductor=1, gammaV=[0], weight=1, eps=1, poles=[1], residues=[-1], init='1')
+ sage: L.check_functional_equation()
+- -1.35525271600000e-20 # 32-bit
+- -2.71050543121376e-20 # 64-bit
++ -1.35525271600000e-20
+
+ If we choose the sign in functional equation for the
+ `\zeta` function incorrectly, the functional equation
+diff --git a/src/sage/lfunctions/pari.py b/src/sage/lfunctions/pari.py
+index c60f944ed4..1daa219c00 100644
+--- a/src/sage/lfunctions/pari.py
++++ b/src/sage/lfunctions/pari.py
+@@ -423,7 +423,7 @@ class LFunction(SageObject):
+ sage: L.taylor_series(1,4)
+ 0.000000000000000 + 0.305999773834052*z + 0.186547797268162*z^2 - 0.136791463097188*z^3 + O(z^4)
+ sage: L.check_functional_equation()
+- 1.08420217248550e-19
++ 4.33680868994202e-19
+
+ .. RUBRIC:: Rank 2 elliptic curve
+
+diff --git a/src/sage/schemes/elliptic_curves/ell_number_field.py b/src/sage/schemes/elliptic_curves/ell_number_field.py
+index 2967f085ca..b423c2b7ed 100644
+--- a/src/sage/schemes/elliptic_curves/ell_number_field.py
++++ b/src/sage/schemes/elliptic_curves/ell_number_field.py
+@@ -810,7 +810,7 @@ class EllipticCurve_number_field(EllipticCurve_field):
+ sage: K.<v> = NumberField(x^2 + 161*x - 150)
+ sage: E = EllipticCurve([25105/216*v - 3839/36, 634768555/7776*v - 98002625/1296, 634768555/7776*v - 98002625/1296, 0, 0])
+ sage: E.global_integral_model()
+- Elliptic Curve defined by y^2 + (2094779518028859*v-1940492905300351)*x*y + (477997268472544193101178234454165304071127500*v-442791377441346852919930773849502871958097500)*y = x^3 + (26519784690047674853185542622500*v-24566525306469707225840460652500)*x^2 over Number Field in v with defining polynomial x^2 + 161*x - 150
++ Elliptic Curve defined by y^2 + (33872485050625*v-31078224284250)*x*y + (2020602604156076340058146664245468750000*v-1871778534673615560803175189398437500000)*y = x^3 + (6933305282258321342920781250*v-6422644400723486559914062500)*x^2 over Number Field in v with defining polynomial x^2 + 161*x - 150
+
+ :trac:`14476`::
+
+@@ -923,10 +923,10 @@ class EllipticCurve_number_field(EllipticCurve_field):
+ sage: E1 = E.scale_curve(u^5)
+ sage: E1.ainvs()
+ (0,
+- 0,
+- 0,
+- 28087920796764302856*a + 88821804456186580548,
+- -77225139016967233228487820912*a - 244207331916752959911655344864)
++ 0,
++ 0,
++ 193309837823322216*a - 611299381639464252,
++ -3379649566176127326923323632*a + 10687390322316522207588229536)
+ sage: E1._scale_by_units().ainvs()
+ (0, 0, 0, 4536*a + 14148, -163728*a - 474336)
+
+diff --git a/src/sage/rings/number_field/unit_group.py b/src/sage/rings/number_field/unit_group.py
+index 6ed0aea16b..529e23a559 100644
+--- a/src/sage/rings/number_field/unit_group.py
++++ b/src/sage/rings/number_field/unit_group.py
+@@ -279,7 +279,7 @@ class UnitGroup(AbelianGroupWithValues_class):
+ sage: K.unit_group()
+ Unit group with structure C2 x Z x Z of Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123
+ sage: UnitGroup(K, S=tuple(K.primes_above(7)))
+- S-unit group with structure C2 x Z x Z x Z of Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123 with S = (Fractional ideal (7/225*a^2 - 7/75*a - 42/25),)
++ S-unit group with structure C2 x Z x Z x Z of Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123 with S = (Fractional ideal (28/225*a^2 + 77/75*a - 133/25),)
+
+ Conversion from unit group to a number field and back
+ gives the right results (:trac:`25874`)::
+diff --git a/src/sage/rings/number_field/number_field_element.pyx b/src/sage/rings/number_field/number_field_element.pyx
+index 59bab07db0..079eaaa6a2 100644
+--- a/src/sage/rings/number_field/number_field_element.pyx
++++ b/src/sage/rings/number_field/number_field_element.pyx
+@@ -1733,7 +1733,7 @@ cdef class NumberFieldElement(FieldElement):
+ sage: P.<X> = K[]
+ sage: L = NumberField(X^2 + a^2 + 2*a + 1, 'b')
+ sage: K(17)._rnfisnorm(L)
+- ((a^2 - 2)*b - 4, 1)
++ ((a^2 - 2)*b + 4, 1)
+
+ sage: K.<a> = NumberField(x^3 + x + 1)
+ sage: Q.<X> = K[]
+diff --git a/src/sage/rings/number_field/number_field_ideal.py b/src/sage/rings/number_field/number_field_ideal.py
+index 16bd277370..2eda5ba659 100644
+--- a/src/sage/rings/number_field/number_field_ideal.py
++++ b/src/sage/rings/number_field/number_field_ideal.py
+@@ -1827,7 +1827,7 @@ class NumberFieldFractionalIdeal(MultiplicativeGroupElement, NumberFieldIdeal):
+
+ sage: F.<a> = NumberField(2*x^3 + x + 1)
+ sage: fact = F.factor(2); fact
+- (Fractional ideal (2*a^2 + 1))^2 * (Fractional ideal (-2*a^2))
++ (Fractional ideal (-2*a^2 - 1))^2 * (Fractional ideal (2*a^2))
+ sage: [p[0].norm() for p in fact]
+ [2, 2]
+ """
+@@ -2418,7 +2418,7 @@ class NumberFieldFractionalIdeal(MultiplicativeGroupElement, NumberFieldIdeal):
+ sage: A.is_coprime(B)
+ False
+ sage: lam = A.idealcoprime(B); lam
+- -1/6*a + 1/6
++ 1/6*a - 1/6
+ sage: (lam*A).is_coprime(B)
+ True
+
+diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py
+index e39c347747..aba9eb960f 100644
+--- a/src/sage/rings/number_field/number_field.py
++++ b/src/sage/rings/number_field/number_field.py
+@@ -3266,18 +3266,18 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
+ Fractional ideal (2, 1/2*a - 1/2)
+ Fractional ideal (2, 1/2*a + 1/2)
+ 3
+- Fractional ideal (3, 1/2*a - 1/2)
+ Fractional ideal (3, 1/2*a + 1/2)
++ Fractional ideal (3, 1/2*a - 1/2)
+ 4
+ Fractional ideal (4, 1/2*a + 3/2)
+ Fractional ideal (2)
+ Fractional ideal (4, 1/2*a + 5/2)
+ 5
+ 6
+- Fractional ideal (1/2*a - 1/2)
+- Fractional ideal (6, 1/2*a + 5/2)
+ Fractional ideal (6, 1/2*a + 7/2)
+ Fractional ideal (1/2*a + 1/2)
++ Fractional ideal (1/2*a - 1/2)
++ Fractional ideal (6, 1/2*a + 5/2)
+ 7
+ 8
+ Fractional ideal (1/2*a + 3/2)
+@@ -3285,9 +3285,9 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
+ Fractional ideal (4, a + 1)
+ Fractional ideal (1/2*a - 3/2)
+ 9
+- Fractional ideal (9, 1/2*a + 11/2)
+- Fractional ideal (3)
+ Fractional ideal (9, 1/2*a + 7/2)
++ Fractional ideal (3)
++ Fractional ideal (9, 1/2*a + 11/2)
+ 10
+ """
+ hnf_ideals = self.pari_nf().ideallist(bound)
+@@ -4383,7 +4383,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
+ -1/13*a^2 + 6/13*a + 345/13,
+ -1,
+ 2/13*a^2 + 1/13*a - 755/13,
+- 1/13*a^2 - 19/13*a - 7/13],
++ 1/13*a^2 + 20/13*a - 7/13],
+ [(Fractional ideal (11, a - 2), 2), (Fractional ideal (19, a + 7), 2)])
+
+ Number fields defined by non-monic and non-integral
+@@ -4541,9 +4541,9 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
+ -1/13*a^2 + 6/13*a + 345/13,
+ -1,
+ 2/13*a^2 + 1/13*a - 755/13,
+- 1/13*a^2 - 19/13*a - 7/13,
+- -1/13*a^2 + 45/13*a - 97/13,
+- 2/13*a^2 + 40/13*a - 27/13]
++ 1/13*a^2 + 20/13*a - 7/13,
++ 1/13*a^2 - 45/13*a + 97/13,
++ -2/13*a^2 - 40/13*a + 27/13]
+
+ Verify that :trac:`16708` is fixed::
+
+@@ -5188,7 +5188,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
+
+ sage: K.<a> = NumberField(7/9*x^3 + 7/3*x^2 - 56*x + 123)
+ sage: K.elements_of_norm(7)
+- [7/225*a^2 - 7/75*a - 42/25]
++ [28/225*a^2 + 77/75*a - 133/25]
+ """
+ proof = proof_flag(proof)
+ B = self.pari_bnf(proof).bnfisintnorm(n)
+@@ -5291,7 +5291,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
+ sage: pari('setrand(2)')
+ sage: L.<b> = K.extension(x^2 - 7)
+ sage: f = L.factor(a + 1); f
+- (Fractional ideal (1/2*a*b - a + 1/2)) * (Fractional ideal (-1/2*a*b - a + 1/2))
++ (Fractional ideal (-1/2*b + 1/2*a + 1)) * (Fractional ideal (-1/2*a*b - a + 1/2))
+ sage: f.value() == a+1
+ True
+
+@@ -6368,7 +6368,7 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
+ sage: [K.uniformizer(P) for P,e in factor(K.ideal(5))]
+ [t^2 - t + 1, t + 2, t - 2]
+ sage: [K.uniformizer(P) for P,e in factor(K.ideal(7))]
+- [t^2 + 3*t + 1]
++ [t^2 - 4*t + 1]
+ sage: [K.uniformizer(P) for P,e in factor(K.ideal(67))]
+ [t + 23, t + 26, t - 32, t - 18]
+
+@@ -7638,11 +7638,11 @@ class NumberField_absolute(NumberField_generic):
+ Ring morphism:
+ From: Number Field in a1 with defining polynomial x^3 - 7*x - 7
+ To: Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123
+- Defn: a1 |--> 7/225*a^2 - 7/75*a - 42/25,
++ Defn: a1 |--> 28/225*a^2 + 77/75*a - 133/25,
+ Ring morphism:
+ From: Number Field in a with defining polynomial 7/9*x^3 + 7/3*x^2 - 56*x + 123
+ To: Number Field in a1 with defining polynomial x^3 - 7*x - 7
+- Defn: a |--> -15/7*a1^2 + 9)
++ Defn: a |--> -60/7*a1^2 + 15*a1 + 39)
+ """
+ if name is None:
+ name = self.variable_names()
+diff --git a/src/sage/rings/polynomial/polynomial_quotient_ring.py b/src/sage/rings/polynomial/polynomial_quotient_ring.py
+index 397e92d0fd..1974eaae8b 100644
+--- a/src/sage/rings/polynomial/polynomial_quotient_ring.py
++++ b/src/sage/rings/polynomial/polynomial_quotient_ring.py
+@@ -1296,9 +1296,9 @@ class PolynomialQuotientRing_generic(CommutativeRing):
+ 1/16*a*xbar^3 + (-1/16*a - 1/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 23/8),
+ 6),
+ ((-5/4*xbar^2 - 115/4,
+- 1/4*a*xbar^2 + 23/4*a,
+- -1/16*xbar^3 - 7/16*xbar^2 - 23/16*xbar - 161/16,
+- 1/16*a*xbar^3 - 1/16*a*xbar^2 + 23/16*a*xbar - 23/16*a),
++ (1/8*a - 5/8)*xbar^2 + 23/8*a - 115/8,
++ -1/16*xbar^3 - 17/16*xbar^2 - 23/16*xbar - 391/16,
++ 1/16*a*xbar^3 + (-1/16*a - 5/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 115/8),
+ 2)]
+
+ By using the ideal `(a)`, we cut the part of the class group coming from
+@@ -1428,9 +1428,9 @@ class PolynomialQuotientRing_generic(CommutativeRing):
+ 1/16*a*xbar^3 + (-1/16*a - 1/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 23/8),
+ 6),
+ ((-5/4*xbar^2 - 115/4,
+- 1/4*a*xbar^2 + 23/4*a,
+- -1/16*xbar^3 - 7/16*xbar^2 - 23/16*xbar - 161/16,
+- 1/16*a*xbar^3 - 1/16*a*xbar^2 + 23/16*a*xbar - 23/16*a),
++ (1/8*a - 5/8)*xbar^2 + 23/8*a - 115/8,
++ -1/16*xbar^3 - 17/16*xbar^2 - 23/16*xbar - 391/16,
++ 1/16*a*xbar^3 + (-1/16*a - 5/8)*xbar^2 + 23/16*a*xbar - 23/16*a - 115/8),
+ 2)]
+
+ Note that all the returned values live where we expect them to::
diff --git a/sagemath-python-3.8.patch b/sagemath-python-3.8.patch
index aee6689be4c4..eb8dd790cfda 100644
--- a/sagemath-python-3.8.patch
+++ b/sagemath-python-3.8.patch
@@ -118,7 +118,7 @@ diff --git a/src/sage/combinat/growth.py b/src/sage/combinat/growth.py
index cb9efbbb22..48eee6b42e 100644
--- a/src/sage/combinat/growth.py
+++ b/src/sage/combinat/growth.py
-@@ -1707,7 +1707,7 @@ class Rule(UniqueRepresentation):
+@@ -1706,7 +1706,7 @@ class Rule(UniqueRepresentation):
EXAMPLES::
sage: from sage.combinat.growth import Rule
@@ -342,7 +342,7 @@ diff --git a/src/sage/data_structures/mutable_poset.py b/src/sage/data_structure
index 530b423bb5..f2eb8ca8c2 100644
--- a/src/sage/data_structures/mutable_poset.py
+++ b/src/sage/data_structures/mutable_poset.py
-@@ -3318,7 +3318,7 @@ class MutablePoset(SageObject):
+@@ -3316,7 +3316,7 @@ class MutablePoset(SageObject):
sage: P = MP([T((1, 1)), T((1, 3)), T((2, 1)),
....: T((1, 2)), T((2, 2))])
sage: list(P.maximal_elements())
@@ -378,7 +378,7 @@ diff --git a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py b/src/sage/d
index 99ad85b695..4d2642366a 100644
--- a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py
+++ b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py
-@@ -3146,8 +3146,8 @@ class DynamicalSystem_projective(SchemeMorphism_polynomial_projective_space,
+@@ -3147,8 +3147,8 @@ class DynamicalSystem_projective(SchemeMorphism_polynomial_projective_space,
sage: D6 = DynamicalSystem_projective([y^2,x^2])
sage: D6.automorphism_group()
[
@@ -389,7 +389,7 @@ index 99ad85b695..4d2642366a 100644
]
"""
alg = kwds.get('algorithm', None)
-@@ -3671,13 +3671,13 @@ class DynamicalSystem_projective(SchemeMorphism_polynomial_projective_space,
+@@ -3672,13 +3672,13 @@ class DynamicalSystem_projective(SchemeMorphism_polynomial_projective_space,
sage: P.<x,y,z> = ProjectiveSpace(K,2)
sage: f = DynamicalSystem_projective([x^2+z^2, y^2+x^2, z^2+y^2])
sage: f.preperiodic_points(0,1)
@@ -410,7 +410,7 @@ index 99ad85b695..4d2642366a 100644
::
-@@ -3892,13 +3892,13 @@ class DynamicalSystem_projective(SchemeMorphism_polynomial_projective_space,
+@@ -3893,13 +3893,13 @@ class DynamicalSystem_projective(SchemeMorphism_polynomial_projective_space,
sage: P.<x,y,z> = ProjectiveSpace(K,2)
sage: f = DynamicalSystem_projective([x^2+z^2, y^2+x^2, z^2+y^2])
sage: f.periodic_points(1)
@@ -429,7 +429,7 @@ index 99ad85b695..4d2642366a 100644
::
-@@ -5496,7 +5496,7 @@ class DynamicalSystem_projective_field(DynamicalSystem_projective,
+@@ -5497,7 +5497,7 @@ class DynamicalSystem_projective_field(DynamicalSystem_projective,
sage: f.rational_periodic_points()
doctest:warning
...
@@ -438,7 +438,7 @@ index 99ad85b695..4d2642366a 100644
"""
from sage.misc.superseded import deprecation
deprecation(28109, "use sage.dynamics.arithmetic_dynamics.projective_ds.all_periodic_points instead")
-@@ -5940,8 +5940,8 @@ class DynamicalSystem_projective_field(DynamicalSystem_projective,
+@@ -5941,8 +5941,8 @@ class DynamicalSystem_projective_field(DynamicalSystem_projective,
(w^2 + w - 25/16 : 1),
(-w : 1),
(-w^2 + 29/16 : 1),
@@ -448,7 +448,7 @@ index 99ad85b695..4d2642366a 100644
(-w^2 + 21/16 : 1),
(w^2 - 21/16 : 1),
(w^2 + w - 33/16 : 1),
-@@ -6069,8 +6069,8 @@ class DynamicalSystem_projective_field(DynamicalSystem_projective,
+@@ -6070,8 +6070,8 @@ class DynamicalSystem_projective_field(DynamicalSystem_projective,
sage: g = f.conjugate(m)
sage: f.conjugating_set(g) # long time
[
@@ -463,7 +463,7 @@ diff --git a/src/sage/geometry/cone.py b/src/sage/geometry/cone.py
index 942ffa37a2..a9ded05a74 100644
--- a/src/sage/geometry/cone.py
+++ b/src/sage/geometry/cone.py
-@@ -2274,8 +2274,7 @@ class ConvexRationalPolyhedralCone(IntegralRayCollection,
+@@ -2281,8 +2281,7 @@ class ConvexRationalPolyhedralCone(IntegralRayCollection,
sage: face = L.level_sets()[1][0]
sage: D = L.hasse_diagram()
sage: D.neighbors(face)
@@ -473,7 +473,7 @@ index 942ffa37a2..a9ded05a74 100644
However, you can achieve some of this functionality using
:meth:`facets`, :meth:`facet_of`, and :meth:`adjacent` methods::
-@@ -4047,7 +4046,7 @@ class ConvexRationalPolyhedralCone(IntegralRayCollection,
+@@ -4056,7 +4055,7 @@ class ConvexRationalPolyhedralCone(IntegralRayCollection,
(N(0, 1), N(1, 0), N(-1, 0))
sage: line = Cone([(1,1,1),(-1,-1,-1)])
sage: line.semigroup_generators()
@@ -791,7 +791,7 @@ diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py
index cab8faa833..9f00d87eb4 100644
--- a/src/sage/graphs/graph.py
+++ b/src/sage/graphs/graph.py
-@@ -6767,7 +6767,7 @@ class Graph(GenericGraph):
+@@ -6770,7 +6770,7 @@ class Graph(GenericGraph):
sage: all(F.degree(u) == len(cliques) for u,cliques in d.items())
True
sage: F.cliques_containing_vertex(vertices=[(0, 1)])
@@ -800,7 +800,7 @@ index cab8faa833..9f00d87eb4 100644
"""
import networkx
-@@ -7104,7 +7104,7 @@ class Graph(GenericGraph):
+@@ -7107,7 +7107,7 @@ class Graph(GenericGraph):
Vertices may be arbitrary --- check that :trac:`24898` is fixed::
sage: Graph({(1,2):[(2,3)],(2,3):[(1,2)]}).modular_decomposition()
@@ -1672,3 +1672,25 @@ index 40a196b964..b66795fa55 100644
"""
from sage.symbolic.ring import SymbolicRing, SR
+diff --git a/src/sage/repl/preparse.py b/src/sage/repl/preparse.py
+index 529c341833..25223123d1 100644
+--- a/src/sage/repl/preparse.py
++++ b/src/sage/repl/preparse.py
+@@ -791,7 +791,7 @@ def preparse_numeric_literals(code, extract=False):
+ sage: 123__45 # py3
+ Traceback (most recent call last):
+ ...
+- SyntaxError: invalid token
++ SyntaxError: invalid decimal literal
+
+ sage: preparse_numeric_literals('3040_1_')
+ '3040_1_'
+@@ -802,7 +802,7 @@ def preparse_numeric_literals(code, extract=False):
+ sage: 3040_1_ # py3
+ Traceback (most recent call last):
+ ...
+- SyntaxError: invalid token
++ SyntaxError: invalid decimal literal
+ """
+ literals = {}
+ last = 0
diff --git a/sagemath-singular-4.1.2.patch b/sagemath-singular-4.1.2.patch
index 492e465aa28c..1bfcf6378c67 100644
--- a/sagemath-singular-4.1.2.patch
+++ b/sagemath-singular-4.1.2.patch
@@ -433,7 +433,7 @@ diff --git a/src/sage/combinat/root_system/hecke_algebra_representation.py b/src
index 7c4f64a..24750be 100644
--- a/src/sage/combinat/root_system/hecke_algebra_representation.py
+++ b/src/sage/combinat/root_system/hecke_algebra_representation.py
-@@ -745,7 +745,7 @@ class HeckeAlgebraRepresentation(WithEqualityById, SageObject):
+@@ -746,7 +746,7 @@ class HeckeAlgebraRepresentation(WithEqualityById, SageObject):
-2121 + 212,
(q2/(q1-q2))*2121 + (q2/(-q1+q2))*121 + (q2/(-q1+q2))*212 - 12 + ((-q2)/(-q1+q2))*21 + 2,
((-q2^2)/(-q1^2+q1*q2-q2^2))*2121 - 121 + (q2^2/(-q1^2+q1*q2-q2^2))*212 + 21,