From: Alice Bevan–McGregor <al...@gothcandy.com>
Date: Thu, 6 Jan 2011 07:27:50 -0800
Local: Thurs, Jan 6 2011 10:27 am
Subject: Re: [Web-SIG] PEP 444 / WSGI 2 Async
On 2011-01-06 03:53:14 -0800, Antoine Pitrou said:
> Alice Bevan-€“McGregor <alice@...> writes: Just so no-one feels the need to correct me; agronholm made sure I >> GothAlice: ... native string usage, the definition of "byte string" as >> "the format returned by socket read" (which, on Java, is unicode!) ... didn't drink the kool-aid of one article I was reading and basing some ideas on. Java socket ojects us byte-based buffers, not unicode. My bad! > Regardless of the rest, I think the latter would be a large step backwards. +0.5 > Clear distinction between bytes and unicode is a *feature* of Python 3. > Unicode-ignorant programmers should use frameworks which do the encoding work > for them. I'm beginning to agree; with the advent of b'' syntax in 2.6, the only > (by the way, why you are targeting both Python 2 and 3?) For the same reason that Python 3 features are introduced to 2.x; migration. Users are more likely to adopt something that doesn't require them to change production environments, and 3.x is far away from being deployed in production anywhere but on Gentoo, it seems. ;) Broad development and deployment options are a Good Thing™, and with >> agronholm: I'm not very comfortable with the idea of wsgi.input in -1 >> async apps \ I'm just thinking what would happen when you do >> environ['wsgi.input'].read() >> GothAlice: One of two things: in a sync environment, it blocks until it > Er, for the record, in Python 3 non-blocking file objects return None when I'm aware, however that's not practically useful. How would you detect >> agronholm: the requirements of async apps are a big problem -0 >> agronholm: returning magic values from the app sounds like a bad idea >> agronholm: the best solution I can come up with is to have > The idiomatic abstraction for non-blockingness under POSIX is file descriptors. Hmm; I'll have to mull that over. Initial thoughts: having a magic > However, this also means Windows compatibility becomes more complicated, unless +1 for pure futures which (in theory) eliminate the need for dedicated > the fds are sockets. async versions of absolutely everything at the possible cost of slightly higher overhead. - Alice. _______________________________________________ You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||