In pytest #245, I discovered that distribute does not copy the mode when wrapping stdout in dist.py. This behavior triggered unexpected behavior when the 'mode' attribute wasn't present. It appears as if the TextIOWrapper supports a mode attribute but doesn't necessarily require it. Nevertheless, it seems reasonable that Distribute should copy the mode attribute when wrapping stdout. I can't see any harm in it, and if it provides better compatibility with other library's expectations, I believe it's worthwhile.
Issue #373 new