summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-10-20 16:25:46 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-10-20 16:25:46 -0400
commit0b0764b62ba87bdec41d0fc86618f3779cb4e3f0 (patch)
treec5182ea25b777551811a99c89982d3c584ee15dd /lib/sqlalchemy/sql/elements.py
parent73669c7284548d0e5ab2147f66174c301e732650 (diff)
downloadsqlalchemy-0b0764b62ba87bdec41d0fc86618f3779cb4e3f0.tar.gz
- add a type_coerce() step within Enum, Boolean to the CHECK constraint,
so that the custom type isn't exposed to an operation that is against the "impl" type's constraint, [ticket:2842] - this change showed up as some recursion overflow in pickling with labels, add a __reduce__() there....pickling of expressions is less and less something that's very viable...
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index 2688ef103..f70496418 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -1842,6 +1842,9 @@ class Label(ColumnElement):
self._type = type_
self._proxies = [element]
+ def __reduce__(self):
+ return self.__class__, (self.name, self._element, self._type)
+
@util.memoized_property
def _order_by_label_element(self):
return self