sagemath/sage

Improve pexpect interface to Singular

slel opened this issue · 10 comments

slel commented

From #30945.

CC: @fchapoton @dimpase @egourgoulhon @embray @kiwifb @mkoeppe @slel @sagetrac-tmonteil @tscrim

Component: interfaces

Author: Frédéric Chapoton

Branch: a10d19d

Reviewer: Travis Scrimshaw, Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/31846

comment:3

Doctest failure also reported by the patchbot:

sage -t --random-seed=0 src/sage/interfaces/expect.py
**********************************************************************
File "src/sage/interfaces/expect.py", line 921, in sage.interfaces.expect.Expect._eval_line
Failed example:
    singular('2+3')
Expected:
    5
Got:
    Singular crashed -- automatically restarting.
    5
**********************************************************************
1 item had failures:
   1 of  16 in sage.interfaces.expect.Expect._eval_line
    [101 tests, 1 failure, 2.92 s]
----------------------------------------------------------------------
sage -t --random-seed=0 src/sage/interfaces/expect.py  # 1 doctest failed
----------------------------------------------------------------------

Reviewer: Travis Scrimshaw

Branch pushed to git repo; I updated commit sha1. New commits:

7e95128Merge branch 'public/singular_pexpect' in 9.4.rc0
a10d19dtrac 31846 fix doctest

Changed commit from 85f65bf to a10d19d

comment:5

I have fixed the doctest.

comment:6

lgtm

Changed reviewer from Travis Scrimshaw to Travis Scrimshaw, Dima Pasechnik

Changed branch from public/singular_pexpect to a10d19d

Changed commit from a10d19d to none

comment:9

What does this improve? Will something break if I revert it?

I ask because:

  • I think this change might be the cause of #33907
  • Also, this change makes singular restart every time singular.interrupt() is called. I think that is what the doctest failure in comment:3 above is telling us. I think other interfaces do not restart after interrupt().
  • comments in #30945 seem to give the impression that it was already fixed by the upgrade of cysignals; was this change really needed to fix or improve something?