##// END OF EJS Templates
pickle workaround for Python < 3.4
Min RK -
Show More
@@ -596,7 +596,12 class HasTraits(py3compat.with_metaclass(MetaHasTraits, object)):
596 596 yield
597 597 finally:
598 598 self._notify_trait = _notify_trait
599
599 if isinstance(_notify_trait, types.MethodType):
600 # FIXME: remove when support is bumped to 3.4.
601 # when original method is restored,
602 # remove the redundant value from __dict__
603 # (only used to preserve pickleability on Python < 3.4)
604 self.__dict__.pop('_notify_trait', None)
600 605 # trigger delayed notifications
601 606 for args in notifications:
602 607 self._notify_trait(*args)
General Comments 0
You need to be logged in to leave comments. Login now