sagemath: update to 10.6.

This commit is contained in:
Gonzalo Tornaría 2025-01-30 18:06:17 -03:00 committed by Leah Neukirchen
parent e8c2d4427b
commit a9d1700a48
17 changed files with 11 additions and 3663 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,73 +0,0 @@
diff --git a/src/sage/categories/simplicial_sets.py b/src/sage/categories/simplicial_sets.py
index 76030be831b..f30ed0ffeb2 100644
--- a/src/sage/categories/simplicial_sets.py
+++ b/src/sage/categories/simplicial_sets.py
@@ -444,29 +444,31 @@ def covering_map(self, character):
sage: # needs sage.graphs sage.groups
sage: S1 = simplicial_sets.Sphere(1)
- sage: W = S1.wedge(S1)
+ sage: S1_ = simplicial_sets.Sphere(1)
+ sage: S1_.n_cells(1)[0].rename("sigma_1'")
+ sage: W = S1.wedge(S1_)
sage: G = CyclicPermutationGroup(3)
sage: a, b = W.n_cells(1)
sage: C = W.covering_map({a : G.gen(0), b : G.one()}); C
Simplicial set morphism:
From: Simplicial set with 9 non-degenerate simplices
To: Wedge: (S^1 v S^1)
- Defn: [(*, ()), (*, (1,2,3)), (*, (1,3,2)), (sigma_1, ()),
- (sigma_1, ()), (sigma_1, (1,2,3)), (sigma_1, (1,2,3)),
- (sigma_1, (1,3,2)), (sigma_1, (1,3,2))]
- --> [*, *, *, sigma_1, sigma_1, sigma_1, sigma_1, sigma_1, sigma_1]
+ Defn: [(*, ()), (*, (1,2,3)), (*, (1,3,2)), (sigma_1', ()),
+ (sigma_1', (1,2,3)), (sigma_1', (1,3,2)), (sigma_1, ()),
+ (sigma_1, (1,2,3)), (sigma_1, (1,3,2))]
+ --> [*, *, *, sigma_1', sigma_1', sigma_1', sigma_1, sigma_1, sigma_1]
sage: C.domain()
Simplicial set with 9 non-degenerate simplices
sage: C.domain().face_data()
{(*, ()): None,
(*, (1,2,3)): None,
(*, (1,3,2)): None,
+ (sigma_1', ()): ((*, ()), (*, ())),
+ (sigma_1', (1,2,3)): ((*, (1,2,3)), (*, (1,2,3))),
+ (sigma_1', (1,3,2)): ((*, (1,3,2)), (*, (1,3,2))),
(sigma_1, ()): ((*, (1,2,3)), (*, ())),
- (sigma_1, ()): ((*, ()), (*, ())),
(sigma_1, (1,2,3)): ((*, (1,3,2)), (*, (1,2,3))),
- (sigma_1, (1,2,3)): ((*, (1,2,3)), (*, (1,2,3))),
- (sigma_1, (1,3,2)): ((*, ()), (*, (1,3,2))),
- (sigma_1, (1,3,2)): ((*, (1,3,2)), (*, (1,3,2)))}
+ (sigma_1, (1,3,2)): ((*, ()), (*, (1,3,2)))}
"""
from sage.topology.simplicial_set import AbstractSimplex, SimplicialSet
from sage.topology.simplicial_set_morphism import SimplicialSetMorphism
@@ -530,7 +532,9 @@ def cover(self, character):
sage: # needs sage.graphs sage.groups
sage: S1 = simplicial_sets.Sphere(1)
- sage: W = S1.wedge(S1)
+ sage: S1_ = simplicial_sets.Sphere(1)
+ sage: S1_.n_cells(1)[0].rename("sigma_1'")
+ sage: W = S1.wedge(S1_)
sage: G = CyclicPermutationGroup(3)
sage: (a, b) = W.n_cells(1)
sage: C = W.cover({a : G.gen(0), b : G.gen(0)^2})
@@ -538,12 +542,12 @@ def cover(self, character):
{(*, ()): None,
(*, (1,2,3)): None,
(*, (1,3,2)): None,
+ (sigma_1', ()): ((*, (1,3,2)), (*, ())),
+ (sigma_1', (1,2,3)): ((*, ()), (*, (1,2,3))),
+ (sigma_1', (1,3,2)): ((*, (1,2,3)), (*, (1,3,2))),
(sigma_1, ()): ((*, (1,2,3)), (*, ())),
- (sigma_1, ()): ((*, (1,3,2)), (*, ())),
(sigma_1, (1,2,3)): ((*, (1,3,2)), (*, (1,2,3))),
- (sigma_1, (1,2,3)): ((*, ()), (*, (1,2,3))),
- (sigma_1, (1,3,2)): ((*, ()), (*, (1,3,2))),
- (sigma_1, (1,3,2)): ((*, (1,2,3)), (*, (1,3,2)))}
+ (sigma_1, (1,3,2)): ((*, ()), (*, (1,3,2)))}
sage: C.homology(1) # needs sage.modules
Z x Z x Z x Z
sage: C.fundamental_group()

View file

@ -1,70 +0,0 @@
diff --git a/src/sage/libs/eclib/__init__.pxd b/src/sage/libs/eclib/__init__.pxd
index d44d4fba865..2673af0613f 100644
--- a/src/sage/libs/eclib/__init__.pxd
+++ b/src/sage/libs/eclib/__init__.pxd
@@ -55,7 +55,6 @@ cdef extern from "eclib/matrix.h":
cdef cppclass mat:
mat()
mat(mat m)
- scalar* get_entries()
scalar sub(long, long)
long nrows()
long ncols()
@@ -67,7 +66,6 @@ cdef extern from "eclib/smatrix.h":
cdef cppclass smat:
smat()
smat(smat m)
- scalar* get_entries()
scalar sub(long, long)
long nrows()
long ncols()
diff --git a/src/sage/libs/eclib/mat.pyx b/src/sage/libs/eclib/mat.pyx
index bfdeb6ae5c1..989d9d1a70c 100644
--- a/src/sage/libs/eclib/mat.pyx
+++ b/src/sage/libs/eclib/mat.pyx
@@ -11,7 +11,6 @@ from sage.matrix.matrix_integer_sparse cimport Matrix_integer_sparse
from sage.matrix.matrix_integer_dense cimport Matrix_integer_dense
from sage.rings.integer cimport Integer
-
cdef class Matrix:
"""
A Cremona Matrix.
@@ -212,8 +211,7 @@ cdef class Matrix:
<class 'sage.matrix.matrix_integer_dense.Matrix_integer_dense'>
"""
cdef long n = self.nrows()
- cdef long i, j, k
- cdef scalar* v = <scalar*> self.M.get_entries() # coercion needed to deal with const
+ cdef long i, j
cdef Matrix_integer_dense Td
cdef Matrix_integer_sparse Ts
@@ -221,21 +219,19 @@ cdef class Matrix:
# Ugly code...
if sparse:
Ts = MatrixSpace(ZZ, n, sparse=sparse).zero_matrix().__copy__()
- k = 0
for i from 0 <= i < n:
for j from 0 <= j < n:
- if v[k]:
- Ts.set_unsafe(i, j, Integer(v[k]))
- k += 1
+ Mij = Integer(self.M.sub(i+1,j+1))
+ if Mij:
+ Ts.set_unsafe(i, j, Mij)
return Ts
else:
Td = MatrixSpace(ZZ, n, sparse=sparse).zero_matrix().__copy__()
- k = 0
for i from 0 <= i < n:
for j from 0 <= j < n:
- if v[k]:
- Td.set_unsafe(i, j, Integer(v[k]))
- k += 1
+ Mij = Integer(self.M.sub(i+1,j+1))
+ if Mij:
+ Td.set_unsafe(i, j, Mij)
return Td

View file

@ -1,39 +0,0 @@
diff --git a/src/sage/interfaces/singular.py b/src/sage/interfaces/singular.py
index d02ae43149f..447b548c1b8 100644
--- a/src/sage/interfaces/singular.py
+++ b/src/sage/interfaces/singular.py
@@ -1401,7 +1401,7 @@ def _repr_(self):
# this is our cue that singular uses `rp` instead of `ip`
if singular_name_mapping['invlex'] == 'rp' and 'doctest' in str(get_display_manager()):
s = re.sub('^(// .*block.* : ordering )rp$', '\\1ip',
- s, 0, re.MULTILINE)
+ s, flags=re.MULTILINE)
return s
def __copy__(self):
diff --git a/src/sage/misc/cython.py b/src/sage/misc/cython.py
index c542e0d1919..241078d5f2c 100644
--- a/src/sage/misc/cython.py
+++ b/src/sage/misc/cython.py
@@ -380,7 +380,7 @@ def cython(filename, verbose=0, compile_message=False,
cython_messages = re.sub(
"^.*The keyword 'nogil' should appear at the end of the function signature line. "
"Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.\n",
- "", cython_messages, 0, re.MULTILINE)
+ "", cython_messages, flags=re.MULTILINE)
sys.stderr.write(cython_messages)
sys.stderr.flush()
diff --git a/src/sage/rings/ring_extension_morphism.pyx b/src/sage/rings/ring_extension_morphism.pyx
index d4aad7f8253..7294e90c319 100644
--- a/src/sage/rings/ring_extension_morphism.pyx
+++ b/src/sage/rings/ring_extension_morphism.pyx
@@ -461,7 +461,7 @@ cdef class RingExtensionHomomorphism(RingMap):
if self.base_map() is not None:
s += "with map on base ring"
ss = self.base_map()._repr_defn()
- ss = re.sub('\nwith map on base ring:?$', '', ss, 0, re.MULTILINE)
+ ss = re.sub('\nwith map on base ring:?$', '', ss, flags=re.MULTILINE)
if ss != "": s += ":\n" + ss
if s != "" and s[-1] == "\n":
s = s[:-1]

View file

@ -1,58 +0,0 @@
diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py
index bf6d49906de..6c36ab47baf 100644
--- a/src/sage/doctest/forker.py
+++ b/src/sage/doctest/forker.py
@@ -553,6 +553,8 @@ def __init__(self, *args, **kwds):
self.total_walltime_skips = 0
self.total_performed_tests = 0
self.total_walltime = 0
+ if sys.version_info < (3,13):
+ self._stats = self._name2ft
def _run(self, test, compileflags, out):
"""
@@ -830,7 +832,10 @@ def compiler(example):
self.optionflags = original_optionflags
# Record and return the number of failures and tries.
- self._DocTestRunner__record_outcome(test, failures, tries)
+ if sys.version_info < (3,13):
+ self._DocTestRunner__record_outcome(test, failures, tries)
+ else:
+ self._DocTestRunner__record_outcome(test, failures, tries, walltime_skips)
self.total_walltime_skips += walltime_skips
self.total_performed_tests += tries
return TestResults(failures, tries)
@@ -931,7 +936,7 @@ def summarize(self, verbose=None):
sage: from sage.doctest.control import DocTestDefaults; DD = DocTestDefaults()
sage: import doctest, sys, os
sage: DTR = SageDocTestRunner(SageOutputChecker(), verbose=False, sage_options=DD, optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS)
- sage: DTR._name2ft['sage.doctest.forker'] = (1,120)
+ sage: DTR._stats['sage.doctest.forker'] = (1,120)
sage: results = DTR.summarize()
**********************************************************************
1 item had failures:
@@ -946,8 +951,8 @@ def summarize(self, verbose=None):
passed = []
failed = []
totalt = totalf = 0
- for x in self._name2ft.items():
- name, (f, t) = x
+ for x in self._stats.items():
+ name, (f, t, *_) = x
assert f <= t
totalt += t
totalf += f
@@ -972,10 +977,10 @@ def summarize(self, verbose=None):
print(self.DIVIDER, file=m)
print(count_noun(len(failed), "item"), "had failures:", file=m)
failed.sort()
- for thing, (f, t) in failed:
+ for thing, (f, t, *_) in failed:
print(" %3d of %3d in %s" % (f, t, thing), file=m)
if verbose:
- print(count_noun(totalt, "test") + " in " + count_noun(len(self._name2ft), "item") + ".", file=m)
+ print(count_noun(totalt, "test") + " in " + count_noun(len(self._stats), "item") + ".", file=m)
print("%s passed and %s failed." % (totalt - totalf, totalf), file=m)
if totalf:
print("***Test Failed***", file=m)

View file

@ -1,20 +0,0 @@
diff --git a/src/sage/libs/giac/giac.pyx b/src/sage/libs/giac/giac.pyx
index 65279b16504..7c32771bee8 100644
--- a/src/sage/libs/giac/giac.pyx
+++ b/src/sage/libs/giac/giac.pyx
@@ -382,13 +382,8 @@ def _giac(s):
sage: (1+2*sin(3*x)).solve(x).simplify()
...list[-pi/18,7*pi/18]
- sage: libgiac.solve('sin(3*x)>2*sin(x)',x)
- Traceback (most recent call last):
- ...
- RuntimeError: Unable to find numeric values solving equation. For
- trigonometric equations this may be solved using assumptions, e.g.
- assume(x>-pi && x<pi) Error: Bad Argument Value
-
+ sage: libgiac.solve('x^3-x>x',x)
+ list[((x>(-sqrt(2))) and (x<0)),x>(sqrt(2))]
You can also add some hypothesis to a giac symbol::

View file

@ -1,28 +0,0 @@
diff --git a/src/sage/matroids/extension.pyx b/src/sage/matroids/extension.pyx
index 778e6d6ef70..83b792e8d2b 100644
--- a/src/sage/matroids/extension.pyx
+++ b/src/sage/matroids/extension.pyx
@@ -211,6 +211,9 @@ cdef class LinearSubclassesIter:
self._nodes = [first_cut]
+ def __iter__(self):
+ return self
+
def __next__(self):
"""
Return the next linear subclass.
diff --git a/src/sage/matroids/set_system.pyx b/src/sage/matroids/set_system.pyx
index d9a2f631fbf..0bf9cb2b7fa 100644
--- a/src/sage/matroids/set_system.pyx
+++ b/src/sage/matroids/set_system.pyx
@@ -772,6 +772,9 @@ cdef class SetSystemIterator:
self._pointer = -1
self._len = len(H)
+ def __iter__(self):
+ return self
+
def __next__(self):
"""
Return the next subset of a SetSystem.

View file

@ -1,54 +0,0 @@
diff --git a/src/sage/misc/latex_macros.py b/src/sage/misc/latex_macros.py
index fc389b32a72..1cce2fa6f14 100644
--- a/src/sage/misc/latex_macros.py
+++ b/src/sage/misc/latex_macros.py
@@ -43,6 +43,8 @@
contain '\newcommand' lines for each of the entries in ``macros``.
"""
+import importlib
+
def produce_latex_macro(name, *sample_args):
r"""
@@ -69,7 +71,7 @@ def produce_latex_macro(name, *sample_args):
sage: produce_latex_macro('GF', 37)
'\\newcommand{\\GF}[1]{\\Bold{F}_{#1}}'
- If the Sage object is not in the global name space, describe it
+ If the Sage object is not in the global namespace, describe it
like so::
sage: produce_latex_macro('sage.rings.finite_rings.finite_field_constructor.FiniteField', 3)
@@ -84,22 +86,16 @@ def produce_latex_macro(name, *sample_args):
else:
module, real_name = names_split
newcommand = '\\newcommand{\\' + real_name + '}'
- count = 0
- args = "("
- for x in sample_args:
- count += 1
- args += str(x) + ','
- args += ')'
- exec('from ' + module + ' import ' + real_name)
- if count:
- defn = '[' + str(count) + ']{'
- defn += eval('str(LatexCall()(' + real_name + args + '))') + '}'
+ sage_object = getattr(importlib.import_module(module), real_name)
+ if sample_args:
+ defn = '[' + str(len(sample_args)) + ']{'
+ defn += str(LatexCall()(sage_object(*sample_args))) + '}'
else:
- defn = '{' + eval('str(LatexCall()(' + real_name + '))') + '}'
- count = 0
- for x in sample_args:
- count += 1
- defn = defn.replace(str(x), "#" + str(count))
+ defn = '{' + str(LatexCall()(sage_object)) + '}'
+ for i, x in enumerate(sample_args):
+ s = str(x)
+ assert s in defn
+ defn = defn.replace(s, "#" + str(i+1))
return newcommand + defn

View file

@ -1,22 +0,0 @@
diff --git a/src/sage/misc/replace_dot_all.py b/src/sage/misc/replace_dot_all.py
index ea51a9b3159..a43d6c0a929 100644
--- a/src/sage/misc/replace_dot_all.py
+++ b/src/sage/misc/replace_dot_all.py
@@ -194,14 +194,15 @@ def find_replacements(location, package_regex=None, verbose=False):
to_exec = to_exec.replace("'", '').replace('"', '')
if (to_exec[-1] == ','):
to_exec = to_exec[:-1]
- exec(to_exec)
+ glob = dict()
+ exec(to_exec, glob)
except ModuleNotFoundError as err:
print(f'ModuleNotFoundError: {err} found when trying to execute {to_exec}')
except ImportError as err:
print(f'ImportError: {err} found when trying to execute {to_exec}')
try: # try to evaluate the list of module names to get a list of the modules themselves which we can call import_statements on
- modules = eval(to_eval)
+ modules = eval(to_eval, glob)
except NameError as err:
print(f'NameError: {err} found when trying to evaluate {to_eval} at {location}:{row_index + 1}')
except SyntaxError as err:

View file

@ -1,142 +0,0 @@
diff --git a/src/sage/categories/map.pyx b/src/sage/categories/map.pyx
index 43e476847d0..0007555326a 100644
--- a/src/sage/categories/map.pyx
+++ b/src/sage/categories/map.pyx
@@ -275,7 +275,7 @@ cdef class Map(Element):
maps::
sage: phi.domain # needs sage.rings.number_field
- <weakref at ...; to 'NumberField_quadratic_with_category' at ...>
+ <weakref at ...; to '...NumberField_quadratic_with_category' at ...>
sage: phi._make_strong_references() # needs sage.rings.number_field
sage: print(phi.domain) # needs sage.rings.number_field
The constant function (...) -> Number Field in a
@@ -343,7 +343,7 @@ cdef class Map(Element):
maps::
sage: phi.domain # needs sage.rings.number_field
- <weakref at ...; to 'NumberField_quadratic_with_category' at ...>
+ <weakref at ...; to '...NumberField_quadratic_with_category' at ...>
sage: phi._make_strong_references() # needs sage.rings.number_field
sage: print(phi.domain) # needs sage.rings.number_field
The constant function (...) -> Number Field in a
diff --git a/src/sage/misc/bindable_class.py b/src/sage/misc/bindable_class.py
index 743b5a19da6..c23ba0c2c43 100644
--- a/src/sage/misc/bindable_class.py
+++ b/src/sage/misc/bindable_class.py
@@ -113,7 +113,7 @@ class BindableClass(metaclass=ClasscallMetaclass):
Still, documentation works as usual::
sage: outer.Inner.__doc__
- ' some documentation '
+ '...some documentation '
TESTS::
diff --git a/src/sage/misc/sagedoc.py b/src/sage/misc/sagedoc.py
index 0505f6039a9..6147ec4983b 100644
--- a/src/sage/misc/sagedoc.py
+++ b/src/sage/misc/sagedoc.py
@@ -694,7 +694,7 @@ def format(s, embedded=False):
We check that the todo Sphinx extension is correctly activated::
sage: sage.misc.sagedoc.format(sage.combinat.ranker.on_fly.__doc__) # needs sphinx
- " Return ... Todo: add tests as in combinat::rankers\n"
+ "...Return ...Todo: add tests as in combinat::rankers\n"
In the following use case, the ``nodetex`` directive would have been ignored prior
to :issue:`11815`::
@@ -1135,10 +1135,11 @@ def search_src(string, extra1='', extra2='', extra3='', extra4='',
The following produces an error because the string 'fetch(' is a
malformed regular expression::
- sage: print(search_src(" fetch(", "def", interact=False))
- Traceback (most recent call last):
- ...
- error: missing ), unterminated subpattern at position 6
+ sage: try:
+ ....: print(search_src(" fetch(", "def", interact=False))
+ ....: except Exception as e:
+ ....: print(e)
+ missing ), unterminated subpattern at position 6
To fix this, *escape* the parenthesis with a backslash::
@@ -1186,7 +1187,6 @@ def search_src(string, extra1='', extra2='', extra3='', extra4='',
misc/sagedoc.py:... len(search_src("matrix", interact=False).splitlines())...
misc/sagedoc.py:... len(search_src("matrix", module="sage.calculus", interact=False).splitlines())...
misc/sagedoc.py:... len(search_src("matrix", path_re="calc"...
- misc/sagedoc.py:... print(search_src(" fetch(", "def", interact=False))...
misc/sagedoc.py:... print(search_src(r" fetch\(", "def", interact=False))...
misc/sagedoc.py:... print(search_src(r" fetch\(", "def", "pyx", interact=False))...
misc/sagedoc.py:... s = search_src('Matrix', path_re='matrix', interact=False); s.find('x') > 0...
@@ -1456,7 +1456,7 @@ class _sage_doc:
sage: browse_sage_doc._open("reference", testing=True)[0] # needs sagemath_doc_html
'http://localhost:8000/doc/live/reference/index.html'
sage: browse_sage_doc(identity_matrix, 'rst')[-107:-47] # needs sage.modules
- 'Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring'
+ '...Full MatrixSpace of 3 by 3 sparse matrices...'
"""
def __init__(self):
"""
diff --git a/src/sage/misc/sageinspect.py b/src/sage/misc/sageinspect.py
index 585112b5061..12f319fc8e3 100644
--- a/src/sage/misc/sageinspect.py
+++ b/src/sage/misc/sageinspect.py
@@ -1986,7 +1986,7 @@ def sage_getdoc(obj, obj_name='', embedded=False):
sage: from sage.misc.sageinspect import sage_getdoc
sage: sage_getdoc(identity_matrix)[87:124] # needs sage.modules
- 'Return the n x n identity matrix over'
+ '...the n x n identity matrix...'
sage: def f(a, b, c, d=1): return a+b+c+d
...
sage: import functools
diff --git a/src/sage/modular/modsym/modsym.py b/src/sage/modular/modsym/modsym.py
index fb46d0edafa..ed7c9285169 100644
--- a/src/sage/modular/modsym/modsym.py
+++ b/src/sage/modular/modsym/modsym.py
@@ -369,7 +369,7 @@ def ModularSymbols(group=1,
{}
sage: M = ModularSymbols(11,use_cache=True)
sage: sage.modular.modsym.modsym._cache
- {(Congruence Subgroup Gamma0(11), 2, 0, Rational Field): <weakref at ...; to 'ModularSymbolsAmbient_wt2_g0_with_category' at ...>}
+ {(Congruence Subgroup Gamma0(11), 2, 0, Rational Field): <weakref at ...; to '...ModularSymbolsAmbient_wt2_g0_with_category' at ...>}
sage: M is ModularSymbols(11,use_cache=True)
True
sage: M is ModularSymbols(11,use_cache=False)
diff --git a/src/sage/repl/attach.py b/src/sage/repl/attach.py
index b3e20fe61d8..b9997d8f2df 100644
--- a/src/sage/repl/attach.py
+++ b/src/sage/repl/attach.py
@@ -40,7 +40,7 @@
....: traceback.print_exc(file=sys.stdout)
Traceback (most recent call last):
...
- exec(preparse_file(f.read()) + "\n", globals)
+ exec(preparse_file(f.read()) + "\n", globals)...
File "<string>", line 3, in <module>
ValueError: third
sage: detach(src)
@@ -52,7 +52,7 @@
....: traceback.print_exc(file=sys.stdout)
Traceback (most recent call last):
...
- exec(code, globals)
+ exec(code, globals)...
File ".../foobar...sage.py", line ..., in <module>
raise ValueError("third") # this should appear in the source snippet...
ValueError: third
diff --git a/src/sage/repl/rich_output/pretty_print.py b/src/sage/repl/rich_output/pretty_print.py
index 93833e01cd8..8e00e3d70e4 100644
--- a/src/sage/repl/rich_output/pretty_print.py
+++ b/src/sage/repl/rich_output/pretty_print.py
@@ -160,7 +160,7 @@ def pretty_print(self):
sage: seq._concatenate_graphs().show(edge_labels=True) # needs sage.graphs sage.plot
Traceback (most recent call last):
...
- TypeError: ...matplotlib() got an unexpected keyword argument 'edge_labels'
+ TypeError: ...matplotlib() got an unexpected keyword argument 'edge_labels'...
"""
try:
from sage.plot.plot import Graphics

View file

@ -1,36 +0,0 @@
diff --git a/src/sage/misc/temporary_file.py b/src/sage/misc/temporary_file.py
index 998260be8eb..820d5cf2e95 100644
--- a/src/sage/misc/temporary_file.py
+++ b/src/sage/misc/temporary_file.py
@@ -32,7 +32,9 @@
# as the parent for all temporary files & directories created by them.
# This lets us clean up after those two functions when sage exits normally
# using an atexit hook
-TMP_DIR_FILENAME_BASE = tempfile.TemporaryDirectory()
+# Note that `TemporaryDirectory()` will cleanup on program exit;
+# we keep the atexit hook to be redundant, in case that fails.
+TMP_DIR_FILENAME_BASE = tempfile.TemporaryDirectory(prefix='sage_')
atexit.register(lambda: TMP_DIR_FILENAME_BASE.cleanup())
@@ -533,14 +535,15 @@ def spyx_tmp() -> str:
We cache the result of this function "by hand" so that the same
temporary directory will always be returned. A function is used to
delay creating a directory until (if) it is needed. The temporary
- directory is removed when sage terminates by way of an atexit
- hook.
+ directory is automatically removed when sage terminates.
"""
global _spyx_tmp
if _spyx_tmp:
return _spyx_tmp
- d = tempfile.TemporaryDirectory()
- _spyx_tmp = os.path.join(d.name, 'spyx')
- atexit.register(lambda: d.cleanup())
+ # We don't use `tempfile.TemporaryDirectory()` here because it
+ # will be cleaned up on child exit (e.g. for parallel testing)
+ # For some reason this doesn't affect the `TemporaryDirectory`
+ # stored in the global `TMP_DIR_FILENAME_BASE`.
+ _spyx_tmp = tmp_dir(name='spyx_')
return _spyx_tmp

View file

@ -1,36 +0,0 @@
diff --git a/src/sage/functions/special.py b/src/sage/functions/special.py
index 308171af3cd..f511190aeff 100644
--- a/src/sage/functions/special.py
+++ b/src/sage/functions/special.py
@@ -216,11 +216,16 @@ class SphericalHarmonic(BuiltinFunction):
sage: spherical_harmonic(1, 1, pi/2, pi).n() # abs tol 1e-14 # needs sage.symbolic
0.345494149471335
- sage: from scipy.special import sph_harm # NB: arguments x and y are swapped # needs scipy
sage: import numpy as np # needs scipy
sage: if int(np.version.short_version[0]) > 1: # needs scipy
....: np.set_printoptions(legacy="1.25") # needs scipy
- sage: sph_harm(1, 1, pi.n(), (pi/2).n()) # abs tol 1e-14 # needs scipy sage.symbolic
+ sage: import scipy.version
+ sage: if scipy.version.version < '1.15.0':
+ ....: from scipy.special import sph_harm # NB: arguments x and y are swapped # needs scipy
+ ....: sph_harm(1, 1, pi.n(), (pi/2).n()) # abs tol 1e-14 # needs scipy sage.symbolic
+ ....: else:
+ ....: from scipy.special import sph_harm_y # needs scipy
+ ....: sph_harm_y(1, 1, (pi/2).n(), pi.n()).item() # abs tol 1e-9 # needs scipy sage.symbolic
(0.3454941494713355-4.231083042742082e-17j)
Note that this convention differs from the one in Maxima, as revealed by
diff --git a/src/sage/matrix/matrix2.pyx b/src/sage/matrix/matrix2.pyx
index dec25a76e54..31aaf8b8234 100644
--- a/src/sage/matrix/matrix2.pyx
+++ b/src/sage/matrix/matrix2.pyx
@@ -15901,7 +15901,7 @@ cdef class Matrix(Matrix1):
sage: a.exp() # needs sage.symbolic
[ 1/11882424341266*((11*sqrt(227345670387496707609) + 5941212170633)*e^(3/1275529100*sqrt(227345670387496707609)) - 11*sqrt(227345670387496707609) + 5941212170633)*e^(-3/2551058200*sqrt(227345670387496707609) + 101/200) 445243650/75781890129165569203*(sqrt(227345670387496707609)*e^(3/1275529100*sqrt(227345670387496707609)) - sqrt(227345670387496707609))*e^(-3/2551058200*sqrt(227345670387496707609) + 101/200)]
[ 10000/53470909535697*(sqrt(227345670387496707609)*e^(3/1275529100*sqrt(227345670387496707609)) - sqrt(227345670387496707609))*e^(-3/2551058200*sqrt(227345670387496707609) + 101/200) -1/11882424341266*((11*sqrt(227345670387496707609) - 5941212170633)*e^(3/1275529100*sqrt(227345670387496707609)) - 11*sqrt(227345670387496707609) - 5941212170633)*e^(-3/2551058200*sqrt(227345670387496707609) + 101/200)]
- sage: a.change_ring(RDF).exp() # rel tol 6e-14 # needs sage.symbolic
+ sage: a.change_ring(RDF).exp() # rel tol 1e-13 # needs sage.symbolic
[42748127.31532951 7368259.244159399]
[234538976.1381042 40426191.45156228]

View file

@ -1,715 +0,0 @@
diff --git a/src/sage/categories/pushout.py b/src/sage/categories/pushout.py
index a2b5e910257..17f059f967f 100644
--- a/src/sage/categories/pushout.py
+++ b/src/sage/categories/pushout.py
@@ -3925,8 +3925,8 @@ class BlackBoxConstructionFunctor(ConstructionFunctor):
sage: FS = BlackBoxConstructionFunctor(singular)
sage: FS(QQ['t']) # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 1
+ // coefficients: QQ...
+ // number of vars : 1
// block 1 : ordering lp
// : names t
// block 2 : ordering C
diff --git a/src/sage/interfaces/expect.py b/src/sage/interfaces/expect.py
index 91f8efcf651..ff424335d56 100644
--- a/src/sage/interfaces/expect.py
+++ b/src/sage/interfaces/expect.py
@@ -1328,8 +1328,8 @@ def _synchronize(self, cmd='1+%s;\n'):
sage: R.<x> = QQ[]; f = x^3 + x + 1; g = x^3 - x - 1; r = f.resultant(g); gap(ZZ); singular(R)
Integers
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 1
+ // coefficients: QQ...
+ // number of vars : 1
// block 1 : ordering lp
// : names x
// block 2 : ordering C
diff --git a/src/sage/interfaces/interface.py b/src/sage/interfaces/interface.py
index bd1095e8c70..22fb4b8487c 100644
--- a/src/sage/interfaces/interface.py
+++ b/src/sage/interfaces/interface.py
@@ -817,8 +817,8 @@ def __reduce__(self):
sage: S = singular.ring(0, ('x'))
sage: loads(dumps(S))
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 1
+ // coefficients: QQ...
+ // number of vars : 1
// block 1 : ordering lp
// : names x
// block 2 : ordering C
diff --git a/src/sage/interfaces/singular.py b/src/sage/interfaces/singular.py
index d110c17bf16..59d01f4493d 100644
--- a/src/sage/interfaces/singular.py
+++ b/src/sage/interfaces/singular.py
@@ -39,8 +39,8 @@
sage: R1 = singular.ring(0, '(x,y)', 'dp')
sage: R1
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 2
+ // coefficients: QQ...
+ // number of vars : 2
// block 1 : ordering dp
// : names x y
// block 2 : ordering C
@@ -220,12 +220,12 @@
sage: singular.lib('polylib.lib')
sage: singular.ring(32003, '(a,b,c,d,e,f)', 'lp')
- polynomial ring, over a field, global ordering
- // coefficients: ZZ/32003
- // number of vars : 6
- // block 1 : ordering lp
- // : names a b c d e f
- // block 2 : ordering C
+ polynomial ring, over a field, global ordering
+ // coefficients: ZZ/32003...
+ // number of vars : 6
+ // block 1 : ordering lp
+ // : names a b c d e f
+ // block 2 : ordering C
sage: I = singular.ideal('cyclic(6)')
sage: g = singular('groebner(I)')
Traceback (most recent call last):
@@ -1074,8 +1074,8 @@ def ring(self, char=0, vars='(x)', order='lp', check=None):
sage: R = singular.ring(0, '(x,y,z)', 'dp')
sage: R
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 3
+ // coefficients: QQ...
+ // number of vars : 3
// block 1 : ordering dp
// : names x y z
// block 2 : ordering C
@@ -1153,16 +1153,16 @@ def set_ring(self, R):
sage: S = singular.ring('real', '(a,b)', 'lp')
sage: singular.current_ring()
polynomial ring, over a field, global ordering
- // coefficients: Float()
- // number of vars : 2
+ // coefficients: Float()...
+ // number of vars : 2
// block 1 : ordering lp
// : names a b
// block 2 : ordering C
sage: singular.set_ring(R)
sage: singular.current_ring()
polynomial ring, over a field, local ordering
- // coefficients: ZZ/7
- // number of vars : 2
+ // coefficients: ZZ/7...
+ // number of vars : 2
// block 1 : ordering ds
// : names a b
// block 2 : ordering C
@@ -1203,15 +1203,15 @@ def current_ring(self):
sage: r = PolynomialRing(GF(127),3,'xyz', order='invlex')
sage: r._singular_()
polynomial ring, over a field, global ordering
- // coefficients: ZZ/127
- // number of vars : 3
+ // coefficients: ZZ/127...
+ // number of vars : 3
// block 1 : ordering ip
// : names x y z
// block 2 : ordering C
sage: singular.current_ring()
polynomial ring, over a field, global ordering
- // coefficients: ZZ/127
- // number of vars : 3
+ // coefficients: ZZ/127...
+ // number of vars : 3
// block 1 : ordering ip
// : names x y z
// block 2 : ordering C
@@ -1430,8 +1430,8 @@ def __copy__(self):
sage: cpQ.set_ring()
sage: cpQ
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 2
+ // coefficients: QQ...
+ // number of vars : 2
// block 1 : ordering dp
// : names x y
// block 2 : ordering C
@@ -1996,8 +1996,8 @@ def _sage_(self, R=None):
sage: singular('basering')
polynomial ring, over a domain, global ordering
- // coefficients: ZZ
- // number of vars : 3
+ // coefficients: ZZ...
+ // number of vars : 3
// block 1 : ordering lp
// : names x y z
// block 2 : ordering C
@@ -2087,16 +2087,16 @@ def set_ring(self):
sage: S = singular.ring('real', '(a,b)', 'lp')
sage: singular.current_ring()
polynomial ring, over a field, global ordering
- // coefficients: Float()
- // number of vars : 2
+ // coefficients: Float()...
+ // number of vars : 2
// block 1 : ordering lp
// : names a b
// block 2 : ordering C
sage: R.set_ring()
sage: singular.current_ring()
polynomial ring, over a field, local ordering
- // coefficients: ZZ/7
- // number of vars : 2
+ // coefficients: ZZ/7...
+ // number of vars : 2
// block 1 : ordering ds
// : names a b
// block 2 : ordering C
diff --git a/src/sage/libs/singular/function.pyx b/src/sage/libs/singular/function.pyx
index 67cadf5d35c..87f0b7bab69 100644
--- a/src/sage/libs/singular/function.pyx
+++ b/src/sage/libs/singular/function.pyx
@@ -276,8 +276,8 @@ cdef class RingWrap:
sage: l = ringlist(P)
sage: ring = singular_function("ring")
sage: ring(l, ring=P)._output()
- // coefficients: QQ
- // number of vars : 3
+ // coefficients: QQ...
+ // number of vars : 3
// block 1 : ordering dp
// : names x y z
// block 2 : ordering C
diff --git a/src/sage/libs/singular/ring.pyx b/src/sage/libs/singular/ring.pyx
index 1d8dd844385..4f7e288e2ad 100644
--- a/src/sage/libs/singular/ring.pyx
+++ b/src/sage/libs/singular/ring.pyx
@@ -159,8 +159,13 @@ cdef ring *singular_ring_new(base_ring, n, names, term_order) except NULL:
sage: R.<x,y,z> = F[]
sage: from sage.libs.singular.function import singular_function
sage: sing_print = singular_function('print')
- sage: sing_print(R)
- 'polynomial ring, over a field, global ordering\n// coefficients: ZZ/7(a, b)\n// number of vars : 3\n// block 1 : ordering dp\n// : names x y z\n// block 2 : ordering C'
+ sage: print(sing_print(R))
+ polynomial ring, over a field, global ordering
+ // coefficients: ZZ/7(a, b)...
+ // number of vars : 3
+ // block 1 : ordering dp
+ // : names x y z
+ // block 2 : ordering C
::
@@ -168,8 +173,13 @@ cdef ring *singular_ring_new(base_ring, n, names, term_order) except NULL:
sage: R.<x,y,z> = F[]
sage: from sage.libs.singular.function import singular_function
sage: sing_print = singular_function('print')
- sage: sing_print(R)
- 'polynomial ring, over a field, global ordering\n// coefficients: QQ(s, t)\n// number of vars : 3\n// block 1 : ordering dp\n// : names x y z\n// block 2 : ordering C'
+ sage: print(sing_print(R))
+ polynomial ring, over a field, global ordering
+ // coefficients: QQ(s, t)...
+ // number of vars : 3
+ // block 1 : ordering dp
+ // : names x y z
+ // block 2 : ordering C
"""
cdef long cexponent
cdef GFInfo* _param
diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
index adf3df1cf95..bab5935004b 100644
--- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
+++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx
@@ -619,8 +619,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: P._singular_()
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 3
+ // coefficients: QQ...
+ // number of vars : 3
// block 1 : ordering dp
// : names x y z
// block 2 : ordering C
@@ -1182,8 +1182,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: P.<x,y,z> = QQ[]
sage: P._singular_()
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 3
+ // coefficients: QQ...
+ // number of vars : 3
// block 1 : ordering dp
// : names x y z
// block 2 : ordering C
@@ -1198,8 +1198,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: P.<x,y,z> = PolynomialRing(k, 3) # needs sage.rings.finite_rings
sage: P._singular_() # needs sage.rings.finite_rings
polynomial ring, over a field, global ordering
- // coefficients: ZZ/3[a]/(a^3-a+1)
- // number of vars : 3
+ // coefficients: ZZ/3[a]/(a^3-a+1)...
+ // number of vars : 3
// block 1 : ordering dp
// : names x y z
// block 2 : ordering C
@@ -1215,8 +1215,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: P.<x> = QQ[]
sage: P._singular_()
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 1
+ // coefficients: QQ...
+ // number of vars : 1
// block 1 : ordering lp
// : names x
// block 2 : ordering C
@@ -1257,8 +1257,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: P.<x,y,z> = QQ[]
sage: P._singular_init_()
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 3
+ // coefficients: QQ...
+ // number of vars : 3
// block 1 : ordering dp
// : names x y z
// block 2 : ordering C
@@ -1272,8 +1272,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: R.<x,y> = PolynomialRing(NumberField(w^2 + 1,'s')) # needs sage.rings.number_field
sage: singular(R) # needs sage.rings.number_field
polynomial ring, over a field, global ordering
- // coefficients: QQ[s]/(s^2+1)
- // number of vars : 2
+ // coefficients: QQ[s]/(s^2+1)...
+ // number of vars : 2
// block 1 : ordering dp
// : names x y
// block 2 : ordering C
@@ -1281,8 +1281,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: R = PolynomialRing(GF(2**8,'a'),10,'x', order='invlex') # needs sage.rings.finite_rings
sage: singular(R) # needs sage.rings.finite_rings
polynomial ring, over a field, global ordering
- // coefficients: ZZ/2[a]/(a^8+a^4+a^3+a^2+1)
- // number of vars : 10
+ // coefficients: ZZ/2[a]/(a^8+a^4+a^3+a^2+1)...
+ // number of vars : 10
// block 1 : ordering ip
// : names x0 x1 x2 x3 x4 x5 x6 x7 x8 x9
// block 2 : ordering C
@@ -1290,8 +1290,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: R = PolynomialRing(GF(127),2,'x', order='invlex')
sage: singular(R) # needs sage.rings.finite_rings
polynomial ring, over a field, global ordering
- // coefficients: ZZ/127
- // number of vars : 2
+ // coefficients: ZZ/127...
+ // number of vars : 2
// block 1 : ordering ip
// : names x0 x1
// block 2 : ordering C
@@ -1299,8 +1299,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: R = PolynomialRing(QQ,2,'x', order='invlex')
sage: singular(R) # needs sage.rings.function_field
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 2
+ // coefficients: QQ...
+ // number of vars : 2
// block 1 : ordering ip
// : names x0 x1
// block 2 : ordering C
@@ -1308,8 +1308,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: R = PolynomialRing(QQ,2,'x', order='degneglex')
sage: singular(R) # needs sage.rings.function_field
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 2
+ // coefficients: QQ...
+ // number of vars : 2
// block 1 : ordering a
// : names x0 x1
// : weights 1 1
@@ -1320,8 +1320,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: R = PolynomialRing(QQ,'x')
sage: singular(R) # needs sage.rings.function_field
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 1
+ // coefficients: QQ...
+ // number of vars : 1
// block 1 : ordering lp
// : names x
// block 2 : ordering C
@@ -1329,8 +1329,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: R = PolynomialRing(GF(127),'x')
sage: singular(R) # needs sage.rings.finite_rings
polynomial ring, over a field, global ordering
- // coefficients: ZZ/127
- // number of vars : 1
+ // coefficients: ZZ/127...
+ // number of vars : 1
// block 1 : ordering lp
// : names x
// block 2 : ordering C
@@ -1338,8 +1338,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: R = ZZ['x,y']
sage: singular(R) # needs sage.rings.function_field
polynomial ring, over a domain, global ordering
- // coefficients: ZZ
- // number of vars : 2
+ // coefficients: ZZ...
+ // number of vars : 2
// block 1 : ordering dp
// : names x y
// block 2 : ordering C
@@ -1347,8 +1347,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: R = IntegerModRing(1024)['x,y']
sage: singular(R) # needs sage.rings.function_field
polynomial ring, over a ring (with zero-divisors), global ordering
- // coefficients: ZZ/(2^10)
- // number of vars : 2
+ // coefficients: ZZ/(2^10)...
+ // number of vars : 2
// block 1 : ordering dp
// : names x y
// block 2 : ordering C
@@ -1356,8 +1356,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: R = IntegerModRing(15)['x,y']
sage: singular(R) # needs sage.rings.function_field
polynomial ring, over a ring (with zero-divisors), global ordering
- // coefficients: ZZ/...(15)
- // number of vars : 2
+ // coefficients: ZZ/(15)...
+ // number of vars : 2
// block 1 : ordering dp
// : names x y
// block 2 : ordering C
@@ -1367,8 +1367,8 @@ cdef class MPolynomialRing_libsingular(MPolynomialRing_base):
sage: P.<x> = QQ[]
sage: P._singular_init_()
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 1
+ // coefficients: QQ...
+ // number of vars : 1
// block 1 : ordering lp
// : names x
// block 2 : ordering C
diff --git a/src/sage/rings/polynomial/pbori/pbori.pyx b/src/sage/rings/polynomial/pbori/pbori.pyx
index 14a929c3238..404771a2c85 100644
--- a/src/sage/rings/polynomial/pbori/pbori.pyx
+++ b/src/sage/rings/polynomial/pbori/pbori.pyx
@@ -1425,8 +1425,8 @@ cdef class BooleanPolynomialRing(BooleanPolynomialRing_base):
sage: B.<x,y> = BooleanPolynomialRing(2)
sage: B._singular_() # indirect doctest
polynomial ring, over a field, global ordering
- // coefficients: ZZ/2
- // number of vars : 2
+ // coefficients: ZZ/2...
+ // number of vars : 2
// block 1 : ordering lp
// : names x y
// block 2 : ordering C
diff --git a/src/sage/rings/polynomial/polynomial_quotient_ring.py b/src/sage/rings/polynomial/polynomial_quotient_ring.py
index 115647adadf..627765cf8f0 100644
--- a/src/sage/rings/polynomial/polynomial_quotient_ring.py
+++ b/src/sage/rings/polynomial/polynomial_quotient_ring.py
@@ -749,8 +749,8 @@ def _singular_init_(self, S=None):
sage: Q = P.quo([(x^2 + 1)])
sage: singular(Q) # indirect doctest # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 1
+ // coefficients: QQ...
+ // number of vars : 1
// block 1 : ordering lp
// : names xbar
// block 2 : ordering C
diff --git a/src/sage/rings/polynomial/polynomial_singular_interface.py b/src/sage/rings/polynomial/polynomial_singular_interface.py
index 60d2dd74b52..10bbc6d6ec0 100644
--- a/src/sage/rings/polynomial/polynomial_singular_interface.py
+++ b/src/sage/rings/polynomial/polynomial_singular_interface.py
@@ -62,7 +62,7 @@ def _do_singular_init_(singular, base_ring, char, _vars, order):
sage: from sage.rings.polynomial.polynomial_singular_interface import _do_singular_init_
sage: _do_singular_init_(singular, ZZ, 0, 'X', 'dp') # needs sage.libs.singular
(polynomial ring, over a domain, global ordering
- // coefficients: ZZ
+ // coefficients: ZZ...
// number of vars : 1
// block 1 : ordering dp
// : names X
@@ -196,7 +196,7 @@ def _singular_(self, singular=None):
sage: R.<x,y> = PolynomialRing(CC) # needs sage.rings.real_mpfr
sage: singular(R) # needs sage.libs.singular sage.rings.real_mpfr
polynomial ring, over a field, global ordering
- // coefficients: real[I](complex:15 digits, additional 0 digits)/(I^2+1)
+ // coefficients: real[I](complex:15 digits, additional 0 digits)/(I^2+1)...
// number of vars : 2
// block 1 : ordering dp
// : names x y
@@ -205,7 +205,7 @@ def _singular_(self, singular=None):
sage: R.<x,y> = PolynomialRing(RealField(100)) # needs sage.rings.real_mpfr
sage: singular(R) # needs sage.libs.singular sage.rings.real_mpfr
polynomial ring, over a field, global ordering
- // coefficients: Float()
+ // coefficients: Float()...
// number of vars : 2
// block 1 : ordering dp
// : names x y
@@ -215,8 +215,8 @@ def _singular_(self, singular=None):
sage: R.<x> = PolynomialRing(NumberField(w^2 + 1, 's')) # needs sage.rings.number_field
sage: singular(R) # needs sage.libs.singular sage.rings.number_field
polynomial ring, over a field, global ordering
- // coefficients: QQ[s]/(s^2+1)
- // number of vars : 1
+ // coefficients: QQ[s]/(s^2+1)...
+ // number of vars : 1
// block 1 : ordering lp
// : names x
// block 2 : ordering C
@@ -224,8 +224,8 @@ def _singular_(self, singular=None):
sage: R = PolynomialRing(GF(127), 'x', implementation='singular') # needs sage.libs.singular
sage: singular(R) # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: ZZ/127
- // number of vars : 1
+ // coefficients: ZZ/127...
+ // number of vars : 1
// block 1 : ordering dp
// : names x
// block 2 : ordering C
@@ -233,8 +233,8 @@ def _singular_(self, singular=None):
sage: R = PolynomialRing(QQ, 'x', implementation='singular') # needs sage.libs.singular
sage: singular(R) # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 1
+ // coefficients: QQ...
+ // number of vars : 1
// block 1 : ordering dp
// : names x
// block 2 : ordering C
@@ -242,8 +242,8 @@ def _singular_(self, singular=None):
sage: R = PolynomialRing(QQ,'x')
sage: singular(R) # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 1
+ // coefficients: QQ...
+ // number of vars : 1
// block 1 : ordering lp
// : names x
// block 2 : ordering C
@@ -251,8 +251,8 @@ def _singular_(self, singular=None):
sage: R = PolynomialRing(GF(127), 'x')
sage: singular(R) # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: ZZ/127
- // number of vars : 1
+ // coefficients: ZZ/127...
+ // number of vars : 1
// block 1 : ordering lp
// : names x
// block 2 : ordering C
@@ -260,8 +260,8 @@ def _singular_(self, singular=None):
sage: R = Frac(ZZ['a,b'])['x,y']
sage: singular(R) # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ(a, b)
- // number of vars : 2
+ // coefficients: QQ(a, b)...
+ // number of vars : 2
// block 1 : ordering dp
// : names x y
// block 2 : ordering C
@@ -270,8 +270,8 @@ def _singular_(self, singular=None):
sage: R = IntegerModRing(1024)['x,y']
sage: singular(R) # needs sage.libs.singular
polynomial ring, over a ring (with zero-divisors), global ordering
- // coefficients: ZZ/(2^10)
- // number of vars : 2
+ // coefficients: ZZ/(2^10)...
+ // number of vars : 2
// block 1 : ordering dp
// : names x y
// block 2 : ordering C
@@ -279,8 +279,8 @@ def _singular_(self, singular=None):
sage: R = IntegerModRing(15)['x,y']
sage: singular(R) # needs sage.libs.singular
polynomial ring, over a ring (with zero-divisors), global ordering
- // coefficients: ZZ/...(15)
- // number of vars : 2
+ // coefficients: ZZ/(15)...
+ // number of vars : 2
// block 1 : ordering dp
// : names x y
// block 2 : ordering C
@@ -288,8 +288,8 @@ def _singular_(self, singular=None):
sage: R = ZZ['x,y']
sage: singular(R) # needs sage.libs.singular
polynomial ring, over a domain, global ordering
- // coefficients: ZZ
- // number of vars : 2
+ // coefficients: ZZ...
+ // number of vars : 2
// block 1 : ordering dp
// : names x y
// block 2 : ordering C
@@ -297,7 +297,7 @@ def _singular_(self, singular=None):
sage: R = ZZ['x']
sage: singular(R) # needs sage.libs.singular
polynomial ring, over a domain, global ordering
- // coefficients: ZZ
+ // coefficients: ZZ...
// number of vars : 1
// block 1 : ordering lp
// : names x
@@ -310,8 +310,8 @@ def _singular_(self, singular=None):
sage: S = K['y']
sage: singular(S) # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: ZZ/5(x)
- // number of vars : 2
+ // coefficients: ZZ/5(x)...
+ // number of vars : 2
// block 1 : ordering lp
// : names a y
// block 2 : ordering C
@@ -353,8 +353,8 @@ def _singular_init_(self, singular=None):
sage: PolynomialRing(QQ,'u_ba')._singular_init_() # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 1
+ // coefficients: QQ...
+ // number of vars : 1
// block 1 : ordering lp
// : names u_ba
// block 2 : ordering C
diff --git a/src/sage/rings/polynomial/term_order.py b/src/sage/rings/polynomial/term_order.py
index a88568248ce..f8ddd0a9652 100644
--- a/src/sage/rings/polynomial/term_order.py
+++ b/src/sage/rings/polynomial/term_order.py
@@ -660,7 +660,7 @@ def __init__(self, name='lex', n=0, force=False):
sage: R.<x,y,z> = PolynomialRing(QQ, order=T)
sage: R._singular_() # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ
+ // coefficients: QQ...
// number of vars : 3
// block 1 : ordering dp
// : names x y z
@@ -676,7 +676,7 @@ def __init__(self, name='lex', n=0, force=False):
False
sage: S._singular_() # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ
+ // coefficients: QQ...
// number of vars : 3
// block 1 : ordering C
// block 2 : ordering dp
@@ -1661,8 +1661,8 @@ def singular_str(self):
'(lp(3),Dp(5),lp(2))'
sage: P._singular_() # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: ZZ/127
- // number of vars : 10
+ // coefficients: ZZ/127...
+ // number of vars : 10
// block 1 : ordering lp
// : names x0 x1 x2
// block 2 : ordering Dp
@@ -1687,8 +1687,8 @@ def singular_str(self):
'(a(1:2),ls(2),a(1:2),ls(2))'
sage: P._singular_() # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 4
+ // coefficients: QQ...
+ // number of vars : 4
// block 1 : ordering a
// : names x0 x1
// : weights 1 1
@@ -1709,7 +1709,7 @@ def singular_str(self):
sage: P = PolynomialRing(QQ, 4, names='x', order=T)
sage: P._singular_() # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ
+ // coefficients: QQ...
// number of vars : 4
// block 1 : ordering C
// block 2 : ordering a
@@ -1727,7 +1727,7 @@ def singular_str(self):
sage: P = PolynomialRing(QQ, 4, names='y', order=T)
sage: P._singular_() # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ
+ // coefficients: QQ...
// number of vars : 4
// block 1 : ordering c
// block 2 : ordering a
@@ -1745,7 +1745,7 @@ def singular_str(self):
sage: P = PolynomialRing(QQ, 4, names='z', order=T)
sage: P._singular_() # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ
+ // coefficients: QQ...
// number of vars : 4
// block 1 : ordering a
// : names z0 z1
@@ -2183,7 +2183,7 @@ def termorder_from_singular(S):
sage: # needs sage.libs.singular
sage: singular.ring(0, '(x,y,z,w)', '(C,dp(2),lp(2))')
polynomial ring, over a field, global ordering
- // coefficients: QQ
+ // coefficients: QQ...
// number of vars : 4
// block 1 : ordering C
// block 2 : ordering dp
@@ -2201,7 +2201,7 @@ def termorder_from_singular(S):
sage: # needs sage.libs.singular
sage: singular.ring(0, '(x,y,z,w)', '(c,dp(2),lp(2))')
polynomial ring, over a field, global ordering
- // coefficients: QQ
+ // coefficients: QQ...
// number of vars : 4
// block 1 : ordering c
// block 2 : ordering dp
diff --git a/src/sage/rings/quotient_ring.py b/src/sage/rings/quotient_ring.py
index 1043333a63e..45f8147cde9 100644
--- a/src/sage/rings/quotient_ring.py
+++ b/src/sage/rings/quotient_ring.py
@@ -1268,8 +1268,8 @@ def _singular_(self, singular=None):
sage: S = R.quotient_ring(x^2 + y^2)
sage: S._singular_() # needs sage.libs.singular
polynomial ring, over a field, global ordering
- // coefficients: QQ
- // number of vars : 2
+ // coefficients: QQ...
+ // number of vars : 2
// block 1 : ordering dp
// : names x y
// block 2 : ordering C
diff --git a/src/sage/rings/quotient_ring_element.py b/src/sage/rings/quotient_ring_element.py
index 6699ae9f74b..9f05c54f21c 100644
--- a/src/sage/rings/quotient_ring_element.py
+++ b/src/sage/rings/quotient_ring_element.py
@@ -813,8 +813,8 @@ def _singular_(self, singular=None):
sage: Q = P.quo(I)
sage: Q._singular_()
polynomial ring, over a field, global ordering
- // coefficients: ZZ/2
- // number of vars : 2
+ // coefficients: ZZ/2...
+ // number of vars : 2
// block 1 : ordering dp
// : names x y
// block 2 : ordering C

View file

@ -19,7 +19,10 @@ get_pr() {
echo "curl -sL \"$url\" | filterdiff ... > \"$pr-$desc.patch\""
if [ -z "$dry" ]; then
curl -sL "$url" |
filterdiff -p1 -x src/setup.py -x build/* -x src/doc/* |
filterdiff -p1 -i src/* -x src/.* -x src/setup.py -x src/sage/meson.build \
-x src/sage/libs/meson.build -x src/sage/libs/giac/meson.build \
-x src/sage_setup/autogen/giacpy-mkkeywords.py \
-x src/sage_setup/autogen/flint/* -x src/doc/* |
cat > "$pr-$desc.patch"
fi
}
@ -27,23 +30,5 @@ get_pr() {
# run from patches dir
cd $(dirname "$0")
#get_pr 37645 "fix doctest"
#get_pr 37885 "cython warnings"
get_pr 39145 "python 3.13 re.sub"
get_pr 39147 "python 3.13 doctest"
get_pr 39182 "python 3.13 iter"
get_pr 39184 "python 3.13 produce_latex_macro"
get_pr 39185 "python 3.13 find_replacements"
get_pr 39187 "python 3.13 tests output"
get_pr 39201 "python 3.13 fix spyx_tmp"
get_pr 38749 "pari 2.17"
get_pr 38962 "eclib 20241112"
get_pr 39178 "giac 1.9.0.998"
get_pr 39261 "scipy 1.15"
get_pr 39368 "singular 4.4.1"
get_pr 38940 "fix flaky simplicial set test"
#get_pr 39142 "fix alarm tests"
#get_pr 39015 "sage cli"
#get_pr 39616 "ipython 9.0"

View file

@ -1,30 +0,0 @@
A couple of tests that give different (correct) output on 32-bit
diff --git a/src/sage/rings/number_field/bdd_height.py b/src/sage/rings/number_field/bdd_height.py
index 45f08aa4711..b88b315fd01 100644
--- a/src/sage/rings/number_field/bdd_height.py
+++ b/src/sage/rings/number_field/bdd_height.py
@@ -236,7 +236,8 @@ def bdd_norm_pr_ideal_gens(K, norm_list):
sage: from sage.rings.number_field.bdd_height import bdd_norm_pr_ideal_gens
sage: K.<g> = QuadraticField(123)
sage: bdd_norm_pr_ideal_gens(K, range(5))
- {0: [0], 1: [1], 2: [g + 11], 3: [], 4: [2]}
+ {0: [0], 1: [1], 2: [g + 11], 3: [], 4: [2]} # 64-bit
+ {0: [0], 1: [1], 2: [g - 11], 3: [], 4: [2]} # 32-bit
::
diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py
index 61d0b98509a..dab3186cea4 100644
--- a/src/sage/rings/number_field/number_field.py
+++ b/src/sage/rings/number_field/number_field.py
@@ -4827,7 +4827,8 @@ class NumberField_generic(WithEqualityById, number_field_base.NumberField):
sage: K.<a> = NumberField(2*x^2 - 1/3)
sage: K._S_class_group_and_units(tuple(K.primes_above(2) + K.primes_above(3)))
- ([6*a + 2, -6*a + 3, -1, -12*a - 5], [])
+ ([6*a + 2, -6*a + 3, -1, -12*a - 5], []) # 64-bit
+ ([6*a + 2, -6*a - 3, -1, -12*a - 5], []) # 32-bit
"""
K_pari = self.pari_bnf(proof=proof)
S_pari = [p.pari_prime() for p in sorted(set(S))]

View file

@ -1,17 +0,0 @@
--- a/src/sage/rings/number_field/galois_group.py
+++ b/src/sage/rings/number_field/galois_group.py
@@ -994,9 +994,11 @@ class GaloisGroup_v2(GaloisGroup_perm):
sage: x = polygen(ZZ, 'x')
sage: K.<b> = NumberField(x^4 - 2*x^2 + 2, 'a').galois_closure()
sage: G = K.galois_group()
- sage: [G.artin_symbol(P) for P in K.primes_above(7)]
- [(1,5)(2,6)(3,7)(4,8), (1,5)(2,6)(3,7)(4,8),
- (1,4)(2,3)(5,8)(6,7), (1,4)(2,3)(5,8)(6,7)]
+ sage: sorted([G.artin_symbol(P) for P in K.primes_above(7)])
+ [(1,4)(2,3)(5,8)(6,7),
+ (1,4)(2,3)(5,8)(6,7),
+ (1,5)(2,6)(3,7)(4,8),
+ (1,5)(2,6)(3,7)(4,8)]
sage: G.artin_symbol(17)
Traceback (most recent call last):
...

View file

@ -1,7 +1,7 @@
# Template file for 'sagemath'
pkgname=sagemath
version=10.5
revision=2
version=10.6
revision=1
_pypi_version=${version/.beta/b}
_pypi_version=${_pypi_version/.rc/rc}
build_style=python3-pep517
@ -10,14 +10,14 @@ hostmakedepends="pkg-config python3-Cython python3-Jinja2
python3-gmpy2 python3-memory_allocator python3-numpy ecl
python3-cypari2 python3-cysignals python3-devel"
makedepends="boost-devel brial-devel cliquer-devel ecl eclib-devel
ecm-devel fflas-ffpack flintlib-devel gap-devel gd-devel giac-devel glpk-devel
ecm-devel fflas-ffpack flintlib-devel gap-devel gd-devel glpk-devel
gsl-devel iml-devel lcalc-devel libbraiding-devel libhomfly-devel libmpc-devel
libpng-devel linbox-devel m4ri-devel m4rie-devel mpfi-devel
mpfr-devel ntl-devel openblas-devel pari-devel planarity-devel python3-cypari2
python3-cysignals python3-devel python3-gmpy2 python3-memory_allocator
python3-numpy rankwidth-devel singular symmetrica-devel"
depends="eclib-devel fflas-ffpack flintlib-devel gcc-fortran meson gd-devel
gfan giac gsl-devel gzip libpng-devel linbox-devel m4ri-devel maxima-ecl
gfan gsl-devel gzip libpng-devel linbox-devel m4ri-devel maxima-ecl
mpfr-devel nauty ntl-devel palp pari-devel pari-elldata-small pari-galdata
pari-galpol-small pari-seadata-small pkg-config python3-Cython python3-cypari2
python3-cysignals python3-devel python3-fpylll python3-ipython python3-lrcalc
@ -36,7 +36,7 @@ license="GPL-2.0-or-later"
homepage="https://www.sagemath.org/"
changelog="https://github.com/sagemath/sage/releases"
distfiles="${PYPI_SITE}/s/sagemath-standard/sagemath_standard-${_pypi_version}.tar.gz"
checksum=fa0e91cc12754db3cbdf843dbe30252b4378c030825530bc6858ddbcac701096
checksum=0405b9d9f52657969418fc47488ec0cb12fd62c538e50616b11fc9d5c507f9d2
nocross="due to ntl (eclib, singular), fflas-ffpack, givaro, linbox, sympow, maxima"
# main repo `.../src/sage/` is `.../sage/` here