[z3-five] Re: Doing a 0.1 release?

Martijn Faassen faassen at infrae.com
Fri Jun 25 11:14:50 MEST 2004


Philipp von Weitershausen wrote:
> Martijn Faassen wrote:

>> I think we're in a good position to release, but let's all make a
>> list of things we think should still be done before the release.
>> Here's my list:
>> 
>> * rename permissions from 'zope.' to 'zope2.'

> I'm still not sure about this one. zope.Public and zope.View have
> their equivalents in Zope3, for example. Why would we want to use a
> different prefix? It's not like we would be defining Zope3 and Zope2
> permissions at the same time. Rather, we would maybe include some
> Zope3 packages that rely on zope.* permissions... That *could* be
> solved using redefinePermission, but that's just one more
> indirection.
> 
> So, I'm -1 on this. It's not a strong -1, but I would like to know
> first why you guys think it should be renamed.

I believe they should be renamed for the same reason as why we have
package namespaces. Zope 2 interfaces are declared in a different
package than the Zope 3 ones. In some ways, a Zope 2 IFolder is like a
Zope 3 IContainer, but in other ways they're really different and when
porting from Zope 2 to Zope 3 one should be aware of that.

For permissions this case is less strong, but permission namespaces
exist, after all (if only as convention). You can't expect a Zope 2
permission to be present in Zope 3, or vice versa.

There are of course permissions that seem to be "the same" across Zope 2 
and Zope 3, like 'zope.Public' and 'zope.View'. But *most* are not. Even 
more worrying, some permissions in the future may end up with the same 
name as a permission in Zope 2 but be really about something else.

When porting code from one version of zope to the other, one has to 
explicitly review the permissions. If it 'sometimes works', that is 
actually something that might encourage people to overlook things. 
"Sometimes works if you forget about it" is very dangerous. :)

I didn't even know redefinePermission existed; what does it do?

Regards,

Martijn


More information about the z3-five mailing list