summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD18
-rw-r--r--sagemath-matplotlib-3.2.patch86
-rw-r--r--sagemath-no-dict-sorting.patch103
-rw-r--r--sagemath-sphinx-3.patch272
5 files changed, 422 insertions, 65 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7865fc33e90e..13ed14c352e5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = sagemath-git
pkgdesc = Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab
- pkgver = 9.1.rc0.r0.g10ed24e3ed
+ pkgver = 9.1.rc1.r0.g249fc90389
pkgrel = 1
url = http://www.sagemath.org
arch = x86_64
@@ -108,6 +108,7 @@ pkgbase = sagemath-git
source = sagemath-matplotlib-3.2.patch
source = sagemath-pari-2.11.3.patch
source = sagemath-jedi-0.16.patch
+ source = sagemath-sphinx-3.patch
sha256sums = SKIP
sha256sums = b1112875776635b4f33bc13c8aaedfbbaed8f62a1dac986f7b8faa7565d6abae
sha256sums = 6a5470d7044a50a35a6478f57c19adf72fe54aefebeea8a095915b63f9e219ac
@@ -115,14 +116,15 @@ pkgbase = sagemath-git
sha256sums = 937074fa7a8a4e2aba9ea77ec622fe937985a1a9176c48460d51325ee877a4f5
sha256sums = 408e193c96a466cfe0134fe44a28e93659916d1d28bd4ea89460aec7fefe8657
sha256sums = e44bbde87f3312548faad75b7383ef21fade55be251ab5804de41cd3842ca8a0
- sha256sums = 0ef047e671ddd288e07e9f544f646a9a0bd908accfe6b96dcaf4ee52fa6037e7
+ sha256sums = 54de32de6f5b71b102aa3df2f6c177d81f4a9fd1076079d412e3e3393155566b
sha256sums = fc28ca3aa1a656bfb451181d5086b3041238f24bf462cc69626d3cd603a246df
sha256sums = e5aa663c7f76d737ea697a805094734ab8e06eab35bbeadcb4dcab89998d7b31
sha256sums = 5e6d1aa34959bd4369bd08a80648a5c7bc2d38e72c97e9a5f986e91f8a7aca07
sha256sums = 588d831b44ec28ca18540d5649e8af518500b82431a59542f3daa92d6c3007cd
- sha256sums = 979777363001cca87f73128dd4db5f372fc9e4f1079805a20af01df47797468f
+ sha256sums = 4947a86264622dffebb58b802f0616f0fb47b5784d95346f44ee426cb2e541fc
sha256sums = 1f41b35c916df74fc943949ccde1155e59e7bbbee220c845c9afdf4e0f76bfbc
sha256sums = 30e15715cdc90639d7cbd34e76bbadae2e6d8bab6241617a386aed9513207b8a
+ sha256sums = eeeafd1a74c8c43c369569c8ea1dbae8fd9fcfdf0e6609471c030e9738b97ce5
pkgname = sagemath-git
optdepends = cython: to compile cython code
diff --git a/PKGBUILD b/PKGBUILD
index edd36f3cb024..5ae1164f56d6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,7 +7,7 @@
pkgbase=sagemath-git
pkgname=(sagemath-git sagemath-jupyter-git)
-pkgver=9.1.rc0.r0.g10ed24e3ed
+pkgver=9.1.rc1.r0.g249fc90389
pkgrel=1
pkgdesc="Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab"
arch=(x86_64)
@@ -48,7 +48,8 @@ source=(git://git.sagemath.org/sage.git#branch=develop
sagemath-gap-4.11.patch
sagemath-matplotlib-3.2.patch
sagemath-pari-2.11.3.patch
- sagemath-jedi-0.16.patch)
+ sagemath-jedi-0.16.patch
+ sagemath-sphinx-3.patch)
sha256sums=('SKIP'
'b1112875776635b4f33bc13c8aaedfbbaed8f62a1dac986f7b8faa7565d6abae'
'6a5470d7044a50a35a6478f57c19adf72fe54aefebeea8a095915b63f9e219ac'
@@ -56,14 +57,15 @@ sha256sums=('SKIP'
'937074fa7a8a4e2aba9ea77ec622fe937985a1a9176c48460d51325ee877a4f5'
'408e193c96a466cfe0134fe44a28e93659916d1d28bd4ea89460aec7fefe8657'
'e44bbde87f3312548faad75b7383ef21fade55be251ab5804de41cd3842ca8a0'
- '0ef047e671ddd288e07e9f544f646a9a0bd908accfe6b96dcaf4ee52fa6037e7'
+ '54de32de6f5b71b102aa3df2f6c177d81f4a9fd1076079d412e3e3393155566b'
'fc28ca3aa1a656bfb451181d5086b3041238f24bf462cc69626d3cd603a246df'
'e5aa663c7f76d737ea697a805094734ab8e06eab35bbeadcb4dcab89998d7b31'
'5e6d1aa34959bd4369bd08a80648a5c7bc2d38e72c97e9a5f986e91f8a7aca07'
'588d831b44ec28ca18540d5649e8af518500b82431a59542f3daa92d6c3007cd'
- '979777363001cca87f73128dd4db5f372fc9e4f1079805a20af01df47797468f'
+ '4947a86264622dffebb58b802f0616f0fb47b5784d95346f44ee426cb2e541fc'
'1f41b35c916df74fc943949ccde1155e59e7bbbee220c845c9afdf4e0f76bfbc'
- '30e15715cdc90639d7cbd34e76bbadae2e6d8bab6241617a386aed9513207b8a')
+ '30e15715cdc90639d7cbd34e76bbadae2e6d8bab6241617a386aed9513207b8a'
+ 'eeeafd1a74c8c43c369569c8ea1dbae8fd9fcfdf0e6609471c030e9738b97ce5')
pkgver() {
cd sage
@@ -92,8 +94,6 @@ prepare(){
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
# Fix deprecation warnings on autocompletion with jedi 0.16
@@ -106,6 +106,10 @@ prepare(){
patch -p1 -i ../sagemath-singular-4.1.2.patch
# Fix SIGFPE crashes with ecl 16.1.3 https://trac.sagemath.org/ticket/22191
patch -p1 -i ../sagemath-ecl-sigfpe.patch
+# Fix doc build with sphinx 3 https://trac.sagemath.org/ticket/28856
+ patch -p1 -i ../sagemath-sphinx-3.patch
+# Fix warnings with matplotlib 3.2 https://trac.sagemath.org/ticket/29547
+ patch -p1 -i ../sagemath-matplotlib-3.2.patch
sed -e 's|sage-python23|python|' -i src/bin/*
sed -e 's|$SAGE_PYTHON3|yes|' -i src/bin/sage
diff --git a/sagemath-matplotlib-3.2.patch b/sagemath-matplotlib-3.2.patch
index c8f542ca5bd5..97baa4ea92aa 100644
--- a/sagemath-matplotlib-3.2.patch
+++ b/sagemath-matplotlib-3.2.patch
@@ -1,18 +1,35 @@
-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)
+diff --git a/src/sage/combinat/root_system/root_lattice_realizations.py b/src/sage/combinat/root_system/root_lattice_realizations.py
+index f55c24f..16d3ca5 100644
+--- a/src/sage/combinat/root_system/root_lattice_realizations.py
++++ b/src/sage/combinat/root_system/root_lattice_realizations.py
+@@ -3131,8 +3131,8 @@ class RootLatticeRealizations(Category_over_base_ring):
+ sage: L = RootSystem(['A',2]).ambient_space()
+ sage: C = crystals.Tableaux(['A',2], shape=[2,1])
+- sage: L.plot_crystal(C)
+- Graphics object consisting of 16 graphics primitives
++ sage: L.plot_crystal(C, plot_labels='multiplicities')
++ Graphics object consisting of 15 graphics primitives
+ sage: C = crystals.Tableaux(['A',2], shape=[8,4])
+ sage: p = L.plot_crystal(C, plot_labels='circles')
+ sage: p.show(figsize=15)
+diff --git a/src/sage/interacts/test_jupyter.rst b/src/sage/interacts/test_jupyter.rst
+index ed2bcb5..3f307d2 100644
+--- a/src/sage/interacts/test_jupyter.rst
++++ b/src/sage/interacts/test_jupyter.rst
+@@ -281,9 +281,7 @@ Test all interacts from the Sage interact library::
+ Interactive function <function coin at ...> with 2 widgets
+ n: IntSlider(value=1000, description=u'Number of Tosses', max=10000, min=2, step=100)
+ interval: IntRangeSlider(value=(0, 0), description=u'Plotting range (y)', max=1)
+- doctest:...: UserWarning: Attempting to set identical bottom==top results
+- in singular transformations; automatically expanding.
+- bottom=0.0, top=0.0
++ doctest:...: UserWarning: Attempting to set identical bottom == top == 0.0 results in singular transformations; automatically expanding.
+
+ Test matrix control (see :trac:`27735`)::
--@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/src/sage/plot/colors.py b/src/sage/plot/colors.py
-index 1860b6c948..af6fc7ec64 100644
+index 1860b6c..da3c9c3 100644
--- a/src/sage/plot/colors.py
+++ b/src/sage/plot/colors.py
@@ -20,7 +20,7 @@ comprises the "official" W3C CSS3_ / SVG_ colors.
@@ -47,7 +64,7 @@ index 1860b6c948..af6fc7ec64 100644
0
sage: maps.load_maps()
- sage: len(maps.maps)>130
-+ sage: len(maps.maps)>65
++ sage: len(maps.maps)>60
True
"""
global cm
@@ -56,7 +73,48 @@ index 1860b6c948..af6fc7ec64 100644
sage: from sage.plot.colors import Colormaps
sage: maps = Colormaps()
- sage: len(maps)>130
-+ sage: len(maps)>65
++ sage: len(maps)>60
True
"""
self.load_maps()
+diff --git a/src/sage/plot/contour_plot.py b/src/sage/plot/contour_plot.py
+index a7533fa..12a2b1f 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/src/sage/plot/multigraphics.py b/src/sage/plot/multigraphics.py
+index 3135ceb..184a97c 100644
+--- a/src/sage/plot/multigraphics.py
++++ b/src/sage/plot/multigraphics.py
+@@ -1295,15 +1295,15 @@ class GraphicsArray(MultiGraphics):
+ sage: g2 = circle((0,1), 1.)
+ sage: G = graphics_array([g1, g2])
+ sage: G.position(0) # tol 1.0e-13
+- (0.028906249999999998,
+- 0.038541666666666696,
+- 0.45390624999999996,
+- 0.9229166666666667)
++ (0.023437500000000003,
++ 0.03415488992713045,
++ 0.4627803348994754,
++ 0.9345951100728696)
+ sage: G.position(1) # tol 1.0e-13
+- (0.5171874999999999,
+- 0.038541666666666696,
+- 0.45390624999999996,
+- 0.9229166666666667)
++ (0.5136230468749999,
++ 0.19293222169724827,
++ 0.46278033489947534,
++ 0.617040446532634)
+
+ """
+ if not self._positions:
diff --git a/sagemath-no-dict-sorting.patch b/sagemath-no-dict-sorting.patch
index d0b06bee6dcc..b5bfecfd1b64 100644
--- a/sagemath-no-dict-sorting.patch
+++ b/sagemath-no-dict-sorting.patch
@@ -390,7 +390,7 @@ index cc2b504296..119d5e37d3 100644
TESTS::
diff --git a/src/sage/categories/finite_dimensional_algebras_with_basis.py b/src/sage/categories/finite_dimensional_algebras_with_basis.py
-index 7b14ee25c1..f4a34aace0 100644
+index 754d26276e..ec51907106 100644
--- a/src/sage/categories/finite_dimensional_algebras_with_basis.py
+++ b/src/sage/categories/finite_dimensional_algebras_with_basis.py
@@ -1276,9 +1276,9 @@ class FiniteDimensionalAlgebrasWithBasis(CategoryWithAxiom_over_base_ring):
@@ -421,7 +421,7 @@ index 91598d3cd4..5d04074012 100644
'_repr_type_str': None}
"""
diff --git a/src/sage/categories/morphism.pyx b/src/sage/categories/morphism.pyx
-index 391422bdf5..ef824b9777 100644
+index dec8b00b74..9322833836 100644
--- a/src/sage/categories/morphism.pyx
+++ b/src/sage/categories/morphism.pyx
@@ -601,11 +601,11 @@ cdef class SetMorphism(Morphism):
@@ -550,7 +550,7 @@ index dc27b10920..2fefa65d8c 100644
(2*a + 2, 2*a + 2): (2*a + 2, 2*a + 2, 0)}
"""
diff --git a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py
-index fcb53e3ac3..b1d988632d 100644
+index aec20b0687..7483c67e0b 100644
--- a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py
+++ b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py
@@ -2735,119 +2735,119 @@ class ClusterSeed(SageObject):
@@ -2091,10 +2091,10 @@ index 94e2928525..cb461c07f8 100644
return self._orig_args
diff --git a/src/sage/geometry/polyhedron/base.py b/src/sage/geometry/polyhedron/base.py
-index ef3ad4d644..b83588c249 100644
+index d8609bdfe4..4f07456b3e 100644
--- a/src/sage/geometry/polyhedron/base.py
+++ b/src/sage/geometry/polyhedron/base.py
-@@ -6063,20 +6063,20 @@ class Polyhedron_base(Element):
+@@ -6126,20 +6126,20 @@ class Polyhedron_base(Element):
sage: P = polytopes.twenty_four_cell()
sage: P.flag_f_vector()
{(-1,): 1,
@@ -2123,7 +2123,7 @@ index ef3ad4d644..b83588c249 100644
(3,): 24,
(4,): 1}
-@@ -6106,18 +6106,18 @@ class Polyhedron_base(Element):
+@@ -6169,18 +6169,18 @@ class Polyhedron_base(Element):
sage: P = (Polyhedron(lines=[[1]]) * polytopes.cross_polytope(3))
sage: P.flag_f_vector()
{(-1,): 1,
@@ -2147,7 +2147,7 @@ index ef3ad4d644..b83588c249 100644
(2,): 12,
(3,): 8,
4: 1}
-@@ -6157,22 +6157,22 @@ class Polyhedron_base(Element):
+@@ -6220,22 +6220,22 @@ class Polyhedron_base(Element):
sage: polytopes.hypercube(4)._flag_f_vector()
{(-1,): 1,
@@ -2238,10 +2238,10 @@ index 969c9f86db..25843ea25a 100644
poly = self.face_lattice().flag_f_polynomial()
variables = poly.variables()
diff --git a/src/sage/geometry/polyhedron/ppl_lattice_polytope.py b/src/sage/geometry/polyhedron/ppl_lattice_polytope.py
-index 4281de7bf0..8bc045a34b 100644
+index 4287f9ed56..78d30d8f75 100644
--- a/src/sage/geometry/polyhedron/ppl_lattice_polytope.py
+++ b/src/sage/geometry/polyhedron/ppl_lattice_polytope.py
-@@ -1231,15 +1231,15 @@ class LatticePolytope_PPL_class(C_Polyhedron):
+@@ -1229,15 +1229,15 @@ class LatticePolytope_PPL_class(C_Polyhedron):
sage: polygon.embed_in_reflexive_polytope('polytope')
A 2-dimensional lattice polytope in ZZ^2 with 3 vertices
sage: polygon.embed_in_reflexive_polytope('points')
@@ -2265,7 +2265,7 @@ index 4281de7bf0..8bc045a34b 100644
sage: LatticePolytope_PPL((0,0), (4,0), (0,4)).embed_in_reflexive_polytope()
Traceback (most recent call last):
diff --git a/src/sage/geometry/triangulation/element.py b/src/sage/geometry/triangulation/element.py
-index 6f8222d07c..1c94998e15 100644
+index ba053e7139..d354b5c19b 100644
--- a/src/sage/geometry/triangulation/element.py
+++ b/src/sage/geometry/triangulation/element.py
@@ -605,32 +605,32 @@ class Triangulation(Element):
@@ -2273,14 +2273,14 @@ index 6f8222d07c..1c94998e15 100644
sage: triangulation = polytopes.hypercube(2).triangulate(engine='internal')
sage: triangulation._boundary_simplex_dictionary()
- {(0, 1): ((0, 1, 3),),
-- (0, 2): ((0, 2, 3),),
-+ {(1, 3): ((0, 1, 3),),
- (0, 3): ((0, 1, 3), (0, 2, 3)),
-- (1, 3): ((0, 1, 3),),
-- (2, 3): ((0, 2, 3),)}
++ {(1, 3): ((0, 1, 3), (1, 2, 3)),
+ (0, 3): ((0, 1, 3),),
+- (1, 2): ((1, 2, 3),),
+- (1, 3): ((0, 1, 3), (1, 2, 3)),
+- (2, 3): ((1, 2, 3),)}
+ (0, 1): ((0, 1, 3),),
-+ (2, 3): ((0, 2, 3),),
-+ (0, 2): ((0, 2, 3),)}
++ (2, 3): ((1, 2, 3),),
++ (1, 2): ((1, 2, 3),)}
sage: triangulation = polytopes.cube().triangulate(engine='internal')
sage: triangulation._boundary_simplex_dictionary()
@@ -2318,6 +2318,21 @@ index 6f8222d07c..1c94998e15 100644
"""
result = dict()
for simplex in self:
+@@ -750,12 +750,10 @@ class Triangulation(Element):
+ (-1, 0, 0, -1),
+ ( 0, 1, 0, -1),
+ ( 0, -1, 0, 1)
+- in Ambient free module of rank 4
+- over the principal ideal domain Integer Ring
++ in Ambient free module of rank 4 over the principal ideal domain Integer Ring
+ sage: N.dual().rays()
+ (1, -1, 1, -1)
+- in Ambient free module of rank 4
+- over the principal ideal domain Integer Ring
++ in Ambient free module of rank 4 over the principal ideal domain Integer Ring
+
+ TESTS::
+
diff --git a/src/sage/graphs/base/boost_graph.pyx b/src/sage/graphs/base/boost_graph.pyx
index 6ba0a44c9a..c50374c542 100644
--- a/src/sage/graphs/base/boost_graph.pyx
@@ -2451,10 +2466,10 @@ index 802d4a8f6e..aa5efb8dac 100644
TESTS:
diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py
-index c369e3723a..50edd704b2 100644
+index 23ed1da506..bd9733a9b2 100644
--- a/src/sage/graphs/generic_graph.py
+++ b/src/sage/graphs/generic_graph.py
-@@ -5211,7 +5211,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -5209,7 +5209,7 @@ class GenericGraph(GenericGraph_pyx):
This method is deprecated since Sage-4.4.1.alpha2. Please use instead:
sage: g.layout(layout = "planar", save_pos = True)
@@ -2463,7 +2478,7 @@ index c369e3723a..50edd704b2 100644
"""
deprecation(24494, 'This method is replaced by the method layout. '
'Please use layout(layout="planar", save_pos=True) '
-@@ -5265,16 +5265,16 @@ class GenericGraph(GenericGraph_pyx):
+@@ -5263,16 +5263,16 @@ class GenericGraph(GenericGraph_pyx):
sage: g = graphs.PathGraph(10)
sage: g.layout(layout='planar', save_pos=True, test=True)
@@ -2485,7 +2500,7 @@ index c369e3723a..50edd704b2 100644
sage: g = graphs.BalancedTree(3, 4)
sage: pos = g.layout(layout='planar', save_pos=True, test=True)
sage: pos[0]
-@@ -5283,7 +5283,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -5281,7 +5281,7 @@ class GenericGraph(GenericGraph_pyx):
[3, 64]
sage: g = graphs.CycleGraph(7)
sage: g.layout(layout='planar', save_pos=True, test=True)
@@ -2494,7 +2509,7 @@ index c369e3723a..50edd704b2 100644
sage: g = graphs.CompleteGraph(5)
sage: g.layout(layout='planar', save_pos=True, test=True, set_embedding=True)
Traceback (most recent call last):
-@@ -5294,9 +5294,9 @@ class GenericGraph(GenericGraph_pyx):
+@@ -5292,9 +5292,9 @@ class GenericGraph(GenericGraph_pyx):
sage: g = graphs.CompleteGraph(4)
sage: g.layout(layout='planar', external_face=(0,1))
@@ -2506,7 +2521,7 @@ index c369e3723a..50edd704b2 100644
TESTS::
-@@ -16514,7 +16514,26 @@ class GenericGraph(GenericGraph_pyx):
+@@ -16512,7 +16512,26 @@ class GenericGraph(GenericGraph_pyx):
sage: D = graphs.DodecahedralGraph()
sage: D.shortest_paths(0)
@@ -2534,7 +2549,7 @@ index c369e3723a..50edd704b2 100644
All these paths are obviously induced graphs::
-@@ -16524,7 +16543,16 @@ class GenericGraph(GenericGraph_pyx):
+@@ -16522,7 +16541,16 @@ class GenericGraph(GenericGraph_pyx):
::
sage: D.shortest_paths(0, cutoff=2)
@@ -2552,7 +2567,7 @@ index c369e3723a..50edd704b2 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 +16562,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -16532,7 +16560,7 @@ class GenericGraph(GenericGraph_pyx):
sage: D = DiGraph([(0,1,1),(1,2,3),(0,2,5)])
sage: D.shortest_paths(0)
@@ -2561,7 +2576,7 @@ index c369e3723a..50edd704b2 100644
sage: D.shortest_paths(0, by_weight=True)
{0: [0], 1: [0, 1], 2: [0, 1, 2]}
-@@ -16783,7 +16811,26 @@ class GenericGraph(GenericGraph_pyx):
+@@ -16781,7 +16809,26 @@ class GenericGraph(GenericGraph_pyx):
sage: D = graphs.DodecahedralGraph()
sage: D.shortest_path_lengths(0)
@@ -2589,7 +2604,7 @@ index c369e3723a..50edd704b2 100644
Weighted case::
-@@ -18909,18 +18956,18 @@ class GenericGraph(GenericGraph_pyx):
+@@ -18900,18 +18947,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
@@ -2612,7 +2627,7 @@ index c369e3723a..50edd704b2 100644
TESTS:
-@@ -19065,8 +19112,8 @@ class GenericGraph(GenericGraph_pyx):
+@@ -19056,8 +19103,8 @@ class GenericGraph(GenericGraph_pyx):
sage: g.layout(layout="acyclic_dummy", save_pos=True)
{('0', 0): [0.3..., 0],
@@ -2622,7 +2637,7 @@ index c369e3723a..50edd704b2 100644
('1', 1): [0.6..., 1]}
sage: D3 = g.layout(dim=3); D3 # random
-@@ -19202,10 +19249,10 @@ class GenericGraph(GenericGraph_pyx):
+@@ -19193,10 +19240,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],
@@ -2635,7 +2650,7 @@ index c369e3723a..50edd704b2 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)})
-@@ -19389,13 +19436,13 @@ class GenericGraph(GenericGraph_pyx):
+@@ -19380,13 +19427,13 @@ class GenericGraph(GenericGraph_pyx):
sage: G = graphs.BalancedTree(2, 2)
sage: G.layout_tree(tree_root=0)
@@ -2654,7 +2669,7 @@ index c369e3723a..50edd704b2 100644
sage: G = graphs.BalancedTree(2, 4)
sage: G.plot(layout="tree", tree_root=0, tree_orientation="up")
-@@ -19407,15 +19454,15 @@ class GenericGraph(GenericGraph_pyx):
+@@ -19398,15 +19445,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()
@@ -2677,7 +2692,7 @@ index c369e3723a..50edd704b2 100644
sage: T.plot(layout="tree", tree_root=3)
Graphics object consisting of 18 graphics primitives
-@@ -23574,7 +23621,8 @@ class GenericGraph(GenericGraph_pyx):
+@@ -23560,7 +23607,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)
@@ -2687,7 +2702,7 @@ index c369e3723a..50edd704b2 100644
2: 0.000000000000000,
3: 0.000000000000000,
4: 16.7319819819820,
-@@ -23583,7 +23631,6 @@ class GenericGraph(GenericGraph_pyx):
+@@ -23569,7 +23617,6 @@ class GenericGraph(GenericGraph_pyx):
7: 0.000000000000000,
8: 18.6846846846847,
9: 0.000000000000000,
@@ -2695,7 +2710,7 @@ index c369e3723a..50edd704b2 100644
11: 202.778914049184}
-@@ -23603,7 +23650,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -23589,7 +23636,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)
@@ -2705,7 +2720,7 @@ index c369e3723a..50edd704b2 100644
"""
n = self.order()
diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py
-index e76003f23c..d1ec1a9e05 100644
+index c46dde0a40..6043454e5f 100644
--- a/src/sage/graphs/graph.py
+++ b/src/sage/graphs/graph.py
@@ -3820,7 +3820,7 @@ class Graph(GenericGraph):
@@ -3757,7 +3772,7 @@ index ad2dba4fbc..1cd1fa7ba4 100644
"""
return self._nproc
diff --git a/src/sage/plot/graphics.py b/src/sage/plot/graphics.py
-index 931661d26c..cfd152e992 100644
+index 8a1917dc5a..8197b189d3 100644
--- a/src/sage/plot/graphics.py
+++ b/src/sage/plot/graphics.py
@@ -1297,8 +1297,8 @@ class Graphics(WithEqualityById, SageObject):
@@ -4501,21 +4516,27 @@ index ce311014d3..799cd00aa7 100644
gens = self.gens()
names = self.variable_names()
diff --git a/src/sage/rings/ring_extension.pyx b/src/sage/rings/ring_extension.pyx
-index 754b8c2ca6..291ae46fe6 100644
+index 754b8c2ca6..eef5fe247a 100644
--- a/src/sage/rings/ring_extension.pyx
+++ b/src/sage/rings/ring_extension.pyx
-@@ -379,8 +379,8 @@ class RingExtensionFactory(UniqueFactory):
+@@ -377,10 +377,12 @@ class RingExtensionFactory(UniqueFactory):
+ ((Ring morphism:
+ From: Integer Ring
To: Rational Field
- Defn: 1 |--> 1, (), ()),
- {'constructors': [(<type 'sage.rings.ring_extension.RingExtension_generic'>,
+- Defn: 1 |--> 1, (), ()),
+- {'constructors': [(<type 'sage.rings.ring_extension.RingExtension_generic'>,
- {'is_backend_exposed': True,
- 'print_options': {'print_elements_as': None, 'print_parent_as': None}})]})
++ Defn: 1 |--> 1,
++ (),
++ ()),
++ {'constructors': [(<class 'sage.rings.ring_extension.RingExtension_generic'>,
+ {'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',))
((Ring morphism:
-@@ -388,7 +388,7 @@ class RingExtensionFactory(UniqueFactory):
+@@ -388,7 +390,7 @@ class RingExtensionFactory(UniqueFactory):
To: Finite Field in z4 of size 5^4
Defn: z2 |--> z4^3 + z4^2 + z4 + 3, (z4,), ('a',)),
{'constructors': [(<type 'sage.rings.ring_extension.RingExtensionWithGen'>,
diff --git a/sagemath-sphinx-3.patch b/sagemath-sphinx-3.patch
new file mode 100644
index 000000000000..3ff48e16bc2b
--- /dev/null
+++ b/sagemath-sphinx-3.patch
@@ -0,0 +1,272 @@
+diff --git a/src/doc/en/thematic_tutorials/structures_in_coding_theory.rst b/src/doc/en/thematic_tutorials/structures_in_coding_theory.rst
+index 13f1a83..4726bce 100644
+--- a/src/doc/en/thematic_tutorials/structures_in_coding_theory.rst
++++ b/src/doc/en/thematic_tutorials/structures_in_coding_theory.rst
+@@ -721,8 +721,6 @@ derive from the one that follows.
+
+ .. CODE-BLOCK:: python
+
+- :class:`sage.coding.repetition_code.BinaryRepetitionCode <sage.coding.repetition_code.BinaryRepetitionCode>`
+- #the line above creates a link to the class in the html documentation of coding theory library
+ from sage.coding.repetition_code import BinaryRepetitionCode
+
+ ``encoders_catalog.py`` (continued):
+diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py
+index a68d673..ae644cf 100644
+--- a/src/sage/combinat/permutation.py
++++ b/src/sage/combinat/permutation.py
+@@ -415,9 +415,6 @@ class Permutation(CombinatorialElement):
+ []
+ sage: Permutation( [[], []] )
+ []
+-
+- .. automethod:: Permutation.left_action_product
+- .. automethod:: Permutation.right_action_product
+ """
+ @staticmethod
+ def __classcall_private__(cls, l, check_input = True):
+diff --git a/src/sage/docs/conf.py b/src/sage/docs/conf.py
+index a1212f5..c4941f0 100644
+--- a/src/sage/docs/conf.py
++++ b/src/sage/docs/conf.py
+@@ -8,6 +8,7 @@ from docutils import nodes
+ from docutils.transforms import Transform
+ from sphinx.ext.doctest import blankline_re
+ from sphinx import highlighting
++import sphinx.ext.intersphinx as intersphinx
+ from IPython.lib.lexers import IPythonConsoleLexer, IPyLexer
+
+ # If your extensions are in another directory, add it here.
+@@ -173,13 +174,8 @@ todo_include_todos = True
+
+ # Cross-links to other project's online documentation.
+ python_version = sys.version_info.major
+-intersphinx_mapping = {
+- 'python': ('https://docs.python.org/',
+- os.path.join(SAGE_DOC_SRC, "common",
+- "python{}.inv".format(python_version))),
+- 'pplpy': (PPLPY_DOCS, None)}
+
+-def set_intersphinx_mappings(app):
++def set_intersphinx_mappings(app, config):
+ """
+ Add precompiled inventory (the objects.inv)
+ """
+@@ -190,7 +186,11 @@ def set_intersphinx_mappings(app):
+ app.config.intersphinx_mapping = {}
+ return
+
+- app.config.intersphinx_mapping = intersphinx_mapping
++ app.config.intersphinx_mapping = {
++ 'python': ('https://docs.python.org/',
++ os.path.join(SAGE_DOC_SRC, "common",
++ "python{}.inv".format(python_version))),
++ 'pplpy': (PPLPY_DOCS, None)}
+
+ # Add master intersphinx mapping
+ dst = os.path.join(invpath, 'objects.inv')
+@@ -205,6 +205,7 @@ def set_intersphinx_mappings(app):
+ dst = os.path.join(invpath, directory, 'objects.inv')
+ app.config.intersphinx_mapping[src] = dst
+
++ intersphinx.normalize_intersphinx_mapping(app, config)
+
+ # By default document are not master.
+ multidocs_is_master = True
+@@ -669,11 +670,11 @@ def call_intersphinx(app, env, node, contnode):
+ sage: for line in open(thematic_index).readlines(): # optional - dochtml
+ ....: if "padics" in line:
+ ....: _ = sys.stdout.write(line)
+- <li><a class="reference external" href="../reference/padics/sage/rings/padics/tutorial.html#sage-rings-padics-tutorial" title="(in Sage... Reference Manual: p-Adics v...)"><span>Introduction to the p-adics</span></a></li>
++ <li><p><a class="reference external" href="../reference/padics/sage/rings/padics/tutorial.html#sage-rings-padics-tutorial" title="(in Sage... Reference Manual: p-Adics v...)"><span>Introduction to the p-adics</span></a></p></li>
+ """
+ debug_inf(app, "???? Trying intersphinx for %s" % node['reftarget'])
+ builder = app.builder
+- res = sphinx.ext.intersphinx.missing_reference(
++ res = intersphinx.missing_reference(
+ app, env, node, contnode)
+ if res:
+ # Replace absolute links to $SAGE_DOC by relative links: this
+@@ -856,11 +857,10 @@ def setup(app):
+ if app.srcdir.startswith(SAGE_DOC_SRC):
+ app.add_config_value('intersphinx_mapping', {}, False)
+ app.add_config_value('intersphinx_cache_limit', 5, False)
++ app.connect('config-inited', set_intersphinx_mappings)
++ app.connect('builder-inited', intersphinx.load_mappings)
+ # We do *not* fully initialize intersphinx since we call it by hand
+ # in find_sage_dangling_links.
+ # app.connect('missing-reference', missing_reference)
+ app.connect('missing-reference', find_sage_dangling_links)
+- import sphinx.ext.intersphinx
+- app.connect('builder-inited', set_intersphinx_mappings)
+- app.connect('builder-inited', sphinx.ext.intersphinx.load_mappings)
+ app.connect('builder-inited', nitpick_patch_config)
+diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py
+index 85ee764..795dfd3 100644
+--- a/src/sage/misc/sagedoc.py
++++ b/src/sage/misc/sagedoc.py
+@@ -24,7 +24,7 @@ see :trac:`12849`::
+ ....: for line in fobj:
+ ....: if "#sage.symbolic.expression.Expression.numerical_approx" in line:
+ ....: print(line)
+- <code class="descname">numerical_approx</code><span class="sig-paren">(</span><em>prec=None</em>, <em>digits=None</em>, <em>algorithm=None</em><span class="sig-paren">)</span>...
++ <code class="sig-name descname">numerical_approx</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">prec</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">digits</span><span class="o">=</span><span class="default_value">None</span></em>, <em class="sig-param"><span class="n">algorithm</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span>...
+
+ Check that sphinx is not imported at Sage start-up::
+
+diff --git a/src/sage_setup/docbuild/__init__.py b/src/sage_setup/docbuild/__init__.py
+index 128117b..5aad13c 100644
+--- a/src/sage_setup/docbuild/__init__.py
++++ b/src/sage_setup/docbuild/__init__.py
+@@ -817,9 +817,13 @@ class ReferenceSubBuilder(DocBuilder):
+
+ env_pickle = os.path.join(self._doctrees_dir(), 'environment.pickle')
+ try:
+- env = BuildEnvironment.frompickle(env_pickle, FakeApp(self.dir))
+- logger.debug("Opened Sphinx environment: %s", env_pickle)
+- return env
++ with open(env_pickle, 'rb') as f:
++ import pickle
++ env = pickle.load(f)
++ env.app = FakeApp(self.dir)
++ env.config.values = env.app.config.values
++ logger.debug("Opened Sphinx environment: %s", env_pickle)
++ return env
+ except IOError as err:
+ logger.debug("Failed to open Sphinx environment: %s", err)
+
+diff --git a/src/sage_setup/docbuild/ext/multidocs.py b/src/sage_setup/docbuild/ext/multidocs.py
+index 71a08cd..ffed722 100644
+--- a/src/sage_setup/docbuild/ext/multidocs.py
++++ b/src/sage_setup/docbuild/ext/multidocs.py
+@@ -52,27 +52,29 @@ def merge_environment(app, env):
+ docenv = get_env(app, curdoc)
+ if docenv is not None:
+ fixpath = lambda path: os.path.join(curdoc, path)
++ todos = docenv.domaindata['todo'].get('todos', dict())
++ citations = docenv.domaindata['citation'].get('citations', dict())
++ indexentries = docenv.domaindata['index'].get('entries', dict())
+ logger.info(" %s todos, %s index, %s citations"%(
+- len(docenv.todo_all_todos),
+- len(docenv.indexentries),
+- len(docenv.domaindata["std"]["citations"])
++ sum(len(t) for t in todos.values()),
++ len(indexentries),
++ len(citations)
+ ), nonl=1)
+
+ # merge titles
+ for t in docenv.titles:
+ env.titles[fixpath(t)] = docenv.titles[t]
+ # merge the todo links
+- for dct in docenv.todo_all_todos:
+- dct['docname'] = fixpath(dct['docname'])
+- env.todo_all_todos += docenv.todo_all_todos
++ for dct in todos:
++ env.domaindata['todo']['todos'][fixpath(dct)] = todos[dct]
+ # merge the html index links
+ newindex = {}
+- for ind in docenv.indexentries:
++ for ind in indexentries:
+ if ind.startswith('sage/'):
+- newindex[fixpath(ind)] = docenv.indexentries[ind]
++ newindex[fixpath(ind)] = indexentries[ind]
+ else:
+- newindex[ind] = docenv.indexentries[ind]
+- env.indexentries.update(newindex)
++ newindex[ind] = indexentries[ind]
++ env.domaindata['index']['entries'].update(newindex)
+ # merge the all_docs links, needed by the js index
+ newalldoc = {}
+ for ind in docenv.all_docs:
+@@ -86,24 +88,23 @@ def merge_environment(app, env):
+ env.metadata[ind] = md
+ # merge the citations
+ newcite = {}
+- citations = docenv.domaindata["std"]["citations"]
+- for ind, (path, tag, lineno) in six.iteritems(docenv.domaindata["std"]["citations"]):
++ for ind, (path, tag, lineno) in six.iteritems(citations):
+ # TODO: Warn on conflicts
+ newcite[ind] = (fixpath(path), tag, lineno)
+- env.domaindata["std"]["citations"].update(newcite)
++ env.domaindata['citation']['citations'].update(newcite)
+ # merge the py:module indexes
+ newmodules = {}
+- for ind,(modpath,v1,v2,v3) in (
++ for ind,(modpath,v1,v2,v3,v4) in (
+ six.iteritems(docenv.domaindata['py']['modules'])):
+- newmodules[ind] = (fixpath(modpath),v1,v2,v3)
++ newmodules[ind] = (fixpath(modpath),v1,v2,v3,v4)
+ env.domaindata['py']['modules'].update(newmodules)
+ logger.info(", %s modules"%(len(newmodules)))
+ logger.info('... done (%s todos, %s index, %s citations, %s modules)'%(
+- len(env.todo_all_todos),
+- len(env.indexentries),
+- len(env.domaindata["std"]["citations"]),
++ sum(len(t) for t in env.domaindata['todo']['todos'].values()),
++ len(env.domaindata['index']['entries']),
++ len(env.domaindata['citation']['citations']),
+ len(env.domaindata['py']['modules'])))
+- write_citations(app, env.domaindata["std"]["citations"])
++ write_citations(app, env.domaindata['citation']['citations'])
+
+
+ def get_env(app, curdoc):
+@@ -253,7 +254,7 @@ def fetch_citation(app, env):
+ with open(filename, 'rb') as f:
+ cache = cPickle.load(f)
+ logger.info("done (%s citations)."%len(cache))
+- cite = env.domaindata["std"]["citations"]
++ cite = env.domaindata['citation'].get('citations', dict())
+ for ind, (path, tag, lineno) in six.iteritems(cache):
+ if ind not in cite: # don't override local citation
+ cite[ind] = (os.path.join("..", path), tag, lineno)
+diff --git a/src/sage_setup/docbuild/ext/sage_autodoc.py b/src/sage_setup/docbuild/ext/sage_autodoc.py
+index bba274f..179fc25 100644
+--- a/src/sage_setup/docbuild/ext/sage_autodoc.py
++++ b/src/sage_setup/docbuild/ext/sage_autodoc.py
+@@ -35,14 +35,15 @@ import sys
+ from docutils.statemachine import ViewList
+
+ import sphinx
+-from sphinx.ext.autodoc.importer import mock, import_object, get_object_members
++from sphinx.ext.autodoc import mock
++from sphinx.ext.autodoc.importer import import_object, get_object_members, get_module_members
+ from sphinx.locale import _, __
+ from sphinx.pycode import ModuleAnalyzer
+ from sphinx.errors import PycodeError
+ from sphinx.util import logging
+ from sphinx.util import rpartition, force_decode
+ from sphinx.util.docstrings import prepare_docstring
+-from sphinx.util.inspect import isdescriptor, safe_getmembers, \
++from sphinx.util.inspect import isdescriptor, \
+ safe_getattr, object_description, is_builtin_class_method, \
+ isenumattribute, isclassmethod, isstaticmethod, getdoc
+
+@@ -536,7 +537,7 @@ class Documenter(object):
+
+ # add content from docstrings
+ if not no_docstring:
+- encoding = self.analyzer and self.analyzer.encoding
++ encoding = self.analyzer and self.analyzer._encoding
+ docstrings = self.get_doc(encoding)
+ if not docstrings:
+ # append at least a dummy docstring, so that the event
+@@ -882,7 +883,7 @@ class ModuleDocumenter(Documenter):
+ if not hasattr(self.object, '__all__'):
+ # for implicit module members, check __module__ to avoid
+ # documenting imported objects
+- return True, safe_getmembers(self.object)
++ return True, get_module_members(self.object)
+ else:
+ memberlist = self.object.__all__
+ # Sometimes __all__ is broken...
+@@ -893,7 +894,7 @@ class ModuleDocumenter(Documenter):
+ '(in module %s) -- ignoring __all__' %
+ (memberlist, self.fullname))
+ # fall back to all members
+- return True, safe_getmembers(self.object)
++ return True, get_module_members(self.object)
+ else:
+ memberlist = self.options.members or []
+ ret = []