diff options
Diffstat (limited to 'sagemath-python-3.8.patch')
-rw-r--r-- | sagemath-python-3.8.patch | 178 |
1 files changed, 155 insertions, 23 deletions
diff --git a/sagemath-python-3.8.patch b/sagemath-python-3.8.patch index eb8dd790cfda..93253065bade 100644 --- a/sagemath-python-3.8.patch +++ b/sagemath-python-3.8.patch @@ -144,6 +144,105 @@ diff --git a/src/sage/combinat/posets/posets.py b/src/sage/combinat/posets/poset index f1463c3184..ee48a3abc2 100644 --- a/src/sage/combinat/posets/posets.py +++ b/src/sage/combinat/posets/posets.py +@@ -7592,60 +7592,60 @@ class FinitePoset(UniqueRepresentation, Parent): + sage: G.edges(sort=True) + [((-1, 0), (0, -13), None), ((-1, 0), (0, 12), None), ((-1, 0), (0, 14), None), ((-1, 0), (0, 16), None), ((0, -13), (1, -13), None), ((0, -13), (1, 12), None), ((0, -13), (1, 14), None), ((0, -13), (1, 16), None), ((0, 12), (1, 12), None), ((0, 14), (1, 12), None), ((0, 14), (1, 14), None), ((0, 16), (1, 12), None), ((0, 16), (1, 16), None), ((1, -13), (2, 0), None), ((1, 12), (2, 0), None), ((1, 14), (2, 0), None), ((1, 16), (2, 0), None)] + sage: e +- {((-1, 0), (0, 14)): 0, +- ((-1, 0), (0, -13)): 0, +- ((-1, 0), (0, 12)): 0, +- ((-1, 0), (0, 16)): 0, +- ((1, 12), (2, 0)): 0, +- ((0, 14), (1, 12)): 0, +- ((0, 14), (1, 14)): 1, +- ((1, 16), (2, 0)): 0, ++ {((1, 12), (2, 0)): 0, ++ ((0, 16), (1, 12)): 0, ++ ((0, 16), (1, 16)): 1, ++ ((1, 14), (2, 0)): 0, + ((0, -13), (1, 12)): 0, +- ((0, -13), (1, 16)): 0, + ((0, -13), (1, 14)): 0, + ((0, -13), (1, -13)): 1, +- ((1, 14), (2, 0)): 0, ++ ((0, -13), (1, 16)): 0, ++ ((-1, 0), (0, 16)): 0, ++ ((-1, 0), (0, -13)): 0, ++ ((-1, 0), (0, 12)): 0, ++ ((-1, 0), (0, 14)): 0, + ((0, 12), (1, 12)): 1, +- ((0, 16), (1, 12)): 0, +- ((0, 16), (1, 16)): 1, +- ((1, -13), (2, 0)): 0} ++ ((1, -13), (2, 0)): 0, ++ ((1, 16), (2, 0)): 0, ++ ((0, 14), (1, 12)): 0, ++ ((0, 14), (1, 14)): 1} + sage: qs = [[1,2,3,4,5,6,7,8,9],[[1,3],[3,4],[5,7],[1,9],[2,3]]] + sage: Poset(qs).frank_network() + (Digraph on 20 vertices, +- {((1, 3), (2, 0)): 0, +- ((-1, 0), (0, 6)): 0, +- ((-1, 0), (0, 7)): 0, +- ((-1, 0), (0, 9)): 0, +- ((-1, 0), (0, 2)): 0, +- ((-1, 0), (0, 3)): 0, +- ((-1, 0), (0, 4)): 0, +- ((-1, 0), (0, 5)): 0, +- ((-1, 0), (0, 8)): 0, +- ((-1, 0), (0, 1)): 0, ++ {((0, 2), (1, 2)): 1, ++ ((0, 5), (1, 5)): 1, ++ ((1, 6), (2, 0)): 0, ++ ((0, 8), (1, 8)): 1, ++ ((1, 3), (2, 0)): 0, ++ ((1, 9), (2, 0)): 0, ++ ((0, 1), (1, 1)): 1, + ((0, 7), (1, 7)): 1, + ((0, 7), (1, 5)): 0, +- ((1, 6), (2, 0)): 0, +- ((0, 3), (1, 3)): 1, +- ((0, 3), (1, 2)): 0, +- ((0, 3), (1, 1)): 0, + ((1, 2), (2, 0)): 0, +- ((1, 5), (2, 0)): 0, ++ ((0, 4), (1, 4)): 1, + ((0, 4), (1, 3)): 0, + ((0, 4), (1, 2)): 0, + ((0, 4), (1, 1)): 0, +- ((0, 4), (1, 4)): 1, ++ ((1, 5), (2, 0)): 0, ++ ((1, 8), (2, 0)): 0, ++ ((-1, 0), (0, 2)): 0, ++ ((-1, 0), (0, 9)): 0, ++ ((-1, 0), (0, 5)): 0, ++ ((-1, 0), (0, 6)): 0, ++ ((-1, 0), (0, 8)): 0, ++ ((-1, 0), (0, 1)): 0, ++ ((-1, 0), (0, 7)): 0, ++ ((-1, 0), (0, 4)): 0, ++ ((-1, 0), (0, 3)): 0, + ((1, 1), (2, 0)): 0, ++ ((0, 3), (1, 3)): 1, ++ ((0, 3), (1, 2)): 0, ++ ((0, 3), (1, 1)): 0, ++ ((0, 9), (1, 9)): 1, ++ ((0, 9), (1, 1)): 0, + ((1, 4), (2, 0)): 0, +- ((0, 5), (1, 5)): 1, +- ((1, 9), (2, 0)): 0, +- ((0, 8), (1, 8)): 1, +- ((0, 1), (1, 1)): 1, +- ((1, 8), (2, 0)): 0, + ((0, 6), (1, 6)): 1, +- ((1, 7), (2, 0)): 0, +- ((0, 9), (1, 1)): 0, +- ((0, 9), (1, 9)): 1, +- ((0, 2), (1, 2)): 1}) ++ ((1, 7), (2, 0)): 0}) + + AUTHOR: + @@ -7844,9 +7844,9 @@ class FinitePoset(UniqueRepresentation, Parent): sage: P = posets.AntichainPoset(3) sage: Pc = P.cuts() @@ -641,7 +740,7 @@ diff --git a/src/sage/geometry/polyhedron/library.py b/src/sage/geometry/polyhed index d66997fc95..57a039d4d6 100644 --- a/src/sage/geometry/polyhedron/library.py +++ b/src/sage/geometry/polyhedron/library.py -@@ -2286,12 +2286,12 @@ class Polytopes(): +@@ -2287,12 +2287,12 @@ class Polytopes(): sage: perm_a2_reg = polytopes.generalized_permutahedron(['A',2],regular=True) sage: perm_a2_reg.vertices() @@ -658,7 +757,7 @@ index d66997fc95..57a039d4d6 100644 sage: perm_a2_reg.is_inscribed() True sage: perm_a3_reg = polytopes.generalized_permutahedron(['A',3],regular=True) -@@ -2303,20 +2303,20 @@ class Polytopes(): +@@ -2304,20 +2304,20 @@ class Polytopes(): sage: perm_a2_inexact = polytopes.generalized_permutahedron(['A',2],exact=False) sage: perm_a2_inexact.vertices() (A vertex at (0.0, 1.0), @@ -719,8 +818,8 @@ index 9f7e1f418e..0ec459e7d3 100644 This method is deprecated since Sage-4.4.1.alpha2. Please use instead: sage: g.layout(layout = "planar", save_pos = True) -- {0: [1, 4], 1: [5, 1], 2: [0, 5], 3: [1, 0], 4: [1, 2], 5: [2, 1], 6: [4, 1]} -+ {0: [0, 5], 1: [1, 4], 2: [5, 1], 3: [3, 1], 4: [1, 0], 5: [2, 1], 6: [1, 3]} +- {1: [5, 1], 2: [0, 5], 3: [1, 0], 0: [1, 4], 4: [1, 2], 5: [2, 1], 6: [4, 1]} ++ {2: [5, 1], 0: [0, 5], 4: [1, 0], 1: [1, 4], 3: [3, 1], 5: [2, 1], 6: [1, 3]} """ deprecation(24494, 'This method is replaced by the method layout. ' 'Please use layout(layout="planar", save_pos=True) ' @@ -728,21 +827,21 @@ index 9f7e1f418e..0ec459e7d3 100644 sage: g = graphs.PathGraph(10) sage: g.layout(layout='planar', save_pos=True, test=True) -- {0: [3, 2], +- {5: [8, 1], +- 7: [0, 8], +- 9: [1, 0], +- 0: [3, 2], - 1: [4, 3], - 2: [3, 4], - 3: [4, 4], - 4: [2, 6], -- 5: [8, 1], - 6: [1, 7], -- 7: [0, 8], -- 8: [1, 1], -- 9: [1, 0]} -+ {0: [0, 8], +- 8: [1, 1]} ++ {2: [8, 1], ++ 0: [0, 8], ++ 4: [1, 0], + 1: [6, 2], -+ 2: [8, 1], + 3: [6, 1], -+ 4: [1, 0], + 5: [5, 2], + 6: [2, 2], + 7: [2, 3], @@ -758,8 +857,8 @@ index 9f7e1f418e..0ec459e7d3 100644 + [93, 14] sage: g = graphs.CycleGraph(7) sage: g.layout(layout='planar', save_pos=True, test=True) -- {0: [1, 4], 1: [5, 1], 2: [0, 5], 3: [1, 0], 4: [1, 2], 5: [2, 1], 6: [4, 1]} -+ {0: [0, 5], 1: [1, 4], 2: [5, 1], 3: [3, 1], 4: [1, 0], 5: [2, 1], 6: [1, 3]} +- {1: [5, 1], 2: [0, 5], 3: [1, 0], 0: [1, 4], 4: [1, 2], 5: [2, 1], 6: [4, 1]} ++ {2: [5, 1], 0: [0, 5], 4: [1, 0], 1: [1, 4], 3: [3, 1], 5: [2, 1], 6: [1, 3]} sage: g = graphs.CompleteGraph(5) sage: g.layout(layout='planar', save_pos=True, test=True, set_embedding=True) Traceback (most recent call last): @@ -800,7 +899,7 @@ index cab8faa833..9f00d87eb4 100644 """ import networkx -@@ -7107,7 +7107,7 @@ class Graph(GenericGraph): +@@ -7147,7 +7147,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() @@ -850,8 +949,8 @@ index dc11b61e4d..24090589d4 100644 sage: r = _realizer(g, tn) sage: _compute_coordinates(g,r) sage: g.get_pos() -- {0: [0, 5], 1: [5, 1], 2: [1, 0], 3: [4, 1], 4: [1, 1], 5: [2, 2], 6: [1, 4]} -+ {0: [0, 5], 1: [5, 1], 2: [1, 0], 3: [2, 1], 4: [1, 3], 5: [2, 2], 6: [4, 1]} +- {1: [5, 1], 0: [0, 5], 2: [1, 0], 3: [4, 1], 4: [1, 1], 5: [2, 2], 6: [1, 4]} ++ {1: [5, 1], 0: [0, 5], 2: [1, 0], 3: [2, 1], 4: [1, 3], 5: [2, 2], 6: [4, 1]} """ tree_nodes, (v1, v2, v3) = x @@ -1181,7 +1280,7 @@ diff --git a/src/sage/parallel/map_reduce.py b/src/sage/parallel/map_reduce.py index 0fb6091cbd..c2f7e77727 100644 --- a/src/sage/parallel/map_reduce.py +++ b/src/sage/parallel/map_reduce.py -@@ -1396,7 +1396,7 @@ class RESetMapReduce(object): +@@ -1402,7 +1402,7 @@ class RESetMapReduce(object): sage: EX = RESetMPExample(maxl=6) sage: EX.setup_workers(2) sage: EX.random_worker() @@ -1190,7 +1289,7 @@ index 0fb6091cbd..c2f7e77727 100644 sage: EX.random_worker() in EX._workers True -@@ -1580,7 +1580,7 @@ class RESetMapReduceWorker(mp.Process): +@@ -1586,7 +1586,7 @@ class RESetMapReduceWorker(mp.Process): sage: from sage.parallel.map_reduce import RESetMPExample, RESetMapReduceWorker sage: EX = RESetMPExample() sage: RESetMapReduceWorker(EX, 200, True) @@ -1492,6 +1591,27 @@ index 9818f2ada9..ebb3c0121a 100644 """ #***************************************************************************** +@@ -587,7 +587,7 @@ class SchemeMorphism_orbit_closure_toric_variety(SchemeMorphism, Morphism): + TESTS:: + + sage: V.embedding_morphism()._reverse_ray_map() +- {N(1): 2, N(-1): 3} ++ {N(-1): 3, N(1): 2} + sage: V.embedding_morphism()._defining_cone + 1-d cone of Rational polyhedral fan in 2-d lattice N + """ +@@ -647,9 +647,9 @@ class SchemeMorphism_orbit_closure_toric_variety(SchemeMorphism, Morphism): + sage: P1 = P2_112.orbit_closure(Cone([(1,0)])) + sage: f = P1.embedding_morphism() + sage: f._ray_map +- {N(0, 1): (1), N(1, 0): (0), N(-1, -2): (-2)} ++ {N(1, 0): (0), N(-1, -2): (-2), N(0, 1): (1)} + sage: f._reverse_ray_map() +- {N(1): 1, N(-2): 2} ++ {N(-2): 2, N(1): 1} + """ + orbit = self.parent().domain() + codomain_fan = self.parent().codomain().fan() @@ -714,7 +714,7 @@ class SchemeMorphism_orbit_closure_toric_variety(SchemeMorphism, Morphism): From: 1-d toric variety covered by 2 affine patches To: 2-d CPR-Fano toric variety covered by 3 affine patches @@ -1528,7 +1648,16 @@ index 9818f2ada9..ebb3c0121a 100644 """ phi_i, phi_b, phi_s = self.fan_morphism().factor() from sage.schemes.toric.all import ToricVariety -@@ -1952,8 +1952,8 @@ class SchemeMorphism_fan_fiber_component_toric_variety(SchemeMorphism): +@@ -1815,7 +1815,7 @@ class SchemeMorphism_fan_fiber_component_toric_variety(SchemeMorphism): + sage: fc = P1xP1.hom(matrix([[1],[0]]), P1).fiber_component(Cone([(1,0)])) + sage: f = fc.embedding_morphism() + sage: f._ray_index_map # indirect doctest +- {N(1): 2, N(-1): 3} ++ {N(-1): 3, N(1): 2} + + TESTS:: + +@@ -1952,10 +1952,10 @@ class SchemeMorphism_fan_fiber_component_toric_variety(SchemeMorphism): sage: for r in fc.fan().rays(): ....: print("{} {}".format(r, f._image_ray_multiplicity(r))) N(0, 1) (5, 1) @@ -1536,8 +1665,11 @@ index 9818f2ada9..ebb3c0121a 100644 N(-1, 2) (11, 1) + N(1, -3) (9, 2) sage: f._ray_index_map - {N(-3, 4): 10, N(-1, 2): 11, N(0, 1): 5, N(1, 0): 4, N(2, -6): 9} +- {N(2, -6): 9, N(-3, 4): 10, N(0, 1): 5, N(1, 0): 4, N(-1, 2): 11} ++ {N(1, 0): 4, N(0, 1): 5, N(-3, 4): 10, N(2, -6): 9, N(-1, 2): 11} """ + try: + image_ray_index = self._ray_index_map[fiber_ray] @@ -1999,7 +1999,7 @@ class SchemeMorphism_fan_fiber_component_toric_variety(SchemeMorphism): V(z0) + V(z1) + 3*V(z2) + 4*V(z3) sage: fc = f.fiber_component(Cone([(1,1,0)])) @@ -1676,7 +1808,7 @@ 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): +@@ -805,7 +805,7 @@ def preparse_numeric_literals(code, extract=False): sage: 123__45 # py3 Traceback (most recent call last): ... @@ -1685,7 +1817,7 @@ index 529c341833..25223123d1 100644 sage: preparse_numeric_literals('3040_1_') '3040_1_' -@@ -802,7 +802,7 @@ def preparse_numeric_literals(code, extract=False): +@@ -816,7 +816,7 @@ def preparse_numeric_literals(code, extract=False): sage: 3040_1_ # py3 Traceback (most recent call last): ... |