- Improve the -ecm patch.
- Add -formatargspec patch to silence doc-building warnings.
- Add -data-elliptic_curves_large subpackage.
- Build with bliss, coxeter3, and mcqd support.
- Fix typo that made the singular.hlp file inaccessible.
- Add more gap packages to get closer to the set shipped by upstream.
- Refactor Requires so they apply to the correct subpackages.
- More python 3 patching due to changes in python 3.8.
- Use upstream's method of installing jupyter support.
- Obsolete the sagemath-notebook-export subpackage.
This commit is contained in:
Jerry James 2019-09-12 20:34:03 -06:00
parent e4003eb1b4
commit ecae6482c5
12 changed files with 723 additions and 176 deletions

View file

@ -132,6 +132,18 @@ diff -up build/pkgs/sagetex/src/remote-sagetex.py.orig build/pkgs/sagetex/src/re
if not password:
from getpass import getpass
diff -up build/pkgs/sagetex/src/sagetexparse.py.orig build/pkgs/sagetex/src/sagetexparse.py
--- build/pkgs/sagetex/src/sagetexparse.py.orig 2019-01-09 09:51:28.000000000 -0700
+++ build/pkgs/sagetex/src/sagetexparse.py 2019-09-10 12:24:06.752516723 -0600
@@ -132,7 +132,7 @@ class SageCodeExtractor():
def plotout(self, s, l, t):
self.result += '# \\sageplot{} from line %s:\n' % lineno(l, s)
- if t.format is not '':
+ if t.format != '':
self.result += '# format: %s' % t.format[0][1:-1] + '\n'
self.result += t.code[1:-1] + '\n\n'
diff -up src/doc/common/conf.py.orig src/doc/common/conf.py
--- src/doc/common/conf.py.orig 2019-06-26 14:41:04.000000000 -0600
+++ src/doc/common/conf.py 2019-06-27 11:33:54.099080488 -0600
@ -153,6 +165,18 @@ diff -up src/doc/common/conf.py.orig src/doc/common/conf.py
return True
objname = getattr(obj, "__name__", None)
diff -up src/sage/coding/linear_code.py.orig src/sage/coding/linear_code.py
--- src/sage/coding/linear_code.py.orig 2019-06-26 14:41:04.000000000 -0600
+++ src/sage/coding/linear_code.py 2019-09-10 12:21:10.421332817 -0600
@@ -3793,7 +3793,7 @@ class LinearCode(AbstractLinearCode):
[1 2 1]
[2 1 1]
"""
- if encoder_name is None or encoder_name is 'GeneratorMatrix':
+ if encoder_name is None or encoder_name == 'GeneratorMatrix':
g = self._generator_matrix
else:
g = super(LinearCode, self).generator_matrix(encoder_name, **kwargs)
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 2019-06-26 14:41:04.000000000 -0600
+++ src/sage/combinat/finite_state_machine.py 2019-06-27 11:36:38.804783269 -0600
@ -174,9 +198,42 @@ 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/multiset_partition_into_sets_ordered.py.orig src/sage/combinat/multiset_partition_into_sets_ordered.py
--- src/sage/combinat/multiset_partition_into_sets_ordered.py.orig 2019-06-26 14:41:04.000000000 -0600
+++ src/sage/combinat/multiset_partition_into_sets_ordered.py 2019-09-10 12:20:47.787694285 -0600
@@ -1952,7 +1952,7 @@ class OrderedMultisetPartitionsIntoSets(
# slice by 'order'
if "alphabet" in fc:
- no_alpha = {k: v for (k, v) in iteritems(self.constraints) if k is not "alphabet"}
+ no_alpha = {k: v for (k, v) in iteritems(self.constraints) if k != "alphabet"}
return OrderedMultisetPartitionsIntoSets(fc["alphabet"], size, **no_alpha)
# slice by 'size'
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 2019-06-26 14:41:04.000000000 -0600
+++ src/sage/combinat/root_system/branching_rules.py 2019-09-09 15:08:59.383139652 -0600
@@ -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/dict_del_by_value.pyx.orig src/sage/cpython/dict_del_by_value.pyx
--- src/sage/cpython/dict_del_by_value.pyx.orig 2019-06-26 14:41:04.000000000 -0600
+++ src/sage/cpython/dict_del_by_value.pyx 2019-06-27 11:33:54.103080432 -0600
+++ src/sage/cpython/dict_del_by_value.pyx 2019-09-09 15:32:24.921024261 -0600
@@ -291,7 +291,7 @@ ELIF PY_VERSION_HEX>=0x03060000:
#general lookup function (which can deal with DKIX_DUMMY)
PyDict_GetItemWithError(<dict>mp,None)
#this can actually fail if mp is a dictionary with split table
- assert DK_LOOKUP(mp) == lookdict
+ #assert DK_LOOKUP(mp) == lookdict
cdef del_dictitem_by_exact_value(PyDictObject *mp, PyObject *value, Py_hash_t hash):
"""
@@ -347,8 +347,8 @@ ELIF PY_VERSION_HEX>=0x03060000:
cdef MyPyDictKeysObject * keys = <MyPyDictKeysObject *>(mp.ma_keys)
cdef size_t perturb
@ -200,6 +257,67 @@ diff -up src/sage/geometry/triangulation/point_configuration.py.orig src/sage/ge
proc.expect(r'Evaluating Commandline Options \.\.\.')
proc.expect(r'\.\.\. done\.')
proc.setecho(0)
diff -up src/sage/graphs/graph_latex.py.orig src/sage/graphs/graph_latex.py
--- src/sage/graphs/graph_latex.py.orig 2019-06-26 14:41:04.000000000 -0600
+++ src/sage/graphs/graph_latex.py 2019-09-10 12:23:28.891121378 -0600
@@ -1156,7 +1156,7 @@ class GraphLatex(SageObject):
#
elif name in color_dicts:
if not isinstance(value, dict):
- raise TypeError('%s option must be a dictionary, not %s' (name, value))
+ raise TypeError('%s option must be a dictionary, not %s' % (name, value))
else:
for key, c in value.items():
try:
@@ -1165,42 +1165,42 @@ class GraphLatex(SageObject):
raise ValueError('%s option for %s needs to be a matplotlib color (always as a string), not %s' % (name, key, c))
elif name in positive_scalar_dicts:
if not isinstance(value, dict):
- raise TypeError('%s option must be a dictionary, not %s' (name, value))
+ raise TypeError('%s option must be a dictionary, not %s' % (name, value))
else:
for key, x in value.items():
if not type(x) in [int, Integer, float, RealLiteral] or not x >= 0.0:
raise ValueError('%s option for %s needs to be a positive number, not %s' % (name, key, x))
elif name in boolean_dicts:
if not isinstance(value, dict):
- raise TypeError('%s option must be a dictionary, not %s' (name, value))
+ raise TypeError('%s option must be a dictionary, not %s' % (name, value))
else:
for key, b in value.items():
if not isinstance(b, bool):
raise ValueError('%s option for %s needs to be True or False, not %s' % (name, key, b))
elif name == 'vertex_shapes':
if not isinstance(value, dict):
- raise TypeError('%s option must be a dictionary, not %s' (name, value))
+ raise TypeError('%s option must be a dictionary, not %s' % (name, value))
else:
for key, s in value.items():
if s not in shape_names:
raise ValueError('%s option for %s needs to be a vertex shape, not %s' % (name, key, s))
elif name == 'vertex_label_placements':
if not isinstance(value, dict):
- raise TypeError('%s option must be a dictionary, not %s' (name, value))
+ raise TypeError('%s option must be a dictionary, not %s' % (name, value))
else:
for key, p in value.items():
if not(p == 'center') and not(isinstance(p, tuple) and len(p) == 2 and type(p[0]) in number_types and p[0] >= 0 and type(p[1]) in number_types and p[1] >= 0):
raise ValueError('%s option for %s needs to be None or a pair of positive numbers, not %s' % (name, key, p))
elif name == 'edge_label_placements':
if not isinstance(value, dict):
- raise TypeError('%s option must be a dictionary, not %s' (name, value))
+ raise TypeError('%s option must be a dictionary, not %s' % (name, value))
else:
for key, p in value.items():
if not(type(p) in [float, RealLiteral] and (0 <= p) and (p <= 1)) and not(p in label_places):
raise ValueError('%s option for %s needs to be a number between 0.0 and 1.0 or a place (like "above"), not %s' % (name, key, p))
elif name == 'loop_placements':
if not isinstance(value, dict):
- raise TypeError('%s option must be a dictionary, not %s' (name, value))
+ raise TypeError('%s option must be a dictionary, not %s' % (name, value))
else:
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 2019-06-26 14:41:04.000000000 -0600
+++ src/sage/interfaces/frobby.py 2019-06-27 11:33:54.103080432 -0600
@ -314,6 +432,144 @@ diff -up src/sage/interfaces/sagespawn.pyx.orig src/sage/interfaces/sagespawn.py
except (OSError, IOError):
pass
self.fileobj.close()
diff -up src/sage/libs/coxeter3/coxeter.pyx.orig src/sage/libs/coxeter3/coxeter.pyx
--- src/sage/libs/coxeter3/coxeter.pyx.orig 2019-06-26 14:41:05.000000000 -0600
+++ src/sage/libs/coxeter3/coxeter.pyx 2019-09-12 14:57:59.755712128 -0600
@@ -32,7 +32,7 @@ cdef class String:
EXAMPLES::
sage: from sage.libs.coxeter3.coxeter import String # optional - coxeter3
- sage: s = String("hello"); s # optional - coxeter3
+ sage: s = String(b"hello"); s # optional - coxeter3
hello
sage: del s # optional - coxeter3
"""
@@ -43,11 +43,11 @@ cdef class String:
EXAMPLES::
sage: from sage.libs.coxeter3.coxeter import String # optional - coxeter3
- sage: s = String('Hi') # optional - coxeter3
+ sage: s = String(b'Hi') # optional - coxeter3
sage: s # optional - coxeter3
Hi
"""
- return self.x.ptr()
+ return self.x.ptr().decode('utf-8')
def __hash__(self):
"""
@@ -59,7 +59,7 @@ cdef class String:
EXAMPLES::
sage: from sage.libs.coxeter3.coxeter import String # optional - coxeter3
- sage: s = String('hello') # optional - coxeter3
+ sage: s = String(b'hello') # optional - coxeter3
sage: hash(s) == hash('hello') # optional - coxeter3
True
"""
@@ -70,9 +70,9 @@ cdef class String:
EXAMPLES::
sage: from sage.libs.coxeter3.coxeter import String # optional - coxeter3
- sage: ta1 = String('A') # optional - coxeter3
- sage: ta2 = String('A') # optional - coxeter3
- sage: tb = String('b') # optional - coxeter3
+ sage: ta1 = String(b'A') # optional - coxeter3
+ sage: ta2 = String(b'A') # optional - coxeter3
+ sage: tb = String(b'b') # optional - coxeter3
sage: ta1 == ta2 # optional - coxeter3
True
sage: tb != ta1 # optional - coxeter3
@@ -108,7 +108,7 @@ cdef class String:
EXAMPLES::
sage: from sage.libs.coxeter3.coxeter import String # optional - coxeter3
- sage: s = String('Hi') # optional - coxeter3
+ sage: s = String(b'Hi') # optional - coxeter3
sage: len(s) # optional - coxeter3
2
"""
@@ -119,7 +119,7 @@ cdef class String:
EXAMPLES::
sage: from sage.libs.coxeter3.coxeter import String # optional - coxeter3
- sage: s = String('Hi') # optional - coxeter3
+ sage: s = String(b'Hi') # optional - coxeter3
sage: TestSuite(s).run() # optional - coxeter3
"""
return (String, (repr(self),) )
@@ -133,7 +133,7 @@ cdef class Type:
EXAMPLES::
sage: from sage.libs.coxeter3.coxeter import Type # optional - coxeter3
- sage: t = Type('A'); t # optional - coxeter3
+ sage: t = Type(b'A'); t # optional - coxeter3
A
sage: del t # optional - coxeter3
"""
@@ -144,17 +144,17 @@ cdef class Type:
EXAMPLES::
sage: from sage.libs.coxeter3.coxeter import Type # optional - coxeter3
- sage: t = Type('A'); t # optional - coxeter3
+ sage: t = Type(b'A'); t # optional - coxeter3
A
"""
- return self.x.name().ptr()
+ return self.x.name().ptr().decode('utf-8')
def name(self):
"""
EXAMPLES::
sage: from sage.libs.coxeter3.coxeter import Type # optional - coxeter3
- sage: t = Type('A') # optional - coxeter3
+ sage: t = Type(b'A') # optional - coxeter3
sage: t.name() # optional - coxeter3
A
"""
@@ -170,8 +170,8 @@ cdef class Type:
EXAMPLES::
sage: from sage.libs.coxeter3.coxeter import Type # optional - coxeter3
- sage: a = Type('A') # optional - coxeter3
- sage: b = Type('B') # optional - coxeter3
+ sage: a = Type(b'A') # optional - coxeter3
+ sage: b = Type(b'B') # optional - coxeter3
sage: hash(a) == hash(b) # optional - coxeter3
False
sage: d = {a: 1, b: 2} # optional - coxeter3
@@ -183,9 +183,9 @@ cdef class Type:
EXAMPLES::
sage: from sage.libs.coxeter3.coxeter import Type # optional - coxeter3
- sage: ta1 = Type('A') # optional - coxeter3
- sage: ta2 = Type('A') # optional - coxeter3
- sage: tb = Type('b') # optional - coxeter3
+ sage: ta1 = Type(b'A') # optional - coxeter3
+ sage: ta2 = Type(b'A') # optional - coxeter3
+ sage: tb = Type(b'b') # optional - coxeter3
sage: ta1 == ta2 # optional - coxeter3
True
sage: tb != ta1 # optional - coxeter3
@@ -219,7 +219,7 @@ cdef class Type:
EXAMPLES::
sage: from sage.libs.coxeter3.coxeter import Type # optional - coxeter3
- sage: t = Type('A') # optional - coxeter3
+ sage: t = Type(b'A') # optional - coxeter3
sage: TestSuite(t).run() # optional - coxeter3
"""
return (Type, (repr(self), ))
@@ -256,7 +256,7 @@ cdef class CoxGroup(SageObject):
type = type.lower()
rank = rank + 1
- type = 'B' if type == 'C' else type
+ type = b'B' if type == 'C' else type.encode('utf-8')
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 2019-06-26 14:41:05.000000000 -0600
+++ src/sage/misc/parser.pyx 2019-06-27 11:33:54.105080405 -0600
@ -615,6 +871,18 @@ 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/modular/abvar/abvar.py.orig src/sage/modular/abvar/abvar.py
--- src/sage/modular/abvar/abvar.py.orig 2019-06-26 14:41:05.000000000 -0600
+++ src/sage/modular/abvar/abvar.py 2019-09-09 15:08:24.875810751 -0600
@@ -3703,7 +3703,7 @@ class ModularAbelianVariety_abstract(Par
C = self.__complement
except AttributeError:
pass
- if self.dimension() is 0:
+ if self.dimension() == 0:
if A is None:
C = self.ambient_variety()
else:
diff -up src/sage/plot/plot3d/plot3d.py.orig src/sage/plot/plot3d/plot3d.py
--- src/sage/plot/plot3d/plot3d.py.orig 2019-06-26 14:41:05.000000000 -0600
+++ src/sage/plot/plot3d/plot3d.py 2019-06-27 11:33:54.105080405 -0600
@ -695,6 +963,18 @@ diff -up src/sage/rings/integer.pyx.orig src/sage/rings/integer.pyx
x = "" # Force an error below
assert base >= 2
diff -up src/sage/rings/multi_power_series_ring_element.py.orig src/sage/rings/multi_power_series_ring_element.py
--- src/sage/rings/multi_power_series_ring_element.py.orig 2019-06-26 14:41:05.000000000 -0600
+++ src/sage/rings/multi_power_series_ring_element.py 2019-09-09 15:01:45.746217568 -0600
@@ -1417,7 +1417,7 @@ class MPowerSeries(PowerSeries):
# at this stage, self is probably a non-zero
# element of the base ring
for a in range(len(self._bg_value.list())):
- if self._bg_value.list()[a] is not 0:
+ if self._bg_value.list()[a] != 0:
return a
def is_nilpotent(self):
diff -up src/sage/rings/polynomial/pbori.pyx.orig src/sage/rings/polynomial/pbori.pyx
--- src/sage/rings/polynomial/pbori.pyx.orig 2019-06-26 14:41:05.000000000 -0600
+++ src/sage/rings/polynomial/pbori.pyx 2019-06-27 11:33:54.123080154 -0600