Re: [Web-SIG] Session interface

2005-08-16 Thread Robert Brewer
to a wider audience. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ 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

Re: [Web-SIG] Sessions and Headers

2005-12-01 Thread Robert Brewer
environments plug into by initializing the object with an environment dictionary, a file to read the user data from (for posts and whatnot), and then a write function that gives direct control to returning the request output to the user. Congratulations, you just reinvented WSGI. ;) Robert Brewer

Re: [Web-SIG] WSGI thread affinity/interleaving

2005-12-19 Thread Robert Brewer
. Sort of an async-to-threaded bridge. I would think, even if you chose not to build that into your WSGI wrapper, that it would be generic enough to be quite useful for any async server + threaded app. I'll refrain from any predictions about performance, however... ;) Robert Brewer System Architect

Re: [Web-SIG] Standardized template API

2006-01-31 Thread Robert Brewer
their primary value lies in their Pythonic API, then a common proxy interface will be perceived as reducing their value. All of which is to say, there's as much of a social issue to solve here as there is a technical issue. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED

Re: [Web-SIG] Who is responsible for SCRIPT_NAME?

2006-02-07 Thread Robert Brewer
mounted at root so SCRIPT_NAME can always be . I haven't adopted this interpretation, because in my mind, middleware isn't mounted anywhere--it's a filter for the end app(s). So which one is the correct interpretation, 1 or 2? Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED

Re: [Web-SIG] WSGI in standard library

2006-02-14 Thread Robert Brewer
, etc. There are simply too many variables involved in building a WSGI handler appropriate for your environment; trying to do that by subclassing wsgiref.handlers.* results in extremely complicated and slow code. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED

Re: [Web-SIG] WSGI in standard library

2006-02-14 Thread Robert Brewer
Alan Kennedy wrote: [Robert Brewer] Look at the right code and see if your gut feeling changes. ;) I looked at http://svn.cherrypy.org/trunk/cherrypy/_cphttpserver.py As indicated by Ian in this message http://mail.python.org/pipermail/web-sig/2006-February/002074.html Sorry

Re: [Web-SIG] httpy -- raise Response(409)

2006-03-06 Thread Robert Brewer
is educating users: not every *exception* is an *error*. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman

Re: [Web-SIG] Encoding

2006-03-18 Thread Robert Brewer
code('utf-8')) f.close() 1. Have you examined the response headers on a request for Japanese content and verified that the response is encoded in UTF-8? 2. Why decode it just to turn around and encode it again with the same encoding? Robert Brewer System Architect Amor Mini

Re: [Web-SIG] Implementing WSGI server as ASP.NET handler

2006-03-30 Thread Robert Brewer
-10-299287.html You'll also probably want to use ReadBinary to handle non-text files. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe

[Web-SIG] WSGI unquoting rules

2006-08-06 Thread Robert Brewer
wsgiref.simpleserver and most other WSGI servers in the wild. Shouldn't the spec define this explicitly? Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig

Re: [Web-SIG] WSGI: read method

2006-09-08 Thread Robert Brewer
by that? Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ 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

Re: [Web-SIG] WSGI and long response header values

2006-09-08 Thread Robert Brewer
Title: RE: [Web-SIG] WSGI and long response header values Phillip J. Eby wrote: Robert Brewer wrote: So in my reading of HTTP, some code somewhere should introduce newlines in longish, encoded response header values. I see three options: 1. Keep things as they are and disallow

Re: [Web-SIG] WSGI and long response header values

2006-09-08 Thread Robert Brewer
Title: RE: [Web-SIG] WSGI and long response header values James Y Knight wrote: On Sep 8, 2006, at 7:22 PM, Robert Brewer wrote: Bah. I knew I forgot a constraint in there (the strings have to be encoded by the app). Personally, I think the separate-by-spaces cure is worse than

Re: [Web-SIG] WSGI and long response header values

2006-09-08 Thread Robert Brewer
-encoding is broken from the get-go. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ 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

Re: [Web-SIG] wsgi.url_vars feedback

