[Twisted-Python] Bytes vs unicode in twisted.python.logfile's python3 porting

Glyph glyph at twistedmatrix.com
Tue Oct 29 18:22:44 MDT 2013


On Oct 27, 2013, at 6:57 AM, Laurens Van Houtven <_ at lvh.io> wrote:

> Hi JP,
> 
> 
> On Sun, Oct 27, 2013 at 2:19 AM, <exarkun at twistedmatrix.com> wrote:
> *Or*, it now occurs to me, just stick with the ASCII-only policy that's already in place.  I'd even say this is more correct since porting isn't supposed to change behavior.  Leave support for some other codec for another ticket (perhaps #989).  Apart from being simpler (I hope) and avoiding breaching the documented porting guidelines, this also means someone will actually have to think about unicode support on Python 2 as well.  Saying we support unicode in the logging system is a lot better than saying we support unicode in the logging system on Python 3 only.
> 
> Did this.
> 
> There's a few Windows-specific bugs left on the ticket that I don't know how to fix, unfortunately.

The new logging branch (destined for review Real Soon Now) is a bit more rigorous about sensible behavior with respect to encoding, so we can tighten up this behavior and make it work in more cases without breaking compatibility.  What you're doing here basically makes sense though.

-glyph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20131029/7ed1dc7b/attachment.html>


More information about the Twisted-Python mailing list