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
Traceback (most recent call last):
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
I can't find the code for zope.app.component on Launchpad, but the fix
seems pretty simple – import PublicPermission from
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?
=== modified file 'src/zope/component/zcml.py'
--- src/zope/component/zcml.py 2010-04-06 03:01:29 +0000
+++ src/zope/component/zcml.py 2010-04-11 14:24:49 +0000
@@ -30,7 +30,7 @@
from zope.component.security import _checker, proxify, protectedFactory, \
- from zope.security.zcml import Permission
+ from zope.security.zcml import Permission, PublicPermission
SECURITY_SUPPORT = False
from zope.schema import TextLine as Permission
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -