Escape sequence <CSI-?1034h> in doctest output using Xterm/readline

44 views
Skip to first unread message

Markus Wageringel

unread,
Nov 15, 2019, 7:30:27 PM11/15/19
to sage-devel
On CentOS 7.7, I see a large number of doctest failures due to the escape sequence <CSI-?1034h> appearing in the output. For example:

./sage -t --long src/sage/combinat/tableau.py
**********************************************************************
File "src/sage/combinat/tableau.py", line 2850, in sage.combinat.tableau.Tableau.row_stabilizer
Failed example:
    rs
.order() == factorial(3)*factorial(2)
Expected:
   
True
Got:
   
<CSI-?1034h>True
**********************************************************************

This is a problem with readline in combination with xterm. A workaround is to unset $TERM before running the tests. A similar problem was described in #12263.

This can also be avoided by running configure with --with-system-readline=no, so that Sage builds readline 6.3. The system version is 6.2 according to:

sage: import readline
sage
: readline._READLINE_LIBRARY_VERSION
6.2

This problem has only started appearing recently (probably when the system was upgraded from CentOS 7.6 to 7.7) as Sage always built its own readline before.

I am not sure whether this is something for Sage to solve, but maybe this information is useful in case someone has the same problem.

Markus

dic...@invisible-island.net

unread,
Nov 16, 2019, 10:03:32 PM11/16/19
to sage-devel
That 1034 stuff turns on meta-mode, which is not a new feature (about twelve years).
The ncurses FAQ Alt-keys do not work in bash gives some background.
I'd expect unsetting TERM rather than setting it to some less featureful terminal description would be a step backward.

Markus Wageringel

unread,
Nov 16, 2019, 10:53:20 PM11/16/19
to sage-devel
Thank you for the explanation. I confirm that adding set enable-meta-key off to my .inputrc file solves the problem.
Reply all
Reply to author
Forward
0 new messages