summarylogtreecommitdiffstats
path: root/sagemath-ipython7.patch
diff options
context:
space:
mode:
authorAntonio Rojas2020-01-10 19:43:28 +0000
committerAntonio Rojas2020-01-10 19:43:28 +0000
commit051abec7a32c12ea1253d21d252cc80e95c110a8 (patch)
tree3641ea91e5447902b77b8b4039edf9b9b44b10a9 /sagemath-ipython7.patch
parent2735723f0941c7b55748e9413329cce77fd20e62 (diff)
downloadaur-051abec7a32c12ea1253d21d252cc80e95c110a8.tar.gz
Rebase patches, add numerical backends optdepends
Diffstat (limited to 'sagemath-ipython7.patch')
-rw-r--r--sagemath-ipython7.patch200
1 files changed, 24 insertions, 176 deletions
diff --git a/sagemath-ipython7.patch b/sagemath-ipython7.patch
index 5d6e817348f9..09830f221529 100644
--- a/sagemath-ipython7.patch
+++ b/sagemath-ipython7.patch
@@ -125,19 +125,6 @@ index 95e12d460b..26a238725c 100644
"""
ret = {}
DW = self.parent()
-diff --git a/src/sage/all.py b/src/sage/all.py
-index 1e36169b1b..e18bd9a587 100644
---- a/src/sage/all.py
-+++ b/src/sage/all.py
-@@ -19,7 +19,7 @@ We exclude the dependencies and check to see that there are no others
- except for the known bad apples::
-
- sage: allowed = [
-- ....: 'IPython', 'prompt_toolkit', # sage dependencies
-+ ....: 'IPython', 'prompt_toolkit', 'jedi', # sage dependencies
- ....: 'threading', 'multiprocessing', # doctest dependencies
- ....: '__main__', 'sage.doctest', # doctesting
- ....: 'signal', 'enum', # may appear in Python 3
diff --git a/src/sage/categories/category.py b/src/sage/categories/category.py
index ff6557068b..1cf0bb41a0 100644
--- a/src/sage/categories/category.py
@@ -299,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
-@@ -3847,22 +3847,22 @@ class LinearCodeSyndromeDecoder(Decoder):
+@@ -3843,22 +3843,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),
@@ -334,7 +321,7 @@ index 57ef7fb896..db347b9e2f 100644
TESTS:
-@@ -3876,11 +3876,11 @@ class LinearCodeSyndromeDecoder(Decoder):
+@@ -3872,11 +3872,11 @@ class LinearCodeSyndromeDecoder(Decoder):
sage: D = codes.decoders.LinearCodeSyndromeDecoder(C)
sage: D.syndrome_table()
{(0, 0): (0, 0, 0),
@@ -350,23 +337,6 @@ index 57ef7fb896..db347b9e2f 100644
(2*a + 2, 2*a + 1): (2*a + 2, 2*a + 1, 0),
(2*a + 2, 2*a + 2): (2*a + 2, 2*a + 2, 0)}
"""
-@@ -4035,12 +4035,12 @@ class LinearCodeSyndromeDecoder(Decoder):
- sage: D = codes.decoders.LinearCodeSyndromeDecoder(C)
- sage: D.syndrome_table()
- {(0, 0, 0): (0, 0, 0, 0, 0, 0, 0),
-- (0, 0, 1): (0, 0, 0, 1, 0, 0, 0),
-- (0, 1, 0): (0, 1, 0, 0, 0, 0, 0),
-- (0, 1, 1): (0, 0, 0, 0, 0, 1, 0),
- (1, 0, 0): (1, 0, 0, 0, 0, 0, 0),
-- (1, 0, 1): (0, 0, 0, 0, 1, 0, 0),
-+ (0, 1, 0): (0, 1, 0, 0, 0, 0, 0),
- (1, 1, 0): (0, 0, 1, 0, 0, 0, 0),
-+ (0, 0, 1): (0, 0, 0, 1, 0, 0, 0),
-+ (1, 0, 1): (0, 0, 0, 0, 1, 0, 0),
-+ (0, 1, 1): (0, 0, 0, 0, 0, 1, 0),
- (1, 1, 1): (0, 0, 0, 0, 0, 0, 1)}
- """
- return self._lookup_table
diff --git a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py
index d5c469050a..c0720a828e 100644
--- a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py
@@ -555,76 +525,6 @@ index d5c469050a..c0720a828e 100644
"""
-diff --git a/src/sage/combinat/combinatorial_map.py b/src/sage/combinat/combinatorial_map.py
-index 03075615bd..0be1240a94 100644
---- a/src/sage/combinat/combinatorial_map.py
-+++ b/src/sage/combinat/combinatorial_map.py
-@@ -257,8 +257,8 @@ class CombinatorialMap(object):
- EXAMPLES::
-
- sage: sage.combinat.combinatorial_map.combinatorial_map = sage.combinat.combinatorial_map.combinatorial_map_wrapper
-- sage: import imp
-- sage: _ = imp.reload(sage.combinat.permutation)
-+ sage: import importlib
-+ sage: _ = importlib.reload(sage.combinat.permutation)
- sage: p = Permutation([1,3,2,4])
- sage: p.left_tableau.__repr__()
- 'Combinatorial map: Robinson-Schensted insertion tableau'
-@@ -272,8 +272,8 @@ class CombinatorialMap(object):
- EXAMPLES::
-
- sage: sage.combinat.combinatorial_map.combinatorial_map = sage.combinat.combinatorial_map.combinatorial_map_wrapper
-- sage: import imp
-- sage: _ = imp.reload(sage.combinat.permutation)
-+ sage: import importlib
-+ sage: _ = importlib.reload(sage.combinat.permutation)
- sage: p = Permutation([1,3,2,4])
- sage: cm = p.left_tableau; cm
- Combinatorial map: Robinson-Schensted insertion tableau
-@@ -293,8 +293,8 @@ class CombinatorialMap(object):
- EXAMPLES::
-
- sage: sage.combinat.combinatorial_map.combinatorial_map = sage.combinat.combinatorial_map.combinatorial_map_wrapper
-- sage: import imp
-- sage: _ = imp.reload(sage.combinat.permutation)
-+ sage: import importlib
-+ sage: _ = importlib.reload(sage.combinat.permutation)
- sage: p = Permutation([1,3,2,4])
- sage: p.left_tableau #indirect doctest
- Combinatorial map: Robinson-Schensted insertion tableau
-@@ -309,8 +309,8 @@ class CombinatorialMap(object):
- EXAMPLES::
-
- sage: sage.combinat.combinatorial_map.combinatorial_map = sage.combinat.combinatorial_map.combinatorial_map_wrapper
-- sage: import imp
-- sage: _ = imp.reload(sage.combinat.permutation)
-+ sage: import importlib
-+ sage: _ = importlib.reload(sage.combinat.permutation)
- sage: p = Permutation([1,3,2,4])
- sage: cm = type(p).left_tableau; cm
- Combinatorial map: Robinson-Schensted insertion tableau
-@@ -335,8 +335,8 @@ class CombinatorialMap(object):
- EXAMPLES::
-
- sage: sage.combinat.combinatorial_map.combinatorial_map = sage.combinat.combinatorial_map.combinatorial_map_wrapper
-- sage: import imp
-- sage: _ = imp.reload(sage.combinat.permutation)
-+ sage: import importlib
-+ sage: _ = importlib.reload(sage.combinat.permutation)
- sage: from sage.combinat.permutation import Permutation
- sage: pi = Permutation([1,3,2])
- sage: f = pi.reverse
-@@ -400,8 +400,8 @@ def combinatorial_maps_in_class(cls):
- EXAMPLES::
-
- sage: sage.combinat.combinatorial_map.combinatorial_map = sage.combinat.combinatorial_map.combinatorial_map_wrapper
-- sage: import imp
-- sage: _ = imp.reload(sage.combinat.permutation)
-+ sage: import importlib
-+ sage: _ = importlib.reload(sage.combinat.permutation)
- sage: from sage.combinat.combinatorial_map import combinatorial_maps_in_class
- sage: p = Permutation([1,3,2,4])
- sage: cmaps = combinatorial_maps_in_class(p)
diff --git a/src/sage/combinat/crystals/kirillov_reshetikhin.py b/src/sage/combinat/crystals/kirillov_reshetikhin.py
index afcc1fc669..95161c35a6 100644
--- a/src/sage/combinat/crystals/kirillov_reshetikhin.py
@@ -2168,7 +2068,7 @@ diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py
index 8b8c98cb15..6823e13b26 100644
--- a/src/sage/graphs/generic_graph.py
+++ b/src/sage/graphs/generic_graph.py
-@@ -5155,7 +5155,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -5212,7 +5212,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)
@@ -2177,7 +2077,7 @@ index 8b8c98cb15..6823e13b26 100644
"""
deprecation(24494, 'This method is replaced by the method layout. '
'Please use layout(layout="planar", save_pos=True) '
-@@ -5209,16 +5209,16 @@ class GenericGraph(GenericGraph_pyx):
+@@ -5266,16 +5266,16 @@ class GenericGraph(GenericGraph_pyx):
sage: g = graphs.PathGraph(10)
sage: g.layout(layout='planar', save_pos=True, test=True)
@@ -2204,7 +2104,7 @@ index 8b8c98cb15..6823e13b26 100644
sage: g = graphs.BalancedTree(3, 4)
sage: pos = g.layout(layout='planar', save_pos=True, test=True)
sage: pos[0]
-@@ -5227,7 +5227,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -5284,7 +5284,7 @@ class GenericGraph(GenericGraph_pyx):
[93, 14]
sage: g = graphs.CycleGraph(7)
sage: g.layout(layout='planar', save_pos=True, test=True)
@@ -2213,7 +2113,7 @@ index 8b8c98cb15..6823e13b26 100644
sage: g = graphs.CompleteGraph(5)
sage: g.layout(layout='planar', save_pos=True, test=True, set_embedding=True)
Traceback (most recent call last):
-@@ -5238,9 +5238,9 @@ class GenericGraph(GenericGraph_pyx):
+@@ -5295,9 +5295,9 @@ class GenericGraph(GenericGraph_pyx):
sage: g = graphs.CompleteGraph(4)
sage: g.layout(layout='planar', external_face=(0,1))
@@ -2225,7 +2125,7 @@ index 8b8c98cb15..6823e13b26 100644
TESTS::
-@@ -16571,7 +16571,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -16515,7 +16515,7 @@ class GenericGraph(GenericGraph_pyx):
sage: D = graphs.DodecahedralGraph()
sage: D.shortest_paths(0)
@@ -2234,7 +2134,7 @@ index 8b8c98cb15..6823e13b26 100644
All these paths are obviously induced graphs::
-@@ -16581,7 +16581,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -16525,7 +16525,7 @@ class GenericGraph(GenericGraph_pyx):
::
sage: D.shortest_paths(0, cutoff=2)
@@ -2243,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)
-@@ -16591,7 +16591,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -16535,7 +16535,7 @@ class GenericGraph(GenericGraph_pyx):
sage: D = DiGraph([(0,1,1),(1,2,3),(0,2,5)])
sage: D.shortest_paths(0)
@@ -2252,7 +2152,7 @@ index 8b8c98cb15..6823e13b26 100644
sage: D.shortest_paths(0, by_weight=True)
{0: [0], 1: [0, 1], 2: [0, 1, 2]}
-@@ -16840,7 +16840,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -16784,7 +16784,7 @@ class GenericGraph(GenericGraph_pyx):
sage: D = graphs.DodecahedralGraph()
sage: D.shortest_path_lengths(0)
@@ -2261,7 +2161,7 @@ index 8b8c98cb15..6823e13b26 100644
Weighted case::
-@@ -18924,18 +18924,18 @@ class GenericGraph(GenericGraph_pyx):
+@@ -18868,18 +18868,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
@@ -2286,7 +2186,7 @@ index 8b8c98cb15..6823e13b26 100644
TESTS:
-@@ -19080,8 +19080,8 @@ class GenericGraph(GenericGraph_pyx):
+@@ -19024,8 +19024,8 @@ class GenericGraph(GenericGraph_pyx):
sage: g.layout(layout="acyclic_dummy", save_pos=True)
{('0', 0): [0.3..., 0],
@@ -2296,7 +2196,7 @@ index 8b8c98cb15..6823e13b26 100644
('1', 1): [0.6..., 1]}
sage: D3 = g.layout(dim=3); D3 # random
-@@ -19217,10 +19217,10 @@ class GenericGraph(GenericGraph_pyx):
+@@ -19161,10 +19161,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],
@@ -2309,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)})
-@@ -19404,13 +19404,13 @@ class GenericGraph(GenericGraph_pyx):
+@@ -19348,13 +19348,13 @@ class GenericGraph(GenericGraph_pyx):
sage: G = graphs.BalancedTree(2, 2)
sage: G.layout_tree(tree_root=0)
@@ -2328,7 +2228,7 @@ index 8b8c98cb15..6823e13b26 100644
sage: G = graphs.BalancedTree(2, 4)
sage: G.plot(layout="tree", tree_root=0, tree_orientation="up")
-@@ -19422,15 +19422,15 @@ class GenericGraph(GenericGraph_pyx):
+@@ -19366,15 +19366,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()
@@ -2351,7 +2251,7 @@ index 8b8c98cb15..6823e13b26 100644
sage: T.plot(layout="tree", tree_root=3)
Graphics object consisting of 18 graphics primitives
-@@ -23589,7 +23589,8 @@ class GenericGraph(GenericGraph_pyx):
+@@ -23534,7 +23534,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)
@@ -2361,7 +2261,7 @@ index 8b8c98cb15..6823e13b26 100644
2: 0.000000000000000,
3: 0.000000000000000,
4: 16.7319819819820,
-@@ -23598,7 +23598,6 @@ class GenericGraph(GenericGraph_pyx):
+@@ -23543,7 +23543,6 @@ class GenericGraph(GenericGraph_pyx):
7: 0.000000000000000,
8: 18.6846846846847,
9: 0.000000000000000,
@@ -2369,7 +2269,7 @@ index 8b8c98cb15..6823e13b26 100644
11: 202.778914049184}
-@@ -23618,7 +23618,7 @@ class GenericGraph(GenericGraph_pyx):
+@@ -23563,7 +23563,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)
@@ -2382,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
-@@ -3814,7 +3814,7 @@ class Graph(GenericGraph):
+@@ -3817,7 +3817,7 @@ class Graph(GenericGraph):
EXAMPLES::
sage: graphs.CycleGraph(4).bipartite_color()
@@ -2391,7 +2291,7 @@ index bcb9ff1be6..4d0c5ce933 100644
sage: graphs.CycleGraph(5).bipartite_color()
Traceback (most recent call last):
...
-@@ -4097,10 +4097,10 @@ class Graph(GenericGraph):
+@@ -4100,10 +4100,10 @@ class Graph(GenericGraph):
sage: G.plot(partition=P)
Graphics object consisting of 16 graphics primitives
sage: G.coloring(hex_colors=True, algorithm="MILP")
@@ -3375,28 +3275,6 @@ index ad2dba4fbc..1cd1fa7ba4 100644
"""
return self._nproc
-diff --git a/src/sage/parallel/use_fork.py b/src/sage/parallel/use_fork.py
-index 02b5cdb5be..d42f9881f0 100644
---- a/src/sage/parallel/use_fork.py
-+++ b/src/sage/parallel/use_fork.py
-@@ -279,7 +279,7 @@ class p_iter_fork(object):
- sage: F._subprocess(operator.add, tmp_dir(), (1, 2))
- sage: sys.stdout = saved_stdout
- """
-- import imp, os, sys
-+ import importlib, os, sys
- from sage.misc.persist import save
-
- # Make it so all stdout is sent to a file so it can
-@@ -291,7 +291,7 @@ class p_iter_fork(object):
- # pid has changed (forcing a reload of
- # misc).
- import sage.misc.misc
-- imp.reload(sage.misc.misc)
-+ importlib.reload(sage.misc.misc)
-
- # The pexpect interfaces (and objects defined in them) are
- # not valid.
diff --git a/src/sage/plot/graphics.py b/src/sage/plot/graphics.py
index 31131ab220..bc33919835 100644
--- a/src/sage/plot/graphics.py
@@ -3487,24 +3365,7 @@ diff --git a/src/sage/repl/attach.py b/src/sage/repl/attach.py
index 11967fbf96..ccb9c4e0c0 100644
--- a/src/sage/repl/attach.py
+++ b/src/sage/repl/attach.py
-@@ -250,13 +250,13 @@ def reset_load_attach_path():
- sage: reset_load_attach_path(); load_attach_path()
- ['.']
- sage: os.environ['SAGE_LOAD_ATTACH_PATH'] = '/veni/vidi:vici:'
-- sage: import imp
-- sage: imp.reload(sage.repl.attach) # Simulate startup
-+ sage: import importlib
-+ sage: importlib.reload(sage.repl.attach) # Simulate startup
- <module 'sage.repl.attach' from '...'>
- sage: load_attach_path()
- ['.', '/veni/vidi', 'vici']
- sage: del os.environ['SAGE_LOAD_ATTACH_PATH']
-- sage: imp.reload(sage.repl.preparse) # Simulate startup
-+ sage: importlib.reload(sage.repl.preparse) # Simulate startup
- <module 'sage.repl.preparse' from '...'>
- sage: reset_load_attach_path(); load_attach_path()
- ['.']
-@@ -596,12 +596,7 @@ def reload_attached_files_if_modified():
+@@ -597,12 +597,7 @@ def reload_attached_files_if_modified():
basename = os.path.basename(filename)
timestr = time.strftime('%T', mtime)
notice = '### reloading attached file {0} modified at {1} ###'.format(basename, timestr)
@@ -3564,19 +3425,6 @@ index f3863dea6a..1b270b4e8f 100644
These are overridden in IPython in a way that we feel is somewhat
confusing, and we prefer to print them like plain Python which is
-diff --git a/src/sage/repl/interface_magic.py b/src/sage/repl/interface_magic.py
-index a2b9988315..15da4c0bab 100644
---- a/src/sage/repl/interface_magic.py
-+++ b/src/sage/repl/interface_magic.py
-@@ -260,7 +260,7 @@ class InterfaceMagic(object):
- 2
- 120
- sage: shell.run_cell('%%gap foo\n1+1;\n')
-- File "<string>", line unknown
-+ ...File "<string>", line unknown
- SyntaxError: Interface magics have no options, got "foo"
- <BLANKLINE>
- sage: shell.run_cell('%%gap?')
diff --git a/src/sage/repl/interpreter.py b/src/sage/repl/interpreter.py
index e843486e26..780cae264d 100644
--- a/src/sage/repl/interpreter.py
@@ -3914,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
-@@ -1491,13 +1491,13 @@ class GroebnerFan(SageObject):
+@@ -1505,13 +1505,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()
@@ -4034,7 +3882,7 @@ diff --git a/src/sage/rings/polynomial/polynomial_ring.py b/src/sage/rings/polyn
index 5e170e635b..5d5cb2f7ad 100644
--- a/src/sage/rings/polynomial/polynomial_ring.py
+++ b/src/sage/rings/polynomial/polynomial_ring.py
-@@ -1205,7 +1205,7 @@ class PolynomialRing_general(sage.algebras.algebra.Algebra):
+@@ -1206,7 +1206,7 @@ class PolynomialRing_general(sage.algebras.algebra.Algebra):
sage: R.<y,x,a42> = RR[]
sage: R.gens_dict()
@@ -4355,7 +4203,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
-@@ -1818,13 +1818,13 @@ class ProjectiveSpace_finite_field(ProjectiveSpace_field):
+@@ -1817,13 +1817,13 @@ class ProjectiveSpace_finite_field(ProjectiveSpace_field):
sage: P1 = ProjectiveSpace(GF(7),1,'x')
sage: P1.rational_points_dictionary()
{(0 : 1): 0,