2006-10-31 Thread Robert Brewer
for that item? I'm currently saying they must put in a list/tuple or dict. I would've thought they'd just leave out the entry altogether. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http

[Web-SIG] wsgi.url_vars feedback

2006-11-01 Thread Robert Brewer
expect various dispatchers can never produce either args or kwargs, then why not go with a pair of independent entries: wsgi.dispatch_args and wsgi.dispatch_kwargs? That would make the omission of one or the other much more natural for both the sender and receiver. Robert Brewer System Architect Amor

Re: [Web-SIG] New spec: throw_errors

2006-11-14 Thread Robert Brewer
item per app: throw_errors = True ...I now have to present the deployer with a more-confusing and more tightly-coupled option: ignore_wsgiorg_throw_errors = True If both the protocol and my app's API are now more complicated, what have we gained? Robert Brewer System Architect Amor

Re: [Web-SIG] WSGI, cgi.FieldStorage incompatibility

2006-11-28 Thread Robert Brewer
pretty bad. What can I do to speed up this process? Write a change proposal for the WSGI spec? Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig

Re: [Web-SIG] WSGI multi threading indications?

2007-01-08 Thread Robert Brewer
). If you use mod_python (3.1 or better) instead of proxy/rewrite, you can inspect apache.mpm_query(apache.AP_MPMQ_IS_THREADED) and apache.mpm_query(apache.AP_MPMQ_IS_FORKED) as http://projects.amor.org/misc/wiki/ModPythonGateway does. Robert Brewer System Architect Amor Ministries [EMAIL

Re: [Web-SIG] WSGI input filter that changes content length.

2007-01-15 Thread Robert Brewer
. But as you've noticed, that doesn't mean it's easy. ;) Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman

Re: [Web-SIG] Repeating slashes in REQUEST_URI, SCRIPT_NAME and PATH_INFO.

2007-01-28 Thread Robert Brewer
SCRIPT_NAME (and telling its users it was limited in that way). Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org

[Web-SIG] The web dudes pad is open for business

2007-02-22 Thread Robert Brewer
. The jacuzzi's open, too, if you brought trunks. Feel free to drop by anytime; but call me first: 619 846-5585 (they lock everything around here). I'm here 'til Monday morning. Robert Brewer CherryPy Team ___ Web-SIG mailing list Web-SIG@python.org

Re: [Web-SIG] more comments on Paste Deploy

2007-03-03 Thread Robert Brewer
, and deploy single-framework sites. In short, I'm pushing for: read conf - apply conf - del conf - work with objects as opposed to the much more tightly-coupled and hard-to-use: read conf - work with a mix of conf and objects forever Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED

Re: [Web-SIG] daemon tools

2007-03-03 Thread Robert Brewer
by a good Web Site Engine Interface spec. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ 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

Re: [Web-SIG] Chunked Tranfer encoding on request content.

2007-03-04 Thread Robert Brewer
of a chunked transfer encoding header. Not sure if this is actually a bug or not. It looks like a bug. The Expect header should be checked before decode_chunked (at least until the 100 response can be moved inside read()). Thanks for catching those! Robert Brewer System Architect Amor Ministries [EMAIL

Re: [Web-SIG] daemon tools

2007-03-05 Thread Robert Brewer
of which seemed as appealing as zdaemon for various reasons. and Robert Brewer replied: The user interface isn't Python-specific, but the interaction with WSGI servers, middleware, applications, and frameworks should be. and Jim answered: I don't think we are talking about the same thing

Re: [Web-SIG] Proposal: Avoiding Serialization When Stacking Middleware

2007-03-06 Thread Robert Brewer
each time its underlying application yields a value. If the middleware cannot yield any other value, it must yield an empty string. I suspect rewriting the example to conform to PEP 333 will make this proposal much more complex? Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED

Re: [Web-SIG] daemon tools

2007-03-07 Thread Robert Brewer
Jim Fulton wrote: On Mar 5, 2007, at 1:38 PM, Robert Brewer wrote: ...where the pywebd module: 1. Composes the WSGI stack (provides a library to do so at least), 2. Notifies frameworks of site-wide events (like start, stop, restart and graceful), 3. Provides plugins

Re: [Web-SIG] more comments on Paste Deploy

2007-03-07 Thread Robert Brewer
://www.cherrypy.org/wiki/WSGI for example, which shows all of the places you can connect foreign WSGI components with CherryPy WSGI components. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Web-SIG mailing list Web-SIG@python.org Web

Re: [Web-SIG] WSGI server/adapter and sys.exit()/SystemExit exception.

2007-03-07 Thread Robert Brewer
, I would expect a command-line arg or config entry which controlled whether or not to plug in the autoreloader. Finally, when deploying from CherryPy itself, it plugs in (and configures) the autoreloader based on the existing CherryPy config semantics. Robert Brewer System Architect Amor Ministries

Re: [Web-SIG] more comments on Paste Deploy

2007-03-07 Thread Robert Brewer
Jeff Shell wrote: On 3/7/07, Robert Brewer [EMAIL PROTECTED] wrote: Jeff Shell wrote: Configuration and deployment? I'm trying to understand the scope of these terms (or this combined term) better. I take it 'configuration' means just how an 'app' might publish itself

Re: [Web-SIG] Internal redirect using Location with absolute pathand status of 200.

2007-05-26 Thread Robert Brewer
consider itself to be like an HTTP gateway server, with the application being an HTTP origin server. (See RFC 2616, section 1.3, for the definition of these terms.) Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Web-SIG

[Web-SIG] Web Site Process Bus

2007-06-25 Thread Robert Brewer
, is there a better name for the spec effort than WSPB? I have lots of other questions, but I'll let you all ask them. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] [1] http://www.aminus.org/blogs/index.php/fumanchu/2007/06/24/web_site_proce ss_bus

Re: [Web-SIG] Web Site Process Bus

2007-06-25 Thread Robert Brewer
Phillip J. Eby wrote: At 10:57 AM 6/25/2007 -0700, Robert Brewer wrote: This should be a collaborative effort, and I'm very open to discussion at all levels of detail. Even if this flies at the highest conceptual level, there are still several things I know of we would need to nail down

Re: [Web-SIG] Web Site Process Bus

2007-06-25 Thread Robert Brewer
Phillip J. Eby wrote: At 01:51 PM 6/25/2007 -0700, Robert Brewer wrote: Seriously, though, this handles the notification but not the state machine, which I think is critical to the effort. It also doesn't do any error-handling for misbehaving subscribers, so not all subscribers

Re: [Web-SIG] Web Site Process Bus

2007-06-25 Thread Robert Brewer
. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ 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

Re: [Web-SIG] Web Site Process Bus

2007-06-26 Thread Robert Brewer
deployers who aren't familiar with Apache to get their site up and running faster. However, mod_wsgi can still use Apache directives for attaching/detaching the listeners if it likes, providing a more Apache-like look-and-feel. Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED

Re: [Web-SIG] Web Site Process Bus

2007-06-26 Thread Robert Brewer
Phillip J. Eby wrote: At 02:17 PM 6/25/2007 -0700, Robert Brewer wrote: Phillip J. Eby wrote: At 01:51 PM 6/25/2007 -0700, Robert Brewer wrote: For example, if an error occurs, isn't that an indication that the component is broken? Masking the failure just makes it less likely

Re: [Web-SIG] Web Site Process Bus

2007-06-27 Thread Robert Brewer
for WSPBus. Note that IReactorCore.stop raises an error if not core.running, too. I'll also note in passing that Twisted during and after triggers log on error but don't crash... Robert Brewer System Architect Amor Ministries [EMAIL PROTECTED] ___ Web-SIG

[Web-SIG] Another WSGI gotcha to be aware of

2007-08-25 Thread Robert Brewer
that every application provide its resource- releasing endpoint via some means other than a successful response. I'm sure you all can come up with other solutions. Robert Brewer [EMAIL PROTECTED] ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http

Re: [Web-SIG] Another WSGI gotcha to be aware of

2007-08-25 Thread Robert Brewer
Phillip J. Eby wrote: At 11:45 PM 8/24/2007 -0700, Robert Brewer wrote: However, and here's the rub, if nextapp() raises an exception, **self.response is never bound**, and therefore we have no handle to the object we need to close. Note that this is not a middleware-only problem; servers

Re: [Web-SIG] multi-threaded or multi-process wsgi apps

2007-11-26 Thread Robert Brewer
. Robert Brewer [EMAIL PROTECTED] ___ 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

Re: [Web-SIG] multi-threaded or multi-process wsgi apps

2007-11-26 Thread Robert Brewer
Graham Dumpleton wrote: On 27/11/2007, Robert Brewer [EMAIL PROTECTED] wrote: Chris Withers wrote: Right, I'm curious as to how wsgi applications end up being multi-threaded or multi-process and if they are, how they share resources such as databases and configuration. There's

Re: [Web-SIG] serving (potentially large) files through wsgi?

2007-12-17 Thread Robert Brewer
Chris Withers wrote: Robert Brewer wrote: Apache will interfere, and try to re-apply the range to whatever you emit. The only solution we've found so far is to tell the app to ignore any 'Range' request header when running behind Apache, and just let Apache have its way. See http

Re: [Web-SIG] URL quoting in WSGI (or the lack therof)

2008-01-19 Thread Robert Brewer
the benefit? I only see a con: every piece of middleware that cares has to repeat the decoding of PATH_INFO and SCRIPT_NAME, wasting CPU and memory. Robert Brewer wrote: I changed CP's wsgiserver to do decoding that very day. So I think the answer is yes. IMHO yes is the wrong answer Why? I am

Re: [Web-SIG] URL quoting in WSGI (or the lack therof)

2008-01-21 Thread Robert Brewer
Luis Bruno wrote: Robert Brewer wrote: IMHO [changing CP's wsgiserver to do decoding] is the wrong answer Why? Because then I'm stuck monkey patching every WSGI server (and/or stuck using my own URL dispatcher) so that I don't lose the information that one of the forward slashes

Re: [Web-SIG] Merge Cookie and cookielib?

2008-02-05 Thread Robert Brewer
. Robert Brewer [EMAIL PROTECTED] ___ 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

[Web-SIG] Web Dev Pad

2008-03-08 Thread Robert Brewer
libraries, servers, or frameworks (or their friends; don't let domain boundaries stop you ;). Robert Brewer [EMAIL PROTECTED] 619 374 1117 [1] http://www.marriott.com/hotels/travel/chibr-renaissance-chicago-ohare-su ites-hotel/ ___ Web-SIG mailing list Web

Re: [Web-SIG] Time a for JSON parser in the standard library?

2008-03-24 Thread Robert Brewer
as a string for example, because the other end is probably going to parse JSON numbers as doubles. Thanks for allowing that; the last 3 JSON projects I've been involved with have had Python on both ends, and always passed Decimal, never floating-point. Robert Brewer [EMAIL PROTECTED

Re: [Web-SIG] Clarifications on Python 3.0 and WSGI.

2008-03-25 Thread Robert Brewer
/decoding must be handled by the application, so we made the CP WSGI server pass 2047-encoded request headers through unmodified. FYI, there's been a lot of talk lately on the http-bis WG about using some mechanism other than RFC 2047 in the future. Robert Brewer [EMAIL PROTECTED] [1] http

Re: [Web-SIG] Time a for JSON parser in the standard library?

2008-04-05 Thread Robert Brewer
() to choose would be even better. Robert Brewer [EMAIL PROTECTED] ___ 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

Re: [Web-SIG] Time a for JSON parser in the standard library?

2008-04-06 Thread Robert Brewer
John Millikin wrote: On Sat, Apr 5, 2008 at 7:01 PM, Robert Brewer [EMAIL PROTECTED] wrote: Re: Representation of Fractional Numbers, there are two solutions. If you return decimals, people using JS on the other end are going to call float(d). If you return floats, people not using JS

Re: [Web-SIG] [proposal] merging jsonrpc into xmlrpc

2008-04-08 Thread Robert Brewer
with application state, but it makes for a good transition strategy from existing RPC mechanisms. Robert Brewer [EMAIL PROTECTED] ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http

Re: [Web-SIG] Alternative to threading.local, based on the stack

2008-07-04 Thread Robert Brewer
, cherrypy.serving _is_ a threadlocal object. But I don't imagine it would be difficult for a non-threaded HTTP server to replace cherrypy.serving with some other-context-local if they liked. Robert Brewer [EMAIL PROTECTED] ___ Web-SIG mailing list Web-SIG@python.org

Re: [Web-SIG] Alternative to threading.local, based on the stack

2008-07-07 Thread Robert Brewer
Matt Goodall wrote: Yes, it can be tedious but I believe explicit arg passing is necessary to make code readable, testable and reusable. ... I've made the mistake of relying on magic contexts in the past. I'm still trying to fix things. Can you elaborate? Robert Brewer [EMAIL PROTECTED

Re: [Web-SIG] Alternative to threading.local, based on the stack

2008-07-08 Thread Robert Brewer
to implement request-local storage by using the environ, it would call set_local_implementation with an imp function that closes over the environ for each request. And what package does requestlocal.py live in? Robert Brewer [EMAIL PROTECTED] ___ Web

Re: [Web-SIG] Fwd: wsgiref.simple_server slow on slow network

2008-07-21 Thread Robert Brewer
to store the server name. import socket self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) HTTPServer.server_bind(self) self.setup_environ() Robert Brewer [EMAIL PROTECTED] [1] http://en.wikipedia.org/wiki/Nagle's_algorithm

Re: [Web-SIG] Fwd: wsgiref.simple_server slow on slow network

2008-07-22 Thread Robert Brewer
A tcpdump would be more helpful at this point, but I'm not sure the ML is the right place for that. Robert Brewer [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:web-sig- [EMAIL PROTECTED] On Behalf Of Tibor Arpas Sent: Tuesday, July 22, 2008 8:51 AM To: Jean

Re: [Web-SIG] passing data to python script to generate chart dynamically...

2008-08-10 Thread Robert Brewer
it in the request body with POST. If you have further questions, you should ask at comp.lang.python: http://mail.python.org/mailman/listinfo/python-list Robert Brewer [EMAIL PROTECTED] ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs

Re: [Web-SIG] Revising environ['wsgi.input'].readline in the WSGI specification

2008-11-16 Thread Robert Brewer
+1 -Original Message- From: [EMAIL PROTECTED] [mailto:web-sig- [EMAIL PROTECTED] On Behalf Of Ian Bicking Sent: Sunday, November 16, 2008 10:06 AM To: Graham Dumpleton Cc: Web SIG Subject: Re: [Web-SIG] Revising environ['wsgi.input'].readline in the WSGI specification Graham

Re: [Web-SIG] Revising environ['wsgi.input'].readline in the WSGI specification

2008-11-17 Thread Robert Brewer
not complicate this change by conflating it with others yet again. Robert Brewer [EMAIL PROTECTED] ___ 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

Re: [Web-SIG] how to test hunging socket ?

2009-01-31 Thread Robert Brewer
. But i would like to identify (and reproduce) exactly the problem. I also use a lot of cached data in my app. Anyway i have to make it thread-safe... shameless-plug Try http://www.aminus.net/wiki/PyConquer to help identify the problem. /shameless-plug Robert Brewer fuman...@aminus.org

Re: [Web-SIG] WSGI Open Space @ PyCon.

2009-03-28 Thread Robert Brewer
WSGI support. Mostly non-existent. Fix it? Fork it? Drop it? * Lifecycle methods (start/stop/etc event API driven by the container) * Remove app_iter.close? Robert Brewer fuman...@aminus.org ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http

Re: [Web-SIG] WSGI Open Space @ PyCon.

2009-03-29 Thread Robert Brewer
I wrote: We had a good second meeting and answered more issues. My understanding is that there is another BoF scheduled for tomorrow (Sunday). Check the Open Space board for details. My mistake. I'll put up an Open Space reservation for 5pm today ASAP. Robert Brewer fuman...@aminus.org

Re: [Web-SIG] WSGI Open Space @ PyCon.

2009-03-29 Thread Robert Brewer
) * Lifecycle methods (start/stop/etc event API driven by the container) Robert Brewer fuman...@aminus.org ___ 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

Re: [Web-SIG] Python 3.0 and WSGI 1.0.

2009-04-01 Thread Robert Brewer
a patch to make it handle bytes for fp/environ but that became difficult quickly and may complicate the cgi module needlessly if we can instead use unicode for those 3 environ entries. I'll report back here. Robert Brewer fuman...@aminus.org ___ Web

Re: [Web-SIG] Python 3.0 and WSGI 1.0.

2009-04-01 Thread Robert Brewer
Graham Dumpleton wrote: 2009/4/2 Guido van Rossum gu...@python.org: On Wed, Apr 1, 2009 at 12:15 PM, Ian Bicking i...@colorstudy.com wrote: On Wed, Apr 1, 2009 at 11:34 AM, Guido van Rossum gu...@python.org wrote: On Wed, Apr 1, 2009 at 5:18 AM, Robert Brewer fuman...@aminus.org wrote

Re: [Web-SIG] Python 3.0 and WSGI 1.0.

2009-04-01 Thread Robert Brewer
that tries to. http://www.cherrypy.org/browser/trunk/cherrypy/lib/http.py#L196 Currently, CP apps call that. We can move that to the server if desired. Robert Brewer fuman...@aminus.org ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http

Re: [Web-SIG] Python 3.0 and WSGI 1.0.

2009-04-01 Thread Robert Brewer
Graham Dumpleton wrote: 2009/4/2 Robert Brewer fuman...@aminus.org: Alan Kennedy wrote: Hi Graham, I think yours is a good solution to the problem. [Graham] In other words, leave all the existing CGI variables to come through as latin-1 decode As latin-1 or rfc-2047 decoded

Re: [Web-SIG] Python 3.0 and WSGI 1.0.

2009-04-02 Thread Robert Brewer
to what was always a shaky spec. Robert Brewer fuman...@aminus.org ___ 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

Re: [Web-SIG] Python 3.0 and WSGI 1.0.

2009-04-03 Thread Robert Brewer
be absoluteURI or relativeURI, neither of which have defined encodings. RFC 2047 only applies to headers of type TEXT, of which there are surprisingly few. Robert Brewer fuman...@aminus.org ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http

Re: [Web-SIG] Python 3.0 and WSGI 1.0.

2009-04-03 Thread Robert Brewer
/TEXT). Robert Brewer fuman...@aminus.org ___ 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

Re: [Web-SIG] FW: Closing #63: RFC2047 encoded words

2009-04-08 Thread Robert Brewer
far outnumber origin servers). Robert Brewer fuman...@aminus.org ___ 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

Re: [Web-SIG] Python 3.0 and WSGI 1.0.

2009-04-16 Thread Robert Brewer
, Graham, and is what I'll be implementing in my python3 branch for CherryPy barring any unforeseen impediments. Robert Brewer fuman...@aminus.org ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http

Re: [Web-SIG] Python 3.0 and WSGI 1.0.

2009-04-16 Thread Robert Brewer
CONTENT_LENGTH? Sure; I think that's reasonable. It's supposed to be 'file-like'. Robert Brewer fuman...@aminus.org ___ 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

Re: [Web-SIG] Python 3.0 and WSGI 1.0.

2009-05-08 Thread Robert Brewer
P.J. Eby wrote: At 08:07 AM 5/8/2009 -0700, Robert Brewer wrote: I decided that that single type should be byte strings because I want WSGI middleware and applications to be able to choose what encoding their output is. Passing unicode to the server would require some out-of-band method

Re: [Web-SIG] py3k, cgi, email, and form-data

2009-05-12 Thread Robert Brewer
Graham Dumpleton wrote: 2009/5/12 Robert Brewer fuman...@aminus.org: There's a major change in functionality in the cgi module between Python 2 and Python 3 which I've just run across: the behavior of FieldStorage.read_multi, specifically when an HTTP app accepts a file upload within

Re: [Web-SIG] WSGI 2

2009-08-04 Thread Robert Brewer
: # Closing the conn is the only way to determine len. self.close_connection = True Robert Brewer fuman...@aminus.org ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman

Re: [Web-SIG] WSGI 2

2009-08-11 Thread Robert Brewer
numbers of WSGI middleware aren't fighting this; it would mean decoding the same environ entries every time you switched middleware providers. Some of you said as much at PyCon: http://mail.python.org/pipermail/web-sig/2009-March/003701.html Robert Brewer fuman...@aminus.org

[Web-SIG] WSGI 2: Decoding the Request-URI

2009-08-16 Thread Robert Brewer
and not characters. Falling back to ISO-8859-1 (and minting a new WSGI environ entry to declare the charset which was used to decode) can handle all of these cases. Server configuration options cannot, at least not without their specification becoming unwieldy. Robert Brewer fuman...@aminus.org [1] http

Re: [Web-SIG] WSGI 2: Decoding the Request-URI

2009-08-17 Thread Robert Brewer
. Did I say 3 reasons? I meant 4: Accept-Charset. Robert Brewer fuman...@aminus.org ___ 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

Re: [Web-SIG] Request for Comments on upcoming WSGI Changes

2009-09-20 Thread Robert Brewer
Armin Ronacher wrote: Thanks to Graham Dumpleton and Robert Brewer there is some serious progress on WSGI currently. I proposed a roadmap with some PEP changes now that need some input. Summary: WSGI 1.0 stays the same as PEP 0333 currently is WSGI 1.1 becomes what Ian

Re: [Web-SIG] PEP 0333 and PEP XXXX Updated

2009-09-20 Thread Robert Brewer
that there is no WSGI 1.X for Python 3.X at all? I want something in between so I don't have to wait months or years for WSGI 2. I want to ship a version of CherryPy with Python 3 support last week. Robert Brewer fuman...@aminus.org ___ Web-SIG

Re: [Web-SIG] Request for Comments on upcoming WSGI Changes

2009-09-20 Thread Robert Brewer
cgi.FieldStorage? urllib.unquote, for one. We had to make a version which accepts bytes (and outputs bytes). But it's only 8 lines of code. Robert Brewer fuman...@aminus.org ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig

Re: [Web-SIG] Request for Comments on upcoming WSGI Changes

2009-09-21 Thread Robert Brewer
that API be expressed? Perhaps not, but I wrote unquote_bytes at PyCon 2009, after discussing urllib in the python-dev room and being told no bytes-compatible version was desired in the stdlib. So *some* thought has gone into it. Robert Brewer fuman...@aminus.org

Re: [Web-SIG] Request for Comments on upcoming WSGI Changes

2009-09-21 Thread Robert Brewer
René Dudfield wrote: On Mon, Sep 21, 2009 at 6:05 PM, Robert Brewer fuman...@aminus.org wrote: Armin Ronacher wrote: WSGI will demand UTF-8 URLs and only provide iso-XXX support for backwards compatibility. WSGI cannot demand that; a recommendation for utf-8 in a few draft

Re: [Web-SIG] Request for Comments on upcoming WSGI Changes

2009-09-21 Thread Robert Brewer
P.J. Eby wrote: At 11:23 AM 9/21/2009 -0700, Robert Brewer wrote: I still don't see why the environ should have multiple versions of anything. It's not as if the HTTP request gives us multiple Request-URI's. There's a single processing step that has to happen somewhere: decoding the bytes

Re: [Web-SIG] Request for Comments on upcoming WSGI Changes

2009-09-21 Thread Robert Brewer
line * number of middlewares in the WSGI stack * each request). With wsgi.uri_encoding you get either (1 line * 1 middleware designed to transcode * each request), or even 0 if your whole site uses just one charset. Robert Brewer fuman...@aminus.org

Re: [Web-SIG] Request for Comments on upcoming WSGI Changes

2009-09-21 Thread Robert Brewer
Henry Precheur wrote: On Mon, Sep 21, 2009 at 03:26:35PM -0700, Robert Brewer wrote: It looks simpler until you have a site that is not primarily utf-8. In that case, you multiply your (1 line * number of middlewares in the WSGI stack * each request). With wsgi.uri_encoding you get

Re: [Web-SIG] Request for Comments on upcoming WSGI Changes

2009-09-22 Thread Robert Brewer
P.J. Eby [mailto:p...@telecommunity.com] At 07:40 PM 9/21/2009 -0700, Robert Brewer wrote: Yes; you have to transcode to the correct encoding. Once. Then every other WSGI application interface below that one doesn't have to care. You can only do that if you *break encapsulation*, which

Re: [Web-SIG] Session events

2009-10-05 Thread Robert Brewer
want them, then just stuff your new class into the sessions module via cherrypy.lib.sessions.MyFileSession = MyFileSession (and the config system will automatically pick it up). Robert Brewer fuman...@aminus.org ___ Web-SIG mailing list Web-SIG@python.org

Re: [Web-SIG] Future of WSGI

2009-11-25 Thread Robert Brewer
taste. Robert Brewer fuman...@aminus.org [1] http://www.cs.utexas.edu/~wcook/Drafts/2009/essay.pdf [2] http://www.cherrypy.org/wiki/ZenOfCherryPy#a8.Subclassedbuiltinsarebette rthancustomtypes. ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http

Re: [Web-SIG] WSGI for Python 3

2010-08-27 Thread Robert Brewer
notice). If you do that, we can write a WSGI for Python 3 now that doesn't suffer from any of the complexities of 2to3. Robert Brewer fuman...@aminus.org ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe

Re: [Web-SIG] PEP 444 (aka Web3)

2010-09-16 Thread Robert Brewer
by the HTTP request and all the attendant encoding- guessing (or configuration) it implies. Just some field experience: that's not hard. CherryPy 3.2 does this now between various WSGI proposals. Robert Brewer fuman...@aminus.org ___ Web-SIG mailing

Re: [Web-SIG] PEP 444 (aka Web3)

2010-09-18 Thread Robert Brewer
? I've run a few businesses now on WSGI without doing what you describe, so I don't see why blocking makes an application 'trivial'. Robert Brewer fuman...@aminus.org ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web

Re: [Web-SIG] PEP 444 (aka Web3)

2010-09-20 Thread Robert Brewer
differentiating HEAD from GET, or whether servers should transform HEAD to GET before invoking the first application callable. I'd personally prefer the former. Robert Brewer fuman...@aminus.org ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http

Re: [Web-SIG] Most WSGI servers close connections to early.

2010-09-22 Thread Robert Brewer
. In practice, that means allowing servers to close the connection without reading the entire request body if a certain number of bytes is exceeded. Robert Brewer fuman...@aminus.org ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http

Re: [Web-SIG] Most WSGI servers close connections to early.

2010-09-22 Thread Robert Brewer
Benoit Chesneau wrote: On Wed, Sep 22, 2010 at 5:34 PM, Robert Brewer fuman...@aminus.org wrote: However, the caveat requires a caveat: servers must still be able to protect themselves from malicious clients. In practice, that means allowing servers to close the connection without reading

Re: [Web-SIG] PEP 444 / WSGI2 Proposal: Filters to supplimentmiddleware.

2010-12-13 Thread Robert Brewer
and replaced them with hooks and tools in version 3. You might find more insight by studying the latest cherrypy/_cptools.py Robert Brewer fuman...@aminus.org ___ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe

  1   2   >