prevent mess when copying BaseObject instances

Note: to understand this fix, see AbstractElement.__init__ -- it calls
deepcopy on parent.env, it caused copying of objects we do not want to
copy such as thread locks.
This commit is contained in:
smurail 2014-09-22 17:11:48 +02:00 committed by Romain Bignon
commit bb4e91aa2e

View file

@ -338,6 +338,9 @@ class BaseObject(object):
obj._fields = copy(self._fields)
return obj
def __deepcopy__(self, memo):
return self.copy()
def set_empty_fields(self, value, excepts=()):
"""
Set the same value on all empty fields.