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 <>
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/", line 2627, in test.test_doctest.test_CLI
Failed example:
    rc1, out1, err1
    (0, b'', b'')
    (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:

It works:

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

This issue was reported to OpenSuse in 2009:

The issue is not specific to Python. Just one another example with Octave (issue closed as "not a bug"):

The issue was also reported upstream (bug-readline mailing list) a few days ago:
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: <>
2013-06-24 23:59:36vstinnerlinkissue11390 messages
2013-06-24 23:59:36vstinnercreate