At 06:05 PM 5/8/2009 -0400, James Y Knight wrote:
On May 8, 2009, at 6:00 PM, P.J. Eby wrote:
Compatibility sometimes demands we do silly things. Personally, I
think it's kind of silly that Python 3 files return incompatible
data types depending on what mode you open them in, but there's not
a whole lot we can do about that.
Meanwhile, existing WSGI code ported to Python 3 is going to yield
strings until/unless manually converted; AFAIK 2to3 has no way to
automatically detect WSGI-ness and convert your strings to bytes.
Yes, 2to3 doesn't work for any non-trivial app... You have this same
exact issue with straight-up sockets! Why should WSGI be the
odd-man- out here and accept strings when you should've passed a bytestring,
when nothing else in python 3 does that, and has the exact same
backwards-compat problems?
Hell if I know. I'm just explaining (possibly incorrectly) why the
consensus went that way last time we discussed it here... a
consensus that I thought you were part of actually, but maybe my
memory is faulty. (Hell, it happened so long ago that at one point I
forgot we'd ever discussed it in the first place!)
I'm going back to the sidelines now, to rant about the good old days
when all we had were 'str' and 'unicode' (and we liked it), and then
yell at some teenagers to get off my lawn. ;-)
_______________________________________________
Web-SIG mailing list
Web-SIG@python.org
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe:
http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com