[Zope-dev] zope.app.component broken with zope.component 3.8.0 and greater?

Jonathan Lange jml at mumak.net
Sun Apr 11 10:28:39 EDT 2010


Hello,

I'm trying to update my application to use the recent patch that Tres
Seaver helpfully landed on zope.app.testing.

The new zope.app.testing seems to require a new zope.component, since
it's importing hooks from z.component rather than zope.site.

However, when I update zope.component, I get the following error from
zope.app.component:

Traceback (most recent call last):
...
  File ".../zope.app.component-3.8.3-py2.5.egg/zope/app/component/metaconfigure.py",
line 15, in <module>
    from zope.component.zcml import PublicPermission, _checker, view, resource
ImportError: cannot import name PublicPermission

It appears that r83 of lp:zope.component moves PublicPermission from
zope.component.zcml to zope.component.security.

Now, my app is only using metaconfigure in this instance to get at
PublicPermission and view, so I might as well import them from
zope.component directly, solving my immediate problem.

However, this still leaves zope.app.component broken with new
zope.component releases.

I can't find the code for zope.app.component on Launchpad, but the fix
seems pretty simple – import PublicPermission from
z.component.security.

It seems to me that zope.component is also broken, since moving
PublicPermission to a new module breaks backwards compatibility. I've
attached a patch that goes some way to fixing this.

More generally, I'm a bit worried that this attempt of mine to upgrade
the zope.testing that my app uses is going to result in a cascade of
dependency upgrades, each with their own little backwards
compatibility problems. What sort of expectations should I have? e.g.
Do the version numbers tell me anything about intended compatibility?

Thanks,
jml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: public-permission.diff
Type: text/x-patch
Size: 512 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20100411/b83a0334/attachment.bin 


More information about the Zope-Dev mailing list