Serhiy Storchaka added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30526>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to