On Thu, Apr 06, 2006 at 11:17:20AM +0200, Stefan H. Holek wrote:
> For the record: I am still opposed to this change. It basically
> endows the request (as in self.REQUEST) with a getPhysicalPath
> method, and I have no idea what kind of side-effects this may have.
That's because there aren't any ;-)
The only way you can ever hit REQUEST.getPhysicalPath is if
you specifically ask for it, which is obviously stupid; or if
the object you're wrapping doesn't terminate getPhysicalPath().
> AFAICS your test suite is the only suite around that wants to request-
> wrap non-root objects.
I'd reprhase that as "... wants to request-wrap non-Zope2.app()
FWIW, I didn't write it, and at the time those tests were added,
I believe they worked. This was using zope 2.8.something.
I know who originally added those tests, and he's pretty high profile in
the community, so I wouldn't be surprised if there are many such tests
I was hired several months later and discovered some apparent bit-rot in
our test suite, i.e. a number of failures and errors, and one of the
principal points of failure was the issue we're discussing.
I'm not sure, but I'm guessing that the calls to getPhysicalPath() in
our app were added later, and whoever did that must've punted on
figuring out the resulting test issues.
> There's nothing wrong with using your own
> makerequest for your own test suite, if this is what you want. But I
> don't think your use-case warrants changing Zope.
Noted, and that's a reasonable position. Does nobody else care?
Using an Item or Folder as your root object for tests works fine except for
this one issue, so why not allow that?
My feeling is that setting up an app is unnecessary work when you
don't need one; for one thing, your test module needs to call
Zope2.startup() first; for another, afaict creating a Zope2.app is
a couple orders of magnitude slower than creating a SimpleItem.
So maybe more people *should* use makerequest(NotAnApp) ;-)
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -