This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients barry, ezio.melotti, python-dev, r.david.murray, techtonik, vstinner
Date 2013-06-24.23:59:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1372118376.85.0.151314600536.issue11390@psf.upfronthosting.co.za>
In-reply-to
Content
The new tests added in changeset ae802dc4dcd4 are failing on some buildbots. I can reproduce the issue on my Linux box (Fedora 18). First failure of "./python -m test test_doctest":

[1/1] test_doctest
**********************************************************************
File "/home/haypo/prog/python/default/Lib/test/test_doctest.py", line 2627, in test.test_doctest.test_CLI
Failed example:
    rc1, out1, err1
Expected:
    (0, b'', b'')
Got:
    (0, b'\x1b[?1034h', b'')

The b'\x1b[?1034h' sequence it written by the readline module when it is imported. The readline module is imported by pdb, which is used by doctest.

The following article proposes set to TERM environment variable to "linux" to workaround the issue:
http://reinout.vanrees.org/weblog/2009/08/14/readline-invisible-character-hack.html

It works:

$ echo $TERM  # yeah, Fedora supports 256 colors!
xterm-256color
$ ./python -c 'import readline'|hexdump -C
00000000  1b 5b 3f 31 30 33 34 68                           |.[?1034h|
00000008
$ TERM=linux ./python -c 'import readline'|hexdump -C

This issue was reported to OpenSuse in 2009:
http://lists.opensuse.org/opensuse-bugs/2009-05/msg01633.html

The issue is not specific to Python. Just one another example with Octave (issue closed as "not a bug"):
https://bugzilla.redhat.com/show_bug.cgi?id=304181

The issue was also reported upstream (bug-readline mailing list) a few days ago:
http://lists.gnu.org/archive/html/bug-readline/2013-06/msg00000.html
History
Date User Action Args
2013-06-24 23:59:36vstinnersetrecipients: + vstinner, barry, techtonik, ezio.melotti, r.david.murray, python-dev
2013-06-24 23:59:36vstinnersetmessageid: <1372118376.85.0.151314600536.issue11390@psf.upfronthosting.co.za>
2013-06-24 23:59:36vstinnerlinkissue11390 messages
2013-06-24 23:59:36vstinnercreate