Commits

Mike Bayer committed 3c2052d

- PickleType will compare using `==` when set up with mutable=False,
and not the `is` operator. To use `is` or any other comparator, send
in a custom comparison function using PickleType(comparator=my_custom_comparator).

Comments (0)

Files changed (2)

     only those paths, i.e. and not 'x.y.x'; eagerload('children.children')
     applies only to exactly two-levels deep, etc. [ticket:777]
 
+  - PickleType will compare using `==` when set up with mutable=False,
+    and not the `is` operator.  To use `is` or any other comparator, send
+    in a custom comparison function using PickleType(comparator=my_custom_comparator).
+    
   - query doesn't throw an error if you use distinct() and an order_by()
     containing UnaryExpressions (or other) together [ticket:848]
 

lib/sqlalchemy/types.py

         elif self.mutable:
             return self.pickler.dumps(x, self.protocol) == self.pickler.dumps(y, self.protocol)
         else:
-            return x is y
+            return x == y
 
     def is_mutable(self):
         return self.mutable