Bug 880393 - Python produces erroneous output when using the "readline" module
Summary: Python produces erroneous output when using the "readline" module
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matej Stuchlik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-26 21:48 UTC by Lars Kellogg-Stedman
Modified: 2016-02-01 02:16 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-02 02:41:44 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Python 19884 None None None Never

Description Lars Kellogg-Stedman 2012-11-26 21:48:27 UTC
Description of problem:

Python produces erroneous characters on stdout if the Python script imports the "readline" module.  This can be a substantial problem in cases where a script is producing output meant to be consumed by another program on stdin.

Version-Release number of selected component (if applicable):

  python-2.7.3-7.2.fc17.x86_64

How reproducible:

  python -c 'import readline' | xxd
  
Actual results:

  0000000: 1b5b 3f31 3033 3468                      .[?1034h

Expected results:

  (no output)

Comment 1 Dave Malcolm 2012-11-27 20:40:25 UTC
This is another instance of bug 593799.

Comment 2 Fedora Admin XMLRPC Client 2013-05-10 05:09:22 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Fedora Admin XMLRPC Client 2013-05-10 05:11:40 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 4 Fedora End Of Life 2013-07-03 20:18:40 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 5 Matthew Miller 2013-07-03 21:56:49 UTC
This is reproducible on F19.

Comment 6 Martin Kosek 2013-12-04 11:14:25 UTC
Hello, any update with this bug? It causes problems in FreeIPA certificate renewal process as it alters the expected output of the script gathering and printing the renewed certificate to standard output (https://fedorahosted.org/freeipa/ticket/4064).

We would really like to see bug fixed or to hear some workaround to avoid putting ugly hacks in our scripts (like the proposed setting of $TERM to vt100).

Comment 7 Bohuslav "Slavek" Kabrda 2013-12-04 12:07:13 UTC
I opened an upstream bug with a solution proposed, I'd like to hear what upstream thinks about this, first.

Comment 8 Antoine Pitrou 2014-05-11 15:14:17 UTC
A heads up as a non-Fedora user, and Python core developer. This issue seems Fedora-specific (I can't reproduce it under Ubuntu) but makes it uselessly painful to write portable software.

Many people use hacky workarounds:

http://stackoverflow.com/questions/15760712/python-readline-module-prints-escape-character-during-import
http://reinout.vanrees.org/weblog/2009/08/14/readline-invisible-character-hack.html
http://lists.gnu.org/archive/html/bug-readline/2007-08/msg00004.html

And lately:

http://bugs.python.org/issue21425#msg218264

Comment 9 Fedora End Of Life 2015-01-09 17:29:42 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Martin Kosek 2015-02-11 14:05:54 UTC
As fas as I know, this is still active issue, bugging also FreeIPA users. So bumping the version.

Comment 11 Bohuslav "Slavek" Kabrda 2015-02-11 14:40:13 UTC
(In reply to Martin Kosek from comment #10)
> As fas as I know, this is still active issue, bugging also FreeIPA users. So
> bumping the version.

AFAICS this has been reported and fixed upstream [1] and I can no longer reproduce it on F21 (python-2.7.8-7.fc21). It is however reproducible on F20 (python-2.7.5-15.fc20) - do you need this to be fixed there?

[1] http://bugs.python.org/issue19884

Comment 12 Fedora Admin XMLRPC Client 2015-05-12 12:03:54 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 13 Fedora End Of Life 2015-11-04 12:02:16 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 14 Fedora End Of Life 2015-12-02 02:41:49 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.