[Web-SIG] WSGI for Python 3
Ian Bicking
ianb at colorstudy.com
Sat Jul 17 00:11:35 CEST 2010
On Fri, Jul 16, 2010 at 5:08 PM, Chris McDonough <chrism at plope.com> wrote:
> On Fri, 2010-07-16 at 17:47 -0400, Tres Seaver wrote:
>
> > > In the past when we've gotten down to specifics, the only holdup has
> been
> > > SCRIPT_NAME/PATH_INFO, hence my suggestion to eliminate those.
> >
> > I think I favor PJE's suggestion: let WSGI deal only in bytes.
>
> I'd prefer that WSGI 2 was defined in terms of a "bytes with benefits"
> type (Python 2's ``str`` with an optional encoding attribute as a hint
> for cast to unicode str) instead of Python 3-style bytes.
>
> But if I had to make the Hobson's choice between Python 3 style bytes
> and Python 3 style str, I'd choose bytes. If I then needed to write
> middleware or applications, I'd use WebOb or an equivalent library to
> enable a policy which converted those bytes to strings on my behalf.
> Making it easy to write "raw" middleware or applications without using
> such a library doesn't seem as compelling a goal as being able to easily
> write one which allowed me direct control at the raw level.
>
What are the concrete problems you envision with text request headers, text
(URL-quoted) path, and text response status and headers?
--
Ian Bicking | http://blog.ianbicking.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/web-sig/attachments/20100716/1db38dc4/attachment-0001.html>
More information about the Web-SIG
mailing list