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 serhiy.storchaka
Recipients SilentGhost, jmb236, serhiy.storchaka
Date 2016-04-17.10:55:15
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460890515.84.0.445521285977.issue26756@psf.upfronthosting.co.za>
In-reply-to
Content
Calling the openhook for the stdin will break existing code. Third-party openhooks don't special case the '<stdin>' name, which is legitimate file name.

Instead I recommend to patch sys.stdin explicitly in your program.

    sys.stdin = io.TextIOWrapper(sys.stdin.buffer, errors='replace')
    for line in fileinput.input(openhook=hook):
        ...
History
Date User Action Args
2016-04-17 10:55:15serhiy.storchakasetrecipients: + serhiy.storchaka, SilentGhost, jmb236
2016-04-17 10:55:15serhiy.storchakasetmessageid: <1460890515.84.0.445521285977.issue26756@psf.upfronthosting.co.za>
2016-04-17 10:55:15serhiy.storchakalinkissue26756 messages
2016-04-17 10:55:15serhiy.storchakacreate