Re: [PEP 444] Future- and Generator-Based Async Idea

Alice Bevan–McGregor <alice-h+KYGxXtFYrqlBn2x/[email protected]>
Newsgroups gmane.comp.python.web
Message-ID <[email protected]>
On 2011-01-08 06:08:57 -0800, David Stanek said:
> Under the new spec would I be forced to make my applications and 
> middleware this complicated?

An application that does not utilize futures (and thus this proposal 
for async) is different from the current draft as it is written [1] by 
only one word.  Replace 'return' with 'yield' and you're done.

Middleware is somewhat different (if using the decorator or PEP 380 
syntax) or substantially different (if not using either of the two 
mentioned simplifications) as middleware, by definition, needs to 
implement both server and application sides of the "WSGI conversation".

As a side benefit, this should further reduce the perceived mis-use of 
middleware [2,3] by the coercion (by implementation difficulty) of 
inappropriate middleware being reimplemented as functional calls.

> Where is the most up-to-date version of pep444?

I’m in the process right now of completing my transcription of [1] into 
[4].  Upon completion I will re-submit it for incorporation on the 
Python.org website.  (Still marked as draft, of course.)

	- Alice.

[1] https://github.com/GothAlice/wsgi2/blob/master/pep444.textile
[2] http://dirtsimple.org/2007/02/wsgi-middleware-considered-harmful.html
[3] http://mockit.blogspot.com/2009/07/its-all-wrong.html
[4] https://github.com/GothAlice/wsgi2/blob/master/pep-0444.rst


_______________________________________________
Web-SIG mailing list
[email protected]
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: http://mail.python.org/mailman/options/web-sig/gcpw-web-sig%40m.gmane.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.