Author serhiy.storchaka
Recipients benjamin.peterson, ncoghlan, pitrou, serhiy.storchaka, stutzbach
Date 2017-06-01.10:41:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1496313690.08.0.285440562054.issue30526@psf.upfronthosting.co.za>
In-reply-to
Content
First at all, I'm not sure that allowing to modify TextIOWrapper settings after creation is a good idea. I would be feeling uncomfortable if the third-party library changed the buffering or encoding settings of passed text stream for its own needs, and this stream is sys.stdout. For example set f.line_buffering = False for performance and break your logging. Creating a new TextIOWrapper for own needs looks safer. But changing the global state is the essential part of Nick's and your issues.

This could have long-term consequences, so it is worth to discuss the principle on the Python-Dev mailing list before applying the changes.
History
Date User Action Args
2017-06-01 10:41:30serhiy.storchakasetrecipients: + serhiy.storchaka, ncoghlan, pitrou, benjamin.peterson, stutzbach
2017-06-01 10:41:30serhiy.storchakasetmessageid: <1496313690.08.0.285440562054.issue30526@psf.upfronthosting.co.za>
2017-06-01 10:41:30serhiy.storchakalinkissue30526 messages
2017-06-01 10:41:29serhiy.storchakacreate