Commits

Mike Bayer committed 67c17e1

fix non2.5 compat @property usage

Comments (0)

Files changed (1)

lib/sqlalchemy/orm/properties.py

                               "cause dependency issues during flush"
                               % (self.key, self.parent, inheriting))
 
-    @property
-    def cascade(self):
+    def _get_cascade(self):
         """Return the current cascade setting for this
         :class:`.RelationshipProperty`.
         """
         return self._cascade
 
-    @cascade.setter
-    def cascade(self, cascade):
+    def _set_cascade(self, cascade):
         cascade = CascadeOptions(cascade)
         if 'mapper' in self.__dict__:
             self._check_cascade_settings(cascade)
         if self._dependency_processor:
             self._dependency_processor.cascade = cascade
 
+    cascade = property(_get_cascade, _set_cascade)
+
     def _check_cascade_settings(self, cascade):
         if cascade.delete_orphan and not self.single_parent \
             and (self.direction is MANYTOMANY or self.direction