[Web-SIG] Standardized configuration

2005-07-16 Thread Chris McDonough
I've also been putting a bit of thought into middleware configuration, although maybe in a different direction. I'm not too concerned yet about being able to introspect the configuration of an individual component. Maybe that's because I haven't thought about the problem enough to be concerned

Re: [Web-SIG] Standardized configuration

2005-07-16 Thread Chris McDonough
On Sat, 2005-07-16 at 23:29 -0500, Ian Bicking wrote: There's nothing in WSGI to facilitate introspection. Sometimes that seems annoying, though I suspect lots of headaches are removed because of it, and I haven't found it to be a stopper yet. The issue I'm interested in is just how to

Re: [Web-SIG] Standardized configuration

2005-07-17 Thread Chris McDonough
On Sun, 2005-07-17 at 03:16 -0500, Ian Bicking wrote: This is what Paste does in configuration, like: middleware.extend([ SessionMiddleware, IdentificationMiddleware, AuthenticationMiddleware, ChallengeMiddleware]) This kind of middleware takes a single argument, which is the

Re: [Web-SIG] Standardized configuration

2005-07-19 Thread Chris McDonough
On Mon, 2005-07-18 at 22:49 -0500, Ian Bicking wrote: In addition to the examples I gave in response to Graham, I wrote a document on this a while ago: http://pythonpaste.org/docs/url-parsing-with-wsgi.html The hard part about this is configuration; it's easy to configure a non-branching

Re: [Web-SIG] Standardized configuration

2005-07-22 Thread Chris McDonough
I've had a stab at creating a simple WSGI deployment implementation. I use the term WSGI component in here as shorthand to indicate all types of WSGI implementations (server, application, gateway). The primary deployment concern is to create a way to specify the configuration of an instance of a

Re: [Web-SIG] Standardized configuration

2005-07-23 Thread Chris McDonough
On Fri, 2005-07-22 at 17:26 -0500, Ian Bicking wrote: To do this, we use a ConfigParser-format config file named 'myapplication.conf' that looks like this:: [application:sample1] config = sample1.conf factory = wsgiconfig.tests.sample_components.factory1

Re: [Web-SIG] Entry points and import maps (was Re: Scarecrow deployment config

2005-07-25 Thread Chris McDonough
of the config file formats we've been discussing matches which requirement? Thanks, - C On Sun, 2005-07-24 at 22:24 -0400, Phillip J. Eby wrote: At 08:35 PM 7/24/2005 -0400, Chris McDonough wrote: Sorry, I think I may have lost track of where we were going wrt the deployment spec. Specifically

Re: [Web-SIG] Entry points and import maps (was Re: Scarecrow deployment config

2005-07-25 Thread Chris McDonough
] [lowercaser from helloworld] ... and run some starter script that parses that as a pipeline, creates the two instances, wires them together, and we get a running pipeline? Am I on track? OK, back to Battlestar Galactica ;-) On Mon, 2005-07-25 at 02:40 -0400, Chris McDonough wrote: BTW, a simple

Re: [Web-SIG] Entry points and import maps (was Re: Scarecrow deployment config

2005-07-25 Thread Chris McDonough
:39 -0400, Phillip J. Eby wrote: At 03:02 AM 7/25/2005 -0400, Chris McDonough wrote: Actually, let me give this a shot. We package up an egg called helloworld.egg. It happens to contain something that can be used as a WSGI component. Let's say it's a WSGI application that always returns

Re: [Web-SIG] WSGI deployment use case

2005-07-25 Thread Chris McDonough
On Mon, 2005-07-25 at 20:29 -0500, Ian Bicking wrote: We probably need something like a site map configuration, that can handle tree structure, and can specify pipelines on a per location basis, including the ability to specify pipeline components to be applied above everything under a

Re: [Web-SIG] WSGI deployment use case

2005-07-26 Thread Chris McDonough
On Tue, 2005-07-26 at 01:18 -0500, Ian Bicking wrote: Well, the stack is really just an example, meant to be more realistic than sample1 and sample2. I actually think it's a very reasonable example, but that's not really the point. Presuming this stack, how would you configure it? I

Re: [Web-SIG] transaction progress with cgi.FieldStorage

2005-12-30 Thread Chris McDonough
An aside on cgi.FieldStorage itself. It reads data using readline instead of reading in blocks of limited size. doing this I think means a file with very long lines, 20MB, 100MB, ... could cause excessive memory consumption. This was reported and solved a long time ago (but not yet fixed in

Re: [Web-SIG] Standardized template API

2006-02-01 Thread Chris McDonough
One specific concern about the returning the published object for publisher-based frameworks is that often the published object has references to other objects that might not make sense in the context of the thread handling the rendering of the template. For example, if you're using a

Re: [Web-SIG] My original template API proposal

2006-02-06 Thread Chris McDonough
Although I've been trying to follow this thread, I'm finding it difficult to get a handle on what is meant to *call* the template API (e.g. what typically calls render in Ian's ITemplatePlugin interface at http://svn.pythonpaste.org/home/ianb/templateapi/ interface.py)? Is the framework

Re: [Web-SIG] WSGI in standard library

2006-02-12 Thread Chris McDonough
On Feb 12, 2006, at 6:39 AM, Alan Kennedy wrote: So, I still think that only basic servers educational/playpen servers should go in the standard library, with an indication that the user should pick an openly server from outside the distro if they require to do serious server work. I agree

Re: [Web-SIG] html dom like javascript ?

2006-08-17 Thread Chris McDonough
You probably want elementtree (http://effbot.org/zone/element-index.htm). Thanks for the rapid reply. I am familiar with a number of these and have searched the web documentation but for the most part these appear to be parsers or things like:

Re: [Web-SIG] Web Site Process Bus

2007-06-26 Thread Chris McDonough
On Jun 26, 2007, at 1:04 AM, Graham Dumpleton wrote: In Apache changing the certificates would need a complete restart of everything. Because the child processes aren't privileged they would not be able to trigger the main server to do so. This actually gets to one of my reservations about

Re: [Web-SIG] Web Site Process Bus

2007-06-26 Thread Chris McDonough
On Jun 26, 2007, at 5:07 PM, Robert Brewer wrote: I think I'm mostly confused by the name process bus because it seems like the primary use case for something like this is where all of the applications share the same process space I don't see why it should be limited by that. The primary use

Re: [Web-SIG] [extension] x-wsgiorg.flush

2007-10-04 Thread Chris McDonough
On Oct 4, 2007, at 11:55 AM, Phillip J. Eby wrote: At 05:00 PM 10/4/2007 +0200, Manlio Perillo wrote: Your are making a critical decision here. You are lowering the level of WSGI to match the level of average WSGI middlewares programmers. No, we're just getting rid of legacy cruft that's

Re: [Web-SIG] HEAD requests, WSGI gateways, and middleware

2008-01-24 Thread Chris McDonough
I have applications that do detect the difference between a GET and a HEAD (they do slightly less work if the request is a HEAD request), so I suspect this is not a totally reasonable thing to add to the spec. Maybe instead the middleware that does what you're describing should be changed

Re: [Web-SIG] Prototype of wsgi.input.readline().

2008-01-30 Thread Chris McDonough
Graham Dumpleton wrote: As I think we all know, no one implements readline() for wsgi.input as defined in the WSGI specification. The reason for this is that stuff like cgi.FieldStorage would refuse to work and would just generate an exception. This is because cgi.FieldStorage expects to pass

Re: [Web-SIG] Prototype of wsgi.input.readline().

2008-01-30 Thread Chris McDonough
Graham Dumpleton wrote: If the size argument is made mandatory, then it would parallel how read() function is defined, but this in itself would mean cgi.FieldStorage would break. This is because cgi.FieldStorage actually calls readline() with no argument as well as an argument in

Re: [Web-SIG] Prototype of wsgi.input.readline().

2008-01-30 Thread Chris McDonough
Graham Dumpleton wrote: On 31/01/2008, Chris McDonough [EMAIL PROTECTED] wrote: Graham Dumpleton wrote: If the size argument is made mandatory, then it would parallel how read() function is defined, but this in itself would mean cgi.FieldStorage would break. This is because cgi.FieldStorage

[Web-SIG] repoze.bfg web framework 1.0 released

2009-07-05 Thread Chris McDonough
Summary --- The first major release of the BFG web framework (aka repoze.bfg), version 1.0, is available. See http://bfg.repoze.org/ for general information about repoze.bfg. Details --- BFG is a Python web framework based on WSGI. It is inspired by Zope, Pylons, and Django. It

Re: [Web-SIG] repoze.bfg web framework 1.0 released

2009-07-06 Thread Chris McDonough
On 7/5/09 10:37 PM, Graham Dumpleton wrote: The first major release of the BFG web framework (aka repoze.bfg), version 1.0, is available. See http://bfg.repoze.org/ for general information about repoze.bfg. ... - WSGI-based deployment: PasteDeploy and mod_wsgi compatible. ... - A

Re: [Web-SIG] repoze.bfg web framework 1.0 released

2009-07-06 Thread Chris McDonough
On 7/5/09 11:44 PM, Randy Syring wrote: Chris, Sounds interesting. Question: Does it support some kind of module/plugin architecture that will allow me to develop plug- in functionality across projects? What would be called in Django an app. For example, I would like to have a news, blog,

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

2009-09-20 Thread Chris McDonough
I'll try to digest some of this, currently I'm pretty clueless. Personally, I find it a bit hard to get excited about Python 3 as a web application deployment platform. This is of course a personal judgment (I don't mean to slight Python 3) but at this point, I'll think I'll probably be

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

2009-09-21 Thread Chris McDonough
wrote: On Sun, Sep 20, 2009 at 11:25 PM, Chris McDonough chr...@plope.com wrote: WSGI is a fairly low-level protocol aimed at folks who need to interface a server to the outside world. The outside world (by its nature) talks bytes. I fear that any implied conversion of environment values

Re: [Web-SIG] Session events

2009-10-05 Thread Chris McDonough
This is supported at least here: http://docs.repoze.org/session/usage.html#using-begin-and-end-subscribers Alastair Bell Turner wrote: Hi I've been looking through the range of choices for Python web [application] frameworks/libraries (Just to have all the bases covered) for a new build

Re: [Web-SIG] [Paste] WebOb API

2009-10-29 Thread Chris McDonough
Ian Bicking wrote: Also I'm planning on introducing a BaseRequest (and *maybe* BaseResponse) class, that removes some functionality. Specifically for Repoze they'd like to remove __getattr__ and __setattr__ (which has some performance implications), FTR, after thinking about it, I'm not even

[Web-SIG] http://wiki.python.org/moin/WebFrameworks

2009-11-26 Thread Chris McDonough
http://wiki.python.org/moin/WebFrameworks seems to be the place where folks are registering their respective web frameworks. I'd like to move some of the frameworks which are currently in the various categories which haven't been active in a few years. In particular, I'd like to move any

Re: [Web-SIG] WSGI for Python 3

2010-07-16 Thread Chris McDonough
On Fri, 2010-07-16 at 17:11 -0500, Ian Bicking wrote: On Fri, Jul 16, 2010 at 5:08 PM, Chris McDonough chr...@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

Re: [Web-SIG] WSGI for Python 3

2010-07-16 Thread Chris McDonough
On Sat, 2010-07-17 at 01:33 +0200, Armin Ronacher wrote: Hi, On 7/17/10 1:20 AM, Chris McDonough wrote: Let me know if I'm missing something. The only thing you miss is that the bytes type of Python 3 is badly supported in the stdlib (not an issue if we reimplement everything in our

Re: [Web-SIG] WSGI for Python 3

2010-07-17 Thread Chris McDonough
On Fri, 2010-07-16 at 23:38 -0500, Ian Bicking wrote: On Fri, Jul 16, 2010 at 9:43 PM, Chris McDonough chr...@plope.com wrote: Nah, not nearly that hard: path_info = urllib.parse.unquote_to_bytes(environ['wsgi.raw_path_info']).decode

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

2010-09-15 Thread Chris McDonough
On Wed, 2010-09-15 at 20:05 -0400, P.J. Eby wrote: At 07:03 PM 9/15/2010 -0400, Chris McDonough wrote: A PEP was submitted and accepted today for a WSGI successor protocol named Web3: http://python.org/dev/peps/pep-0444/ I'd encourage other folks to suggest improvements to that spec

Re: [Web-SIG] [Python-Dev] Add PEP 444, Python Web3 Interface.

2010-09-15 Thread Chris McDonough
It's, e.g. b'8080' .. instead of the integer value 8080. Apparently the type of this value was not spelled out sufficiently in the WSGI spec and string values and integer values were used interchangeably, making it harder to join them with the other values in the environ (a common thing to want

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

2010-09-16 Thread Chris McDonough
On Thu, 2010-09-16 at 12:01 -0500, Ian Bicking wrote: Well, reiterating some things I've said before: * This is clearly just WSGI slightly reworked, why the new name? The PEP says Web3 is clearly a WSGI derivative; it only uses a different name than WSGI in order to indicate that it is not in

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

2010-09-16 Thread Chris McDonough
On Thu, 2010-09-16 at 14:04 -0400, P.J. Eby wrote: At 10:35 AM 9/16/2010 -0700, Guido van Rossum wrote: No comments on the rest except to note that at this point it looks unlikely that we can make everyone happy (or even get an agreement to adopt what would be the long-term technically optimal

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

2010-09-17 Thread Chris McDonough
On Fri, 2010-09-17 at 19:47 +0300, Ionel Maries Cristian wrote: I don't like this proposal at all. Besides having to go through the bytes craziness the design is pretty backwards for middleware and asynchronous applications. We've acknowledged in other messages to this thread that the

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

2010-09-19 Thread Chris McDonough
On Thu, 2010-09-16 at 05:29 +0200, Roberto De Ioris wrote: About the *.file_wrapper removal, i suggest a PSGI-like approach where 'body' can contains a File Object. def file_app(environ): fd = open('/tmp/pippo.txt', 'r') status = b'200 OK' headers = [(b'Content-type',

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

2010-09-19 Thread Chris McDonough
On Sun, 2010-09-19 at 21:52 -0400, Chris McDonough wrote: I'm -0 on the server trying to guess the Content-Length header. It just doesn't seem like much of a burden to place on an application and it's easier to specify that an application must do this than it is to specify how a server

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

2010-09-21 Thread Chris McDonough
in the specification at all, so as not to break people's expectations. I know that when I change it to not use any CGI names, it will be received poorly, but I can't think of a better idea. - C On Wed, 2010-09-15 at 19:03 -0400, Chris McDonough wrote: A PEP was submitted and accepted today

Re: [Web-SIG] Is PEP 3333 the final solution for WSGI on Python 3?

2010-10-22 Thread Chris McDonough
For what it's worth, I'm happy with the changes made to WSGI 1 that produced PEP . I'm unlikely to champion PEP 444 going forward. It has already served its primary duty to me personally (which was to catalyze the formalization of some specification that is Python 3 inclusive). However,

Re: [Web-SIG] Is PEP 3333 the final solution for WSGI on Python 3?

2010-10-24 Thread Chris McDonough
On Sun, 2010-10-24 at 17:16 +0200, Georg Brandl wrote: Am 24.10.2010 16:40, schrieb Chris McDonough: On Sun, 2010-10-24 at 10:17 +0300, Armin Ronacher wrote: I have to admit that my interest in Python 3 is not very high and I am most likely not the most reliable person when it comes

Re: [Web-SIG] PEP 444

2010-11-21 Thread Chris McDonough
PEP 444 has no champion currently. Both Armin and I have basically left it behind. It would be great if you wanted to be its champion. - C On Sun, 2010-11-21 at 03:12 -0800, Alice Bevan-McGregor wrote: (A version of this is is available at http://web-core.org/2.0/pep-0444/ — links are

Re: [Web-SIG] PEP 444

2010-11-21 Thread Chris McDonough
On Sun, 2010-11-21 at 09:32 -0800, Alice Bevan-McGregor wrote: PEP 444 has no champion currently. Both Armin and I have basically left it behind. It would be great if you wanted to be its champion. Done. As I already have a functional, performant HTTP server[1] and example filter[2]

Re: [Web-SIG] PEP 444 != WSGI 2.0

2011-01-02 Thread Chris McDonough
On Sun, 2011-01-02 at 09:21 -0800, Guido van Rossum wrote: Graham, I hope that you can stop being grumpy about the process that is being followed and start using your passion to write up a critique of the technical merits of Alice's draft. You don't have to attack the whole draft at once --

[Web-SIG] wsgi server...

2011-12-26 Thread Chris McDonough
Does anyone know of a pure-Python WSGI server that: - Is distributed indepdently from a web framework or larger whole. - Runs on UNIX and Windows. - Runs on both Python 2 and Python 3. - Has good test coverage. - Is useful in production. (I sent this already to the Pylons-discuss maillist

[Web-SIG] PEP3333 and PATH_INFO

2012-01-03 Thread Chris McDonough
Perrenial topic, it seems, from the archives. As far as I can tell from PEP , every WSGI application that wants to run on both Python 2 and Python 3 and which uses PATH_INFO will need to define a helper function something like this: import sys def decode_path_info(environ,

Re: [Web-SIG] A 'shutdown' function in WSGI

2012-02-20 Thread Chris McDonough
On Mon, 2012-02-20 at 17:39 -0500, PJ Eby wrote: The standard way to do this would be to define an optional server extension API supplied in the environ; for example, a 'x-wsgiorg.register_shutdown' function. Unlikely, AFACIT, as shutdown may happen when no request is active. Even if this

Re: [Web-SIG] A 'shutdown' function in WSGI

2012-02-20 Thread Chris McDonough
On Mon, 2012-02-20 at 20:54 -0500, PJ Eby wrote: 2012/2/20 Chris McDonough chr...@plope.com On Mon, 2012-02-20 at 17:39 -0500, PJ Eby wrote: The standard way to do this would be to define an optional server extension API supplied in the environ; for example

Re: [Web-SIG] A 'shutdown' function in WSGI

2012-02-22 Thread Chris McDonough
On Wed, 2012-02-22 at 09:06 +1100, Graham Dumpleton wrote: If you want to be able to control a thread like that from an atexit callback, you need to create the thread as daemonised. Ie. setDaemon(True) call on thread. By default a thread will actually inherit the daemon flag from the