we currently have a project where we calculate local roles dynamically.
This involves using a computed attribute as an __ac_local_roles__
replacement. Unfortunately this doesn't mix too well with assigning them
manually, although our computed attribute takes care.

Why is this and what can we do against that?

__ac_local_roles__ is a dict. It's not a PersistentDictionary, but an
ordinary Python dict. Therefore, to obey the rules of persistence, the
Role.py local role machinery reassigns __ac_local_roles__ after every

I'd like to change this, so that Role.py sets _p_changed instead, which
is what it tries to signal. Additionally you need to explicitly assign
__ac_local_roles__ instead of just getting

dict=self.__ac_local_roles__ or {}

so this becomes

if dict is None:
    self.__ac_local_roles = dict = {}

This change works without disrupting the unit tests and I would love to
get it on Zope 2.8. Any objections?

I take silence as a 'no objections'.


gocept gmbh & co. kg - schalaunische str. 6 - 06366 koethen - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 3496 30 99 112 -
fax +49 3496 30 99 118 - zope and plone consulting and development

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to