Merge branch 'master' into orm
[tiramisu.git] / tiramisu / setting.py
index 38cf7b5..fc4241d 100644 (file)
@@ -267,11 +267,11 @@ class Property(object):
         :param propname: a predefined or user defined property name
         :type propname: string
         """
-        if self._opt is not None and self._opt._calc_properties is not None \
+        if self._opt is not None and self._opt.impl_getrequires() is not None \
                 and propname in self._opt._calc_properties:
             raise ValueError(_('cannot append {0} property for option {1}: '
                                'this property is calculated').format(
-                                   propname, self._opt._name))
+                                   propname, self._opt.impl_getname()))
         self._properties.add(propname)
         self._setting._setproperties(self._properties, self._opt, self._path)
 
@@ -415,12 +415,13 @@ class Settings(object):
         if opt is None:
             self._p_.setproperties(None, properties)
         else:
-            if opt._calc_properties is not None:
-                properties -= opt._calc_properties
-            if set(opt._properties) == properties:
-                self._p_.reset_properties(path)
-            else:
-                self._p_.setproperties(path, properties)
+            #if opt._calc_properties is not None:
+            #    properties -= opt._calc_properties
+            #if set(opt._properties) == properties:
+            #    self._p_.reset_properties(path)
+            #else:
+            #    self._p_.setproperties(path, properties)
+            self._p_.setproperties(path, properties)
         self._getcontext().cfgimpl_reset_cache()
 
     #____________________________________________________________
@@ -483,12 +484,12 @@ class Settings(object):
                 raise PropertiesOptionError(_('cannot change the value for '
                                               'option {0} this option is'
                                               ' frozen').format(
-                                                  opt_or_descr._name),
+                                                  opt_or_descr.impl_getname()),
                                             props)
             else:
                 raise PropertiesOptionError(_("trying to access to an option "
                                               "named: {0} with properties {1}"
-                                              "").format(opt_or_descr._name,
+                                              "").format(opt_or_descr.impl_getname(),
                                                          str(props)), props)
 
     def setpermissive(self, permissive, opt=None, path=None):