mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 11:45:56 -04:00
Version 9.1.
- Drop upstreamed -nauty patch. - Drop -cbc patch; upstream uses the system Cbc now. - Add -ecl patch for ecl 20.4.24.
This commit is contained in:
parent
4556e3ebb0
commit
eb706cd5f8
15 changed files with 838 additions and 732 deletions
|
@ -112,10 +112,10 @@ diff -up build/pkgs/sagetex/src/sagetexparse.py.orig build/pkgs/sagetex/src/sage
|
|||
self.result += t.code[1:-1] + '\n\n'
|
||||
|
||||
diff -up src/sage/combinat/finite_state_machine.py.orig src/sage/combinat/finite_state_machine.py
|
||||
--- src/sage/combinat/finite_state_machine.py.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/combinat/finite_state_machine.py 2020-02-25 13:42:46.676646848 -0700
|
||||
@@ -936,7 +936,7 @@ from six.moves import range, zip_longest
|
||||
from six import itervalues
|
||||
--- src/sage/combinat/finite_state_machine.py.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/combinat/finite_state_machine.py 2020-07-06 16:47:19.198130202 -0600
|
||||
@@ -935,7 +935,7 @@ import six
|
||||
from six.moves import range, zip_longest, zip
|
||||
|
||||
from IPython.lib.pretty import pretty
|
||||
-import collections
|
||||
|
@ -123,7 +123,7 @@ diff -up src/sage/combinat/finite_state_machine.py.orig src/sage/combinat/finite
|
|||
import itertools
|
||||
from copy import copy, deepcopy
|
||||
|
||||
@@ -14161,7 +14161,7 @@ def is_FSMProcessIterator(PI):
|
||||
@@ -14159,7 +14159,7 @@ def is_FSMProcessIterator(PI):
|
||||
|
||||
|
||||
class FSMProcessIterator(SageObject,
|
||||
|
@ -132,21 +132,47 @@ diff -up src/sage/combinat/finite_state_machine.py.orig src/sage/combinat/finite
|
|||
"""
|
||||
This class takes an input, feeds it into a finite state machine
|
||||
(automaton or transducer, in particular), tests whether this was
|
||||
diff -up src/sage/combinat/root_system/branching_rules.py.orig src/sage/combinat/root_system/branching_rules.py
|
||||
--- src/sage/combinat/root_system/branching_rules.py.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/combinat/root_system/branching_rules.py 2020-02-25 13:42:46.678646812 -0700
|
||||
@@ -1750,7 +1750,7 @@ def branching_rule(Rtype, Stype, rule="d
|
||||
elif rule == "tensor" or rule == "tensor-debug":
|
||||
if not Stype.is_compound():
|
||||
raise ValueError("Tensor product requires more than one factor")
|
||||
- if len(stypes) is not 2:
|
||||
+ if len(stypes) != 2:
|
||||
raise ValueError("Not implemented")
|
||||
if Rtype[0] == 'A':
|
||||
nr = Rtype[1]+1
|
||||
diff -up src/sage/cpython/debugimpl.c.orig src/sage/cpython/debugimpl.c
|
||||
--- src/sage/cpython/debugimpl.c.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/cpython/debugimpl.c 2020-07-07 13:56:17.121624915 -0600
|
||||
@@ -155,6 +155,7 @@ static void _type_debug(PyTypeObject* tp
|
||||
printf(" tp_basicsize: %ld\n", (long)tp->tp_basicsize);
|
||||
printf(" tp_itemsize: %ld\n", (long)tp->tp_itemsize);
|
||||
printf(" tp_dictoffset: %ld\n", (long)tp->tp_dictoffset);
|
||||
+ printf(" tp_vectorcall_offset: %ld\n", (long)tp->tp_vectorcall_offset);
|
||||
if HAVE_WEAKREFS(tp)
|
||||
{
|
||||
printf(" tp_weaklistoffset: %ld\n", (long)tp->tp_weaklistoffset);
|
||||
@@ -185,7 +186,6 @@ static void _type_debug(PyTypeObject* tp
|
||||
attr_pointer(tp_free);
|
||||
|
||||
attr_pointer_meth(tp_repr, "__repr__");
|
||||
- attr_pointer(tp_print);
|
||||
attr_pointer_meth(tp_hash, "__hash__");
|
||||
attr_pointer_meth(tp_call, "__call__");
|
||||
attr_pointer_meth(tp_str, "__str__");
|
||||
diff -up src/sage/cpython/debug.pyx.orig src/sage/cpython/debug.pyx
|
||||
--- src/sage/cpython/debug.pyx.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/cpython/debug.pyx 2020-07-07 13:57:49.169641697 -0600
|
||||
@@ -232,6 +232,7 @@ def type_debug(cls):
|
||||
tp_basicsize: 16
|
||||
tp_itemsize: 0
|
||||
tp_dictoffset: 0
|
||||
+ tp_vectorcall_offset: 0
|
||||
tp_weaklistoffset: 0
|
||||
tp_base (__base__): NULL
|
||||
tp_bases (__bases__): tuple:
|
||||
@@ -259,7 +260,6 @@ def type_debug(cls):
|
||||
tp_dealloc (__dealloc__): 0x7fc57d757010
|
||||
tp_free: PyObject_Del
|
||||
tp_repr (__repr__): 0x7fc57d75b990
|
||||
- tp_print: NULL
|
||||
tp_hash (__hash__): _Py_HashPointer
|
||||
tp_call (__call__): NULL
|
||||
tp_str (__str__): 0x7fc57d757020
|
||||
diff -up src/sage/geometry/triangulation/point_configuration.py.orig src/sage/geometry/triangulation/point_configuration.py
|
||||
--- src/sage/geometry/triangulation/point_configuration.py.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/geometry/triangulation/point_configuration.py 2020-02-26 14:41:58.109624057 -0700
|
||||
--- src/sage/geometry/triangulation/point_configuration.py.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/geometry/triangulation/point_configuration.py 2020-07-06 16:48:01.176121036 -0600
|
||||
@@ -619,11 +619,11 @@ class PointConfiguration(UniqueRepresent
|
||||
['{{0,1,2,4},{1,2,3,4}}']
|
||||
"""
|
||||
|
@ -162,8 +188,8 @@ diff -up src/sage/geometry/triangulation/point_configuration.py.orig src/sage/ge
|
|||
if verbose:
|
||||
print("#### TOPCOM input ####")
|
||||
diff -up src/sage/graphs/graph_latex.py.orig src/sage/graphs/graph_latex.py
|
||||
--- src/sage/graphs/graph_latex.py.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/graphs/graph_latex.py 2020-02-25 13:42:46.679646794 -0700
|
||||
--- src/sage/graphs/graph_latex.py.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/graphs/graph_latex.py 2020-07-06 16:48:01.177121036 -0600
|
||||
@@ -1156,7 +1156,7 @@ class GraphLatex(SageObject):
|
||||
#
|
||||
elif name in color_dicts:
|
||||
|
@ -223,8 +249,8 @@ diff -up src/sage/graphs/graph_latex.py.orig src/sage/graphs/graph_latex.py
|
|||
for key, p in value.items():
|
||||
if not((isinstance(p, tuple)) and (len(p) == 2) and (p[0] >= 0) and (p[1] in compass_points)):
|
||||
diff -up src/sage/interfaces/frobby.py.orig src/sage/interfaces/frobby.py
|
||||
--- src/sage/interfaces/frobby.py.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/interfaces/frobby.py 2020-02-26 14:41:07.262562710 -0700
|
||||
--- src/sage/interfaces/frobby.py.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/interfaces/frobby.py 2020-07-06 16:48:01.178121036 -0600
|
||||
@@ -79,7 +79,7 @@ class Frobby:
|
||||
print("Frobby command: ", repr(command))
|
||||
print("Frobby input:\n", input)
|
||||
|
@ -235,8 +261,8 @@ diff -up src/sage/interfaces/frobby.py.orig src/sage/interfaces/frobby.py
|
|||
frinput = str_to_bytes(input)
|
||||
else:
|
||||
diff -up src/sage/interfaces/gfan.py.orig src/sage/interfaces/gfan.py
|
||||
--- src/sage/interfaces/gfan.py.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/interfaces/gfan.py 2020-02-25 13:42:46.679646794 -0700
|
||||
--- src/sage/interfaces/gfan.py.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/interfaces/gfan.py 2020-07-06 16:48:01.178121036 -0600
|
||||
@@ -66,7 +66,7 @@ class Gfan(object):
|
||||
if six.PY2:
|
||||
enc_kwargs = {}
|
||||
|
@ -247,8 +273,8 @@ diff -up src/sage/interfaces/gfan.py.orig src/sage/interfaces/gfan.py
|
|||
gfan_processes = Popen(cmd, stdin=PIPE, stdout=PIPE, stderr=PIPE,
|
||||
**enc_kwargs)
|
||||
diff -up src/sage/interfaces/gp.py.orig src/sage/interfaces/gp.py
|
||||
--- src/sage/interfaces/gp.py.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/interfaces/gp.py 2020-02-25 13:42:46.680646776 -0700
|
||||
--- src/sage/interfaces/gp.py.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/interfaces/gp.py 2020-07-06 16:48:01.179121036 -0600
|
||||
@@ -934,17 +934,6 @@ class GpElement(ExpectElement):
|
||||
"""
|
||||
return repr(self.type()) == 't_STR'
|
||||
|
@ -268,8 +294,8 @@ diff -up src/sage/interfaces/gp.py.orig src/sage/interfaces/gp.py
|
|||
"""
|
||||
Return Python float.
|
||||
diff -up src/sage/interfaces/latte.py.orig src/sage/interfaces/latte.py
|
||||
--- src/sage/interfaces/latte.py.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/interfaces/latte.py 2020-02-25 13:42:46.680646776 -0700
|
||||
--- src/sage/interfaces/latte.py.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/interfaces/latte.py 2020-07-06 16:48:01.180121036 -0600
|
||||
@@ -152,6 +152,7 @@ def count(arg, ehrhart_polynomial=False,
|
||||
latte_proc = Popen(args,
|
||||
stdin=PIPE, stdout=PIPE,
|
||||
|
@ -287,8 +313,8 @@ diff -up src/sage/interfaces/latte.py.orig src/sage/interfaces/latte.py
|
|||
|
||||
ans, err = latte_proc.communicate(arg)
|
||||
diff -up src/sage/interfaces/sagespawn.pyx.orig src/sage/interfaces/sagespawn.pyx
|
||||
--- src/sage/interfaces/sagespawn.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/interfaces/sagespawn.pyx 2020-02-25 13:42:46.680646776 -0700
|
||||
--- src/sage/interfaces/sagespawn.pyx.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/interfaces/sagespawn.pyx 2020-07-06 16:48:01.180121036 -0600
|
||||
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
Sage wrapper around pexpect's ``spawn`` class and
|
||||
|
@ -336,9 +362,10 @@ diff -up src/sage/interfaces/sagespawn.pyx.orig src/sage/interfaces/sagespawn.py
|
|||
except (OSError, IOError):
|
||||
pass
|
||||
self.fileobj.close()
|
||||
diff -up src/sage/lfunctions/lcalc.py.orig src/sage/lfunctions/lcalc.py
|
||||
diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter.pyx
|
||||
--- src/sage/libs/coxeter3/coxeter.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/libs/coxeter3/coxeter.pyx 2020-02-25 13:42:46.680646776 -0700
|
||||
--- src/sage/libs/coxeter3/coxeter.pyx.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/libs/coxeter3/coxeter.pyx 2020-07-06 16:48:01.181121035 -0600
|
||||
@@ -33,7 +33,7 @@ cdef class String:
|
||||
EXAMPLES::
|
||||
|
||||
|
@ -472,8 +499,8 @@ diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter.
|
|||
if rank == 0:
|
||||
raise NotImplementedError("Coxeter group of type ['A',0] using Coxeter 3 not yet implemented")
|
||||
diff -up src/sage/misc/parser.pyx.orig src/sage/misc/parser.pyx
|
||||
--- src/sage/misc/parser.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/misc/parser.pyx 2020-02-25 13:42:46.681646759 -0700
|
||||
--- src/sage/misc/parser.pyx.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/misc/parser.pyx 2020-07-06 16:48:01.182121035 -0600
|
||||
@@ -95,7 +95,7 @@ def token_to_str(int token):
|
||||
|
||||
|
||||
|
@ -772,9 +799,137 @@ diff -up src/sage/misc/parser.pyx.orig src/sage/misc/parser.pyx
|
|||
tokens.backtrack()
|
||||
return self.p_list(tokens)
|
||||
else:
|
||||
diff -up src/sage/misc/sageinspect.py.orig src/sage/misc/sageinspect.py
|
||||
--- src/sage/misc/sageinspect.py.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/misc/sageinspect.py 2020-07-09 16:11:23.134895309 -0600
|
||||
@@ -485,35 +485,46 @@ class SageArgSpecVisitor(ast.NodeVisitor
|
||||
return False
|
||||
return node.id
|
||||
|
||||
- if six.PY3:
|
||||
- def visit_NameConstant(self, node):
|
||||
- """
|
||||
- Visit a Python AST :class:`ast.NameConstant` node.
|
||||
+ def visit_Constant(self, node):
|
||||
+ r"""
|
||||
+ Visit a Python AST :class:`ast.Constant` node.
|
||||
|
||||
- This is an optimization added in Python 3.4 for the special cases
|
||||
- of True, False, and None.
|
||||
+ INPUT:
|
||||
|
||||
- INPUT:
|
||||
+ - ``node`` - the node instance to visit
|
||||
|
||||
- - ``node`` - the node instance to visit
|
||||
+ OUTPUT:
|
||||
|
||||
- OUTPUT:
|
||||
+ - the boolean, number, or string the ``node`` represents
|
||||
|
||||
- - None, True, False.
|
||||
+ EXAMPLES::
|
||||
|
||||
- EXAMPLES::
|
||||
+ sage: import ast, sage.misc.sageinspect as sms
|
||||
+ sage: visitor = sms.SageArgSpecVisitor()
|
||||
+ sage: vis = lambda x: visitor.visit_Constant(ast.parse(x).body[0].value)
|
||||
+ sage: [vis(n) for n in ['True', 'False', 'None']]
|
||||
+ [True, False, None]
|
||||
+ sage: [type(vis(n)) for n in ['True', 'False', 'None']]
|
||||
+ [<type 'bool'>, <type 'bool'>, <type 'NoneType'>]
|
||||
|
||||
- sage: import ast, sage.misc.sageinspect as sms # py3
|
||||
- sage: visitor = sms.SageArgSpecVisitor() # py3
|
||||
- sage: vis = lambda x: visitor.visit_NameConstant(ast.parse(x).body[0].value) # py3
|
||||
- sage: [vis(n) for n in ['True', 'False', 'None']] # py3
|
||||
- [True, False, None]
|
||||
- sage: [type(vis(n)) for n in ['True', 'False', 'None']] # py3
|
||||
- [<type 'bool'>, <type 'bool'>, <type 'NoneType'>]
|
||||
- """
|
||||
+ sage: vis = lambda x: visitor.visit_Constant(ast.parse(x).body[0].value)
|
||||
+ sage: [vis(s) for s in ['"abstract"', "u'syntax'", r'''r"tr\ee"''']]
|
||||
+ ['abstract', u'syntax', 'tr\\ee']
|
||||
|
||||
- return node.value
|
||||
+ sage: vis = lambda x: visitor.visit_Constant(ast.parse(x).body[0].value)
|
||||
+ sage: [vis(n) for n in ['123', '0.0', str(-pi.n())]] # py2
|
||||
+ [123, 0.0, -3.14159265358979]
|
||||
+ sage: [vis(n) for n in ['123', '0.0']] # py3
|
||||
+ [123, 0.0]
|
||||
+
|
||||
+ .. NOTE::
|
||||
|
||||
+ On Python 3 negative numbers are parsed first, for some reason, as
|
||||
+ a UnaryOp node.
|
||||
+ """
|
||||
+ return node.value
|
||||
+
|
||||
+ if six.PY3:
|
||||
def visit_arg(self, node):
|
||||
r"""
|
||||
Visit a Python AST :class:`ast.arg` node.
|
||||
@@ -543,57 +554,6 @@ class SageArgSpecVisitor(ast.NodeVisitor
|
||||
"""
|
||||
return node.arg
|
||||
|
||||
- def visit_Num(self, node):
|
||||
- """
|
||||
- Visit a Python AST :class:`ast.Num` node.
|
||||
-
|
||||
- INPUT:
|
||||
-
|
||||
- - ``node`` - the node instance to visit
|
||||
-
|
||||
- OUTPUT:
|
||||
-
|
||||
- - the number the ``node`` represents
|
||||
-
|
||||
- EXAMPLES::
|
||||
-
|
||||
- sage: import ast, sage.misc.sageinspect as sms
|
||||
- sage: visitor = sms.SageArgSpecVisitor()
|
||||
- sage: vis = lambda x: visitor.visit_Num(ast.parse(x).body[0].value)
|
||||
- sage: [vis(n) for n in ['123', '0.0', str(-pi.n())]] # py2
|
||||
- [123, 0.0, -3.14159265358979]
|
||||
- sage: [vis(n) for n in ['123', '0.0']] # py3
|
||||
- [123, 0.0]
|
||||
-
|
||||
- .. NOTE::
|
||||
-
|
||||
- On Python 3 negative numbers are parsed first, for some reason, as
|
||||
- a UnaryOp node.
|
||||
- """
|
||||
- return node.n
|
||||
-
|
||||
- def visit_Str(self, node):
|
||||
- r"""
|
||||
- Visit a Python AST :class:`ast.Str` node.
|
||||
-
|
||||
- INPUT:
|
||||
-
|
||||
- - ``node`` - the node instance to visit
|
||||
-
|
||||
- OUTPUT:
|
||||
-
|
||||
- - the string the ``node`` represents
|
||||
-
|
||||
- EXAMPLES::
|
||||
-
|
||||
- sage: import ast, sage.misc.sageinspect as sms
|
||||
- sage: visitor = sms.SageArgSpecVisitor()
|
||||
- sage: vis = lambda x: visitor.visit_Str(ast.parse(x).body[0].value)
|
||||
- sage: [vis(s) for s in ['"abstract"', "u'syntax'", r'''r"tr\ee"''']]
|
||||
- ['abstract', u'syntax', 'tr\\ee']
|
||||
- """
|
||||
- return node.s
|
||||
-
|
||||
def visit_List(self, node):
|
||||
"""
|
||||
Visit a Python AST :class:`ast.List` node.
|
||||
diff -up src/sage/plot/plot3d/plot3d.py.orig src/sage/plot/plot3d/plot3d.py
|
||||
--- src/sage/plot/plot3d/plot3d.py.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/plot/plot3d/plot3d.py 2020-02-25 13:42:46.681646759 -0700
|
||||
--- src/sage/plot/plot3d/plot3d.py.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/plot/plot3d/plot3d.py 2020-07-06 16:48:01.183121035 -0600
|
||||
@@ -188,7 +188,8 @@ class _Coordinates(object):
|
||||
sage: arb((x+z,y*z,z), z, (x,y))
|
||||
Arbitrary Coordinates coordinate transform (z in terms of x, y)
|
||||
|
@ -786,8 +941,8 @@ diff -up src/sage/plot/plot3d/plot3d.py.orig src/sage/plot/plot3d/plot3d.py
|
|||
raise ValueError('variables were specified incorrectly for this coordinate system; incorrect variables were %s'%list(set(all_vars).symmetric_difference(set(indep_vars+[dep_var]))))
|
||||
self.dep_var = dep_var
|
||||
diff -up src/sage/plot/point.py.orig src/sage/plot/point.py
|
||||
--- src/sage/plot/point.py.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/plot/point.py 2020-02-25 13:42:46.681646759 -0700
|
||||
--- src/sage/plot/point.py.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/plot/point.py 2020-07-06 16:48:01.184121035 -0600
|
||||
@@ -29,7 +29,7 @@ TESTS::
|
||||
from sage.misc.decorators import options, rename_keyword
|
||||
from sage.plot.colors import to_mpl_color
|
||||
|
@ -807,9 +962,9 @@ diff -up src/sage/plot/point.py.orig src/sage/plot/point.py
|
|||
|
||||
try:
|
||||
diff -up src/sage/repl/display/fancy_repr.py.orig src/sage/repl/display/fancy_repr.py
|
||||
--- src/sage/repl/display/fancy_repr.py.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/repl/display/fancy_repr.py 2020-02-25 13:42:46.682646741 -0700
|
||||
@@ -15,7 +15,7 @@ Representations of objects.
|
||||
--- src/sage/repl/display/fancy_repr.py.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/repl/display/fancy_repr.py 2020-07-06 16:48:01.184121035 -0600
|
||||
@@ -15,7 +15,7 @@ Representations of objects
|
||||
import types
|
||||
|
||||
from IPython.lib.pretty import (
|
||||
|
@ -828,8 +983,8 @@ diff -up src/sage/repl/display/fancy_repr.py.orig src/sage/repl/display/fancy_re
|
|||
else:
|
||||
# A user-provided repr. Find newlines and replace them with p.break_()
|
||||
diff -up src/sage/repl/ipython_kernel/interact.py.orig src/sage/repl/ipython_kernel/interact.py
|
||||
--- src/sage/repl/ipython_kernel/interact.py.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/repl/ipython_kernel/interact.py 2020-02-25 13:42:46.682646741 -0700
|
||||
--- src/sage/repl/ipython_kernel/interact.py.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/repl/ipython_kernel/interact.py 2020-07-06 16:48:01.185121034 -0600
|
||||
@@ -35,7 +35,8 @@ EXAMPLES::
|
||||
|
||||
from ipywidgets.widgets import SelectionSlider, ValueWidget, ToggleButtons
|
||||
|
@ -841,9 +996,9 @@ diff -up src/sage/repl/ipython_kernel/interact.py.orig src/sage/repl/ipython_ker
|
|||
from .widgets_sagenb import input_grid
|
||||
from sage.structure.element import parent
|
||||
diff -up src/sage/rings/integer.pyx.orig src/sage/rings/integer.pyx
|
||||
--- src/sage/rings/integer.pyx.orig 2020-02-27 10:29:19.004788998 -0700
|
||||
+++ src/sage/rings/integer.pyx 2020-02-27 15:48:31.176289587 -0700
|
||||
@@ -7123,7 +7123,7 @@ cdef int mpz_set_str_python(mpz_ptr z, c
|
||||
--- src/sage/rings/integer.pyx.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/rings/integer.pyx 2020-07-06 16:48:01.187121034 -0600
|
||||
@@ -7135,7 +7135,7 @@ cdef int mpz_set_str_python(mpz_ptr z, c
|
||||
while x[0] == c' ': x += 1 # Strip spaces
|
||||
|
||||
# Disallow a sign here
|
||||
|
@ -853,8 +1008,8 @@ diff -up src/sage/rings/integer.pyx.orig src/sage/rings/integer.pyx
|
|||
|
||||
assert base >= 2
|
||||
diff -up src/sage/rings/polynomial/pbori.pyx.orig src/sage/rings/polynomial/pbori.pyx
|
||||
--- src/sage/rings/polynomial/pbori.pyx.orig 2020-02-27 10:58:59.991311061 -0700
|
||||
+++ src/sage/rings/polynomial/pbori.pyx 2020-02-27 15:48:31.177289568 -0700
|
||||
--- src/sage/rings/polynomial/pbori.pyx.orig 2020-07-06 16:13:17.464497408 -0600
|
||||
+++ src/sage/rings/polynomial/pbori.pyx 2020-07-06 16:48:01.190121033 -0600
|
||||
@@ -4764,8 +4764,7 @@ cdef class PolynomialConstruct:
|
||||
# So, it is just a conversion. [Simon King]
|
||||
return (<BooleanPolynomialRing>ring)._element_constructor_(x)
|
||||
|
@ -866,8 +1021,8 @@ diff -up src/sage/rings/polynomial/pbori.pyx.orig src/sage/rings/polynomial/pbor
|
|||
|
||||
cdef class MonomialConstruct:
|
||||
diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx
|
||||
--- src/sage/rings/real_mpfi.pyx.orig 2020-02-27 10:14:36.381371499 -0700
|
||||
+++ src/sage/rings/real_mpfi.pyx 2020-02-27 15:48:31.178289550 -0700
|
||||
--- src/sage/rings/real_mpfi.pyx.orig 2020-07-06 16:19:17.719457638 -0600
|
||||
+++ src/sage/rings/real_mpfi.pyx 2020-07-06 16:48:01.192121033 -0600
|
||||
@@ -1941,12 +1941,12 @@ cdef class RealIntervalFieldElement(Ring
|
||||
|
||||
cdef long digits
|
||||
|
@ -893,9 +1048,9 @@ diff -up src/sage/rings/real_mpfi.pyx.orig src/sage/rings/real_mpfi.pyx
|
|||
mant_string = bytes_to_str(tmp_cstr+1)
|
||||
sign_string = bytes_to_str(b'-')
|
||||
diff -up src/sage/rings/real_mpfr.pyx.orig src/sage/rings/real_mpfr.pyx
|
||||
--- src/sage/rings/real_mpfr.pyx.orig 2020-02-27 10:16:40.188177426 -0700
|
||||
+++ src/sage/rings/real_mpfr.pyx 2020-02-27 15:48:31.179289531 -0700
|
||||
@@ -2037,7 +2037,7 @@ cdef class RealNumber(sage.structure.ele
|
||||
--- src/sage/rings/real_mpfr.pyx.orig 2020-07-06 16:19:17.720457638 -0600
|
||||
+++ src/sage/rings/real_mpfr.pyx 2020-07-06 16:48:01.194121032 -0600
|
||||
@@ -2045,7 +2045,7 @@ cdef class RealNumber(sage.structure.ele
|
||||
if s is NULL:
|
||||
raise RuntimeError("unable to convert an mpfr number to a string")
|
||||
# t contains just digits (no sign, decimal point or exponent)
|
||||
|
@ -905,9 +1060,9 @@ diff -up src/sage/rings/real_mpfr.pyx.orig src/sage/rings/real_mpfr.pyx
|
|||
t = char_to_str(s + 1)
|
||||
else:
|
||||
diff -up src/sage/structure/sage_object.pyx.orig src/sage/structure/sage_object.pyx
|
||||
--- src/sage/structure/sage_object.pyx.orig 2020-01-01 04:03:10.000000000 -0700
|
||||
+++ src/sage/structure/sage_object.pyx 2020-02-25 13:42:56.898464506 -0700
|
||||
@@ -671,7 +671,7 @@ cdef class SageObject:
|
||||
--- src/sage/structure/sage_object.pyx.orig 2020-05-20 16:33:41.000000000 -0600
|
||||
+++ src/sage/structure/sage_object.pyx 2020-07-06 16:48:01.194121032 -0600
|
||||
@@ -680,7 +680,7 @@ cdef class SageObject:
|
||||
try:
|
||||
s = self._interface_init_(I)
|
||||
except Exception:
|
||||
|
@ -917,9 +1072,9 @@ diff -up src/sage/structure/sage_object.pyx.orig src/sage/structure/sage_object.
|
|||
if c:
|
||||
try:
|
||||
diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx
|
||||
--- src/sage/symbolic/expression.pyx.orig 2020-02-27 09:30:14.669819391 -0700
|
||||
+++ src/sage/symbolic/expression.pyx 2020-02-27 15:48:31.182289476 -0700
|
||||
@@ -12945,7 +12945,7 @@ cdef class hold_class:
|
||||
--- src/sage/symbolic/expression.pyx.orig 2020-07-06 16:22:36.515435688 -0600
|
||||
+++ src/sage/symbolic/expression.pyx 2020-07-06 16:48:01.198121032 -0600
|
||||
@@ -12990,7 +12990,7 @@ cdef class hold_class:
|
||||
sage: SR(2)^5
|
||||
32
|
||||
"""
|
||||
|
@ -928,7 +1083,7 @@ diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx
|
|||
|
||||
def __exit__(self, *args):
|
||||
"""
|
||||
@@ -12958,7 +12958,7 @@ cdef class hold_class:
|
||||
@@ -13003,7 +13003,7 @@ cdef class hold_class:
|
||||
sage: SR(2)^5
|
||||
32
|
||||
"""
|
||||
|
@ -937,3 +1092,25 @@ diff -up src/sage/symbolic/expression.pyx.orig src/sage/symbolic/expression.pyx
|
|||
|
||||
def start(self):
|
||||
"""
|
||||
diff -up src/sage/symbolic/ring.pyx.orig src/sage/symbolic/ring.pyx
|
||||
--- src/sage/symbolic/ring.pyx.orig 2020-07-06 16:20:02.592452688 -0600
|
||||
+++ src/sage/symbolic/ring.pyx 2020-07-10 09:09:09.512400345 -0600
|
||||
@@ -32,7 +32,6 @@ from sage.rings.all import RR, CC, ZZ
|
||||
|
||||
import keyword
|
||||
import operator
|
||||
-import parser
|
||||
|
||||
# Do not allow any of these keywords as identifiers for symbolic variables
|
||||
KEYWORDS = set(keyword.kwlist).union(['exec', 'print', 'None', 'True',
|
||||
@@ -1405,8 +1404,8 @@ def isidentifier(x):
|
||||
pass # py2
|
||||
|
||||
try:
|
||||
- code = parser.expr(x).compile()
|
||||
+ code = compile(x, '<string>', 'eval')
|
||||
except (MemoryError, OverflowError, SyntaxError,
|
||||
- SystemError, parser.ParserError):
|
||||
+ SystemError, ValueError):
|
||||
return False
|
||||
return len(code.co_names) == 1 and code.co_names[0] == x
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue