OK, so lets assume we have a way (entry points) to get an object that represents the package's WSGI application, as a factory. What do we do with that factory? That is, how do we make an application out of the factory? Well, it seems rather obvious that we call the factory, so what do we pass? Also, consider that there might be two separate but similar APIs, one for filters and another for applications.
We could go free-form, and you call application factories with keyword arguments that are dependent on the application. This serves as configuration. You can call filter factories with keyword arguments, and one special (required?) keyword argument "next_app". Another option is we pass in a single dictionary that represents the entire configuration. This leaves room to add more arguments later, where if we use keyword arguments for configuration then there's really no room at all (the entire signature of the factory is taken up by application-specific configuration). Another part of the API that I can see as useful is passing in the distribution object itself. This way a function in paste (or wherever) could serve as the loader for any application with the proper framework-specific metadata (and so probably this could devolve into per-framework loaders). This would perhaps preclude non-setuptools factories, though you could also pass in None for the distribution for those cases. -- Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org _______________________________________________ Web-SIG mailing list [email protected] Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com
