Version 9.8

Also:
- Drop upstreamed patches: -fes-build, -python3.11
- Add patches: -catch-value, -gap-split-root, -bind2nd, -mem-fun-ref
This commit is contained in:
Jerry James 2023-03-13 16:09:59 -06:00
parent a560530636
commit d510b9edac
15 changed files with 553 additions and 1223 deletions

View file

@ -1,6 +1,6 @@
diff -up src/doc/en/thematic_tutorials/lie/weyl_groups.rst.orig src/doc/en/thematic_tutorials/lie/weyl_groups.rst
--- src/doc/en/thematic_tutorials/lie/weyl_groups.rst.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/doc/en/thematic_tutorials/lie/weyl_groups.rst 2023-01-15 17:13:38.581179558 -0700
--- src/doc/en/thematic_tutorials/lie/weyl_groups.rst.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/doc/en/thematic_tutorials/lie/weyl_groups.rst 2023-03-13 09:42:01.111404689 -0600
@@ -139,12 +139,12 @@ string, which you can print::
X.1 1 1 1 1 1 1 1 1 1 1 1 1 1
X.2 1 -1 1 1 -1 1 1 -1 -1 -1 1 1 1
@ -21,9 +21,9 @@ diff -up src/doc/en/thematic_tutorials/lie/weyl_groups.rst.orig src/doc/en/thema
X.11 4 2 . -1 . . . -2 . . 1 . -4
X.12 6 . -2 . . -2 -2 . . . . 2 6
diff -up src/sage/coding/linear_code.py.orig src/sage/coding/linear_code.py
--- src/sage/coding/linear_code.py.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/coding/linear_code.py 2023-01-15 17:13:38.582179539 -0700
@@ -466,7 +466,10 @@ class AbstractLinearCode(AbstractLinearC
--- src/sage/coding/linear_code.py.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/coding/linear_code.py 2023-03-13 09:42:01.112404670 -0600
@@ -465,7 +465,10 @@ class AbstractLinearCode(AbstractLinearC
0
sage: C = codes.HammingCode(GF(4, 'z'), 3)
sage: C.automorphism_group_gens()
@ -35,7 +35,7 @@ diff -up src/sage/coding/linear_code.py.orig src/sage/coding/linear_code.py
Defn: z |--> z + 1),
((z + 1, 1, 1, z, z + 1, z, z, z + 1, z + 1, z + 1, 1, z + 1, z, z, 1, z + 1, 1, z, z + 1, z + 1, z); (1,18,6,19,2,9,17,10,13,14,21,11,4,5,12)(3,20,7,16,8), Ring endomorphism of Finite Field in z of size 2^2
Defn: z |--> z),
@@ -474,19 +477,20 @@ class AbstractLinearCode(AbstractLinearC
@@ -473,19 +476,20 @@ class AbstractLinearCode(AbstractLinearC
Defn: z |--> z)],
362880)
sage: C.automorphism_group_gens(equivalence="linear")
@ -61,7 +61,7 @@ diff -up src/sage/coding/linear_code.py.orig src/sage/coding/linear_code.py
Defn: z |--> z),
((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); (2,13)(3,14)(4,20)(5,11)(8,18)(9,19)(10,15)(16,21), Ring endomorphism of Finite Field in z of size 2^2
Defn: z |--> z)],
@@ -692,10 +696,10 @@ class AbstractLinearCode(AbstractLinearC
@@ -691,10 +695,10 @@ class AbstractLinearCode(AbstractLinearC
sage: C_iso == aut_group_can_label.get_canonical_form()
True
sage: aut_group_can_label.get_autom_gens()
@ -76,9 +76,9 @@ diff -up src/sage/coding/linear_code.py.orig src/sage/coding/linear_code.py
Defn: z |--> z)]
"""
diff -up src/sage/combinat/root_system/hecke_algebra_representation.py.orig src/sage/combinat/root_system/hecke_algebra_representation.py
--- src/sage/combinat/root_system/hecke_algebra_representation.py.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/combinat/root_system/hecke_algebra_representation.py 2023-01-15 17:13:38.583179521 -0700
@@ -355,7 +355,7 @@ class HeckeAlgebraRepresentation(WithEqu
--- src/sage/combinat/root_system/hecke_algebra_representation.py.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/combinat/root_system/hecke_algebra_representation.py 2023-03-13 09:42:01.112404670 -0600
@@ -357,7 +357,7 @@ class HeckeAlgebraRepresentation(WithEqu
sage: q1, q2 = K.gens()
sage: KW = W.algebra(K)
sage: x = KW.an_element(); x
@ -88,8 +88,8 @@ diff -up src/sage/combinat/root_system/hecke_algebra_representation.py.orig src/
sage: T = KW.demazure_lusztig_operators(q1,q2)
sage: T12 = T.Tw( (1,2) )
diff -up src/sage/combinat/symmetric_group_algebra.py.orig src/sage/combinat/symmetric_group_algebra.py
--- src/sage/combinat/symmetric_group_algebra.py.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/combinat/symmetric_group_algebra.py 2023-01-15 17:13:38.583179521 -0700
--- src/sage/combinat/symmetric_group_algebra.py.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/combinat/symmetric_group_algebra.py 2023-03-13 09:42:01.113404652 -0600
@@ -101,7 +101,7 @@ def SymmetricGroupAlgebra(R, W, category
sage: SGA.group()
Weyl Group of type ['A', 3] (as a matrix group acting on the ambient space)
@ -99,9 +99,21 @@ diff -up src/sage/combinat/symmetric_group_algebra.py.orig src/sage/combinat/sym
The preferred way to construct the symmetric group algebra is to
go through the usual ``algebra`` method::
diff -up src/sage/env.py.orig src/sage/env.py
--- src/sage/env.py.orig 2023-03-13 09:26:16.468693261 -0600
+++ src/sage/env.py 2023-03-13 14:09:36.725081542 -0600
@@ -197,7 +197,7 @@ CONWAY_POLYNOMIALS_DATA_DIR = var("CONWA
GRAPHS_DATA_DIR = var("GRAPHS_DATA_DIR", join(SAGE_SHARE, "graphs"))
ELLCURVE_DATA_DIR = var("ELLCURVE_DATA_DIR", join(SAGE_SHARE, "ellcurves"))
POLYTOPE_DATA_DIR = var("POLYTOPE_DATA_DIR", join(SAGE_SHARE, "reflexive_polytopes"))
-GAP_ROOT_DIR = var("GAP_ROOT_DIR", join(SAGE_SHARE, "gap"))
+GAP_ROOT_DIRS = var("GAP_ROOT_DIR", ["/usr/share/gap", "/usr/lib64/gap"])
THEBE_DIR = var("THEBE_DIR", join(SAGE_SHARE, "thebe"))
COMBINATORIAL_DESIGN_DATA_DIR = var("COMBINATORIAL_DESIGN_DATA_DIR", join(SAGE_SHARE, "combinatorial_designs"))
CREMONA_MINI_DATA_DIR = var("CREMONA_MINI_DATA_DIR", join(SAGE_SHARE, "cremona"))
diff -up src/sage/groups/abelian_gps/abelian_group_gap.py.orig src/sage/groups/abelian_gps/abelian_group_gap.py
--- src/sage/groups/abelian_gps/abelian_group_gap.py.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/groups/abelian_gps/abelian_group_gap.py 2023-01-15 17:13:38.583179521 -0700
--- src/sage/groups/abelian_gps/abelian_group_gap.py.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/groups/abelian_gps/abelian_group_gap.py 2023-03-13 09:42:01.113404652 -0600
@@ -338,7 +338,7 @@ class AbelianGroup_gap(UniqueRepresentat
if isinstance(x, AbelianGroupElement_gap):
try:
@ -121,8 +133,8 @@ diff -up src/sage/groups/abelian_gps/abelian_group_gap.py.orig src/sage/groups/a
return Hom(phi)
diff -up src/sage/groups/finitely_presented.py.orig src/sage/groups/finitely_presented.py
--- src/sage/groups/finitely_presented.py.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/groups/finitely_presented.py 2023-01-15 17:13:38.584179501 -0700
--- src/sage/groups/finitely_presented.py.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/groups/finitely_presented.py 2023-03-13 09:42:01.113404652 -0600
@@ -596,9 +596,9 @@ class RewritingSystem():
sage: k = G.rewriting_system()
sage: k.gap()
@ -137,8 +149,8 @@ diff -up src/sage/groups/finitely_presented.py.orig src/sage/groups/finitely_pre
return self._gap
diff -up src/sage/groups/fqf_orthogonal.py.orig src/sage/groups/fqf_orthogonal.py
--- src/sage/groups/fqf_orthogonal.py.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/groups/fqf_orthogonal.py 2023-01-15 17:13:38.584179501 -0700
--- src/sage/groups/fqf_orthogonal.py.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/groups/fqf_orthogonal.py 2023-03-13 09:42:01.114404634 -0600
@@ -143,7 +143,7 @@ class FqfOrthogonalGroup(AbelianGroupAut
[2/3 0 0]
[ 0 2/3 0]
@ -149,8 +161,8 @@ diff -up src/sage/groups/fqf_orthogonal.py.orig src/sage/groups/fqf_orthogonal.p
sage: T = TorsionQuadraticForm(q)
sage: T.orthogonal_group().order()
diff -up src/sage/groups/libgap_wrapper.pyx.orig src/sage/groups/libgap_wrapper.pyx
--- src/sage/groups/libgap_wrapper.pyx.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/groups/libgap_wrapper.pyx 2023-01-15 17:13:38.584179501 -0700
--- src/sage/groups/libgap_wrapper.pyx.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/groups/libgap_wrapper.pyx 2023-03-13 09:42:01.114404634 -0600
@@ -25,7 +25,7 @@ Note how we call the constructor of both
its output via LibGAP::
@ -179,8 +191,8 @@ diff -up src/sage/groups/libgap_wrapper.pyx.orig src/sage/groups/libgap_wrapper.
(f1,)
"""
diff -up src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx.orig src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx
--- src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx 2023-01-15 17:13:38.584179501 -0700
--- src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx 2023-03-13 09:42:01.114404634 -0600
@@ -427,7 +427,7 @@ cdef class LabelledBranching:
sage: from sage.groups.perm_gps.partn_ref2.refinement_generic import LabelledBranching
sage: L = LabelledBranching(3)
@ -191,9 +203,9 @@ diff -up src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx.orig src/sag
sage: L.small_generating_set()
[(1,2,3)]
diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/permgroup.py
--- src/sage/groups/perm_gps/permgroup.py.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/groups/perm_gps/permgroup.py 2023-01-15 17:13:38.585179483 -0700
@@ -927,7 +927,7 @@ class PermutationGroup_generic(FiniteGro
--- src/sage/groups/perm_gps/permgroup.py.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/groups/perm_gps/permgroup.py 2023-03-13 09:42:01.115404615 -0600
@@ -926,7 +926,7 @@ class PermutationGroup_generic(FiniteGro
sage: f = PG._coerce_map_from_(MG)
sage: mg = MG.an_element()
sage: p = f(mg); p
@ -202,7 +214,7 @@ diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/per
sage: PG(p._gap_()) == p
True
@@ -973,12 +973,12 @@ class PermutationGroup_generic(FiniteGro
@@ -972,12 +972,12 @@ class PermutationGroup_generic(FiniteGro
sage: P = G.as_permutation_group(algorithm='smaller', seed=5)
sage: P1 = G.as_permutation_group()
sage: P == P1
@ -218,7 +230,7 @@ diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/per
Another check for :trac:`5583`::
@@ -4375,7 +4375,7 @@ class PermutationGroup_generic(FiniteGro
@@ -4372,7 +4372,7 @@ class PermutationGroup_generic(FiniteGro
sage: G = PermutationGroup([[(1,2,3,4,5)],[(1,2)]]) #S_5 on [1..5]
sage: G.is_transitive([1,4,5])
@ -227,7 +239,7 @@ diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/per
sage: G.is_transitive([2..6])
False
sage: G.is_transitive(G.non_fixed_points())
@@ -4440,7 +4440,7 @@ class PermutationGroup_generic(FiniteGro
@@ -4437,7 +4437,7 @@ class PermutationGroup_generic(FiniteGro
sage: G.is_primitive([1..4])
False
sage: G.is_primitive([1,2,3])
@ -237,8 +249,8 @@ diff -up src/sage/groups/perm_gps/permgroup.py.orig src/sage/groups/perm_gps/per
sage: G.is_primitive(G.non_fixed_points())
True
diff -up src/sage/interfaces/gap.py.orig src/sage/interfaces/gap.py
--- src/sage/interfaces/gap.py.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/interfaces/gap.py 2023-01-15 17:13:38.586179464 -0700
--- src/sage/interfaces/gap.py.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/interfaces/gap.py 2023-03-13 09:42:01.115404615 -0600
@@ -1512,6 +1512,8 @@ def gap_reset_workspace(max_workspace_si
"""
# Create new workspace with filename WORKSPACE
@ -249,8 +261,8 @@ diff -up src/sage/interfaces/gap.py.orig src/sage/interfaces/gap.py
from sage.tests.gap_packages import all_installed_packages
for pkg in all_installed_packages(gap=g):
diff -up src/sage/libs/gap/element.pxd.orig src/sage/libs/gap/element.pxd
--- src/sage/libs/gap/element.pxd.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/libs/gap/element.pxd 2023-01-15 17:13:38.586179464 -0700
--- src/sage/libs/gap/element.pxd.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/libs/gap/element.pxd 2023-03-13 09:42:01.116404597 -0600
@@ -29,9 +29,9 @@ cdef GapElement_Boolean make_GapElement_
cdef GapElement_Function make_GapElement_Function(parent, Obj obj)
cdef GapElement_Permutation make_GapElement_Permutation(parent, Obj obj)
@ -265,8 +277,8 @@ diff -up src/sage/libs/gap/element.pxd.orig src/sage/libs/gap/element.pxd
cdef class GapElement(RingElement):
diff -up src/sage/libs/gap/element.pyx.orig src/sage/libs/gap/element.pyx
--- src/sage/libs/gap/element.pyx.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/libs/gap/element.pyx 2023-01-15 17:13:38.586179464 -0700
--- src/sage/libs/gap/element.pyx.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/libs/gap/element.pyx 2023-03-13 09:42:01.116404597 -0600
@@ -120,7 +120,7 @@ cdef Obj make_gap_matrix(sage_list, gap_
return l.value
@ -356,15 +368,6 @@ diff -up src/sage/libs/gap/element.pyx.orig src/sage/libs/gap/element.pyx
cdef Obj make_gap_record(sage_dict) except NULL:
"""
@@ -264,7 +268,7 @@ cdef Obj make_gap_string(sage_string) ex
try:
GAP_Enter()
b = str_to_bytes(sage_string)
- C_NEW_STRING(result, len(b), b)
+ result = MakeStringWithLen(b, len(b))
return result
finally:
GAP_Leave()
@@ -760,7 +764,7 @@ cdef class GapElement(RingElement):
if self.value == NULL:
return 'NULL'
@ -465,8 +468,8 @@ diff -up src/sage/libs/gap/element.pyx.orig src/sage/libs/gap/element.pyx
if isinstance(i, tuple):
diff -up src/sage/libs/gap/gap_includes.pxd.orig src/sage/libs/gap/gap_includes.pxd
--- src/sage/libs/gap/gap_includes.pxd.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/libs/gap/gap_includes.pxd 2023-01-15 17:13:38.587179445 -0700
--- src/sage/libs/gap/gap_includes.pxd.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/libs/gap/gap_includes.pxd 2023-03-13 09:49:35.192090058 -0600
@@ -13,8 +13,8 @@ from libc.stdint cimport uintptr_t, uint
cdef extern from "gap/system.h" nogil:
@ -591,14 +594,13 @@ diff -up src/sage/libs/gap/gap_includes.pxd.orig src/sage/libs/gap/gap_includes.
- bint IS_STRING(Obj obj)
- bint IsStringConv(Obj obj)
- Obj NEW_STRING(Int)
- void C_NEW_STRING(Obj new_gap_string, int length, char* c_string)
+ Int IS_STRING(Obj obj)
+ Int IsStringConv(Obj obj)
+ Obj NEW_STRING(Int len)
+ Obj MakeStringWithLen(const char *buf, size_t len)
Obj MakeStringWithLen(const char* buf, size_t len)
diff -up src/sage/libs/gap/libgap.pyx.orig src/sage/libs/gap/libgap.pyx
--- src/sage/libs/gap/libgap.pyx.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/libs/gap/libgap.pyx 2023-01-15 17:13:38.587179445 -0700
--- src/sage/libs/gap/libgap.pyx.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/libs/gap/libgap.pyx 2023-03-13 09:42:01.117404579 -0600
@@ -695,7 +695,7 @@ class Gap(Parent):
sage: libgap.List
<Gap function "List">
@ -608,10 +610,58 @@ diff -up src/sage/libs/gap/libgap.pyx.orig src/sage/libs/gap/libgap.pyx
"""
if name in dir(self.__class__):
return getattr(self.__class__, name)
diff -up src/sage/libs/gap/saved_workspace.py.orig src/sage/libs/gap/saved_workspace.py
--- src/sage/libs/gap/saved_workspace.py.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/libs/gap/saved_workspace.py 2023-03-13 12:49:01.821288928 -0600
@@ -8,7 +8,7 @@ workspaces.
import os
import glob
-from sage.env import GAP_ROOT_DIR
+from sage.env import GAP_ROOT_DIRS
from sage.interfaces.gap_workspace import gap_workspace_file
@@ -31,7 +31,9 @@ def timestamp():
"""
libgap_dir = os.path.dirname(__file__)
libgap_files = glob.glob(os.path.join(libgap_dir, '*'))
- gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*'))
+ gap_packages = []
+ for path in GAP_ROOT_DIRS:
+ gap_packages += glob.glob(os.path.join(path, 'pkg', '*'))
files = libgap_files + gap_packages
if len(files) == 0:
print('Unable to find LibGAP files.')
diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx
--- src/sage/libs/gap/util.pyx.orig 2022-09-19 16:38:18.000000000 -0600
+++ src/sage/libs/gap/util.pyx 2023-01-15 17:13:38.587179445 -0700
@@ -362,15 +362,9 @@ cdef Obj gap_eval(str gap_string) except
--- src/sage/libs/gap/util.pyx.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/libs/gap/util.pyx 2023-03-13 14:13:48.497467652 -0600
@@ -173,22 +173,9 @@ def gap_root():
sage: from sage.libs.gap.util import gap_root
sage: gap_root() # random output
- '/home/vbraun/opt/sage-5.3.rc0/local/gap/latest'
+ '/usr/share/gap;/usr/lib64/gap']
"""
- if os.path.exists(sage.env.GAP_ROOT_DIR):
- return sage.env.GAP_ROOT_DIR
-
- # Attempt to figure out the appropriate GAP_ROOT by reading the
- # local/bin/gap shell script; this is an ugly hack that exists for
- # historical reasons; the best approach to setting where Sage looks for
- # the appropriate GAP_ROOT is to set the GAP_ROOT_DIR variable
- SAGE_LOCAL = sage.env.SAGE_LOCAL
- with open(os.path.join(SAGE_LOCAL, 'bin', 'gap')) as f:
- gap_sh = f.read().splitlines()
- gapdir = next(x for x in gap_sh if x.strip().startswith('GAP_ROOT'))
- gapdir = gapdir.split('"')[1]
- gapdir = gapdir.replace('$SAGE_LOCAL', SAGE_LOCAL)
- return gapdir
+ return ';'.join(sage.env.GAP_ROOT_DIRS)
# To ensure that we call initialize_libgap only once.
@@ -362,15 +349,9 @@ cdef Obj gap_eval(str gap_string) except
GAPError: Error, Variable: 'Complex' must have a value
Syntax error: ; expected in stream:1
Complex Field with 53 bits of precision;;
@ -628,7 +678,7 @@ diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx
Error, Variable: 'precision' must have a value
Test that on a subsequent attempt we get the same message (no garbage was
@@ -388,7 +382,7 @@ cdef Obj gap_eval(str gap_string) except
@@ -388,7 +369,7 @@ cdef Obj gap_eval(str gap_string) except
"""
initialize()
cdef Obj result
@ -638,8 +688,8 @@ diff -up src/sage/libs/gap/util.pyx.orig src/sage/libs/gap/util.pyx
# Careful: We need to keep a reference to the bytes object here
# so that Cython doesn't deallocate it before GAP is done with
diff -up src/sage/tests/gap_packages.py.orig src/sage/tests/gap_packages.py
--- src/sage/tests/gap_packages.py.orig 2022-09-19 16:38:19.000000000 -0600
+++ src/sage/tests/gap_packages.py 2023-01-15 17:13:38.587179445 -0700
--- src/sage/tests/gap_packages.py.orig 2023-02-11 06:25:15.000000000 -0700
+++ src/sage/tests/gap_packages.py 2023-03-13 09:42:01.117404579 -0600
@@ -103,7 +103,7 @@ def all_installed_packages(ignore_dot_ga
sage: from sage.tests.gap_packages import all_installed_packages