[Grok-dev] zope.app.wsgi adapters not registered by default

Jan-Wijbrand Kolman janwijbrand at gmail.com
Thu May 26 07:31:42 EDT 2011

On 5/18/11 11:25 , Jan-Wijbrand Kolman wrote:
> On 5/13/11 09:14 , Jeroen Michiel wrote:
>> Martijn Faassen-2 wrote:
>>> Doesn't sound deliberate. Could you add this to launchpad?
>> Thought as much.
>> Reported!
> I looked into this. It is bit of an unfortunate situation. Let me try to
> explain and propose a solution:
> `zope.app.wsgi` defines `IResult` adapters for efficiently sending large
> amounts of data back to the client.
> Although in principle these adapters are not WSGI-specific (and IMHO
> could've been implemented in zope.publisher where also the IResult
> interfaces lives), there's one aspect in the adapter's implementation
> that I think was the reason for putting these in the `zope.app.wsgi`
> package after all: the implementation will use the "wsgi.file_wrapper"
> from the WSGI environment when it is available.
> In the Grok stack, it is grokcore.startup that directly depends on
> `zope.app.wsgi`. A project built with grokproject will itself depend on
> `grokcore.startup`, but no other package in the Grok stack depends on
> `grokcore.startup` or `zope.app.wsgi` (except for several test
> dependencies). It does somehow not make sense to me to have a project
> built with `grokproject` to directly depend on `zope.app.wsgi` - this
> package is only instrumental I guess.
> For now I think a reasonable albeit not ideal solution would be to have
> the grok package (which after all defines a "policy" or "profile" for
> Grok-based web applications) depend on zope.app.wsgi and have grok's
> `configure.zcml` include the configuration of `zope.app.wsgi`
> I think I'll do that, unless of course someone has a much better idea :-)

Done and released as grok-1.7.
regards, jw

More information about the Grok-dev mailing list