Open dimpase opened 3 years ago
Together with #17, the following solves the problem for Sage
--- a/src/sage/libs/gap/libgap.pyx
+++ b/src/sage/libs/gap/libgap.pyx
@@ -253,8 +253,8 @@ cdef class SageGap(Gap):
"""
def __init__(self):
- workspace, _ = get_workspace()
- Gap.__init__(self, gap_root=gap_root(), workspace=workspace,
+ workspace, isitthere = get_workspace()
+ Gap.__init__(self, gap_root=gap_root(), workspace=workspace, workspace_valid=isitthere,
autoload=True)
cpdef initialize(self):
Related also to #1
in https://trac.sagemath.org/ticket/31404 the GAP workspace management is broken (I guess it never worked). Here is how I am trying to fix it:
it might be necessary to pass
Gap.__init__()
the valueworkspace=None
, as only then no attempt is made to load the non-existent workspace, something that leads to a crash ingappy
(see here). (This explains the first chunk of the diff).However, then I cannot overwrite
self.workspace
later, when I'd like to save a new workspace, so the second chunk leads to the errorAn obvious way to handle this would be to change
gappy
code to have one more constructor parameter to tell it whetherworkspace
is legit, rather than try to useworkspace=None
to test this.Can you think of anything better (avoiding modifying
gappy
) ?