depends on ZODB3

Bug #435516 reported by Barry Warsaw
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lazr.restful
Fix Released
Low
Unassigned
zope.dublincore
Fix Released
Undecided
Unassigned

Bug Description

lazr.restful's dependency graph ends up pulling in ZODB3, which is insane. :)
The culprit appears to be the use of

              from zope.app.pagetemplate.engine import TrustedAppPT

in lazr.restful/src/lazr/restful/_resource.py:40

Here's an excerpt from bin/buildout -vv

Getting required 'zope.app.pagetemplate'
  required by lazr.restful 0.9.6.
Getting required 'zope.dublincore'
  required by zope.app.pagetemplate 3.7.1.
Getting required 'zope.annotation'
  required by zope.dublincore 3.5.0.
Getting required 'ZODB3'
  required by zope.annotation 3.5.0.

Gary Poster (gary)
Changed in lazr.restful:
importance: Undecided → High
status: New → Triaged
assignee: nobody → Leonard Richardson (leonardr)
Revision history for this message
Leonard Richardson (leonardr) wrote :

Hmm. We use that class to generate the WADL file from the WADL template, and (less importantly) the default HTML reprepresentation of an entry. But it looks like there's no way to get zope.app.pagetemplate without triggering that dependency.

Since there's only one complicated template, we could rewrite it to use some other templating engine that has fewer dependencies. Or we could change zope.app.pagetemplate to not need zope.dublincore all the time. Those are the only solutions I see.

Revision history for this message
Barry Warsaw (barry) wrote :

Maybe the question to ask is why zope.dublincore requires ZODB3. I don't know anything about the former, but that one seems to be the insane one. ;)

Revision history for this message
Stephen Waterbury (waterbug) wrote :

That's because zope.dublincore stores dublin core properties as annotations, which use ZODB3 -- see Chapter 14, p. 255 et seq. in "Web Component Development with Zope 3". At first glance, Zope's "Annotations" system has a bad smell, for me at least -- I prefer to handle metadata using the same backend as other data, whereas Annotations uses ZODB3 and various adapter-oriented optimizations. Shudder.

Revision history for this message
Robert Collins (lifeless) wrote :

I'm fairly sure Leonard isn't looking at this now.

Changed in lazr.restful:
assignee: Leonard Richardson (leonardr) → nobody
Changed in lazr.restful:
importance: High → Low
summary: - lazr.restful depends on ZODB3
+ depends on ZODB3
Revision history for this message
Jim Fulton (jim-zope) wrote :

FTR, ZTK's annotation system is pluggable. I can't think of a good reason why the Dublin Core machinery should depend on how annotations are stored.

Perhaps zope.annotations requires ZODB because it has an implementation that can use ZODB. If this case, then I think the fix is ro remove ZODB3 as a dependency of zope.annotation.

Revision history for this message
Marius Gedminas (mgedmin) wrote :

Bug 878265 is about removing the zope.annotation dependency on ZODB3.

Revision history for this message
Tres Seaver (tseaver) wrote :

Note that currently-released 'zope.annotations' depends on 'BTrees' and 'persistent' (but not 'ZODB3' or 'ZODB'). See bug #878265 for discussion.

Revision history for this message
Tres Seaver (tseaver) wrote :

'ZODB3' is no longer a dependency (only `persistent`).

Changed in zope.dublincore:
status: New → Fix Released
Revision history for this message
Colin Watson (cjwatson) wrote :

ZODB3 is no longer in lazr.restful's dependency graph in current versions, presumably as a result of work in Zope. (I have an open MP to use zope.pagetemplate rather than zope.app.pagetemplate - https://code.launchpad.net/~cjwatson/lazr.restful/remove-compat-imports/+merge/375438 - but that doesn't seem necessary to fix this.)

Changed in lazr.restful:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.