diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-10-20 16:25:46 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-10-20 16:25:46 -0400 |
commit | 0b0764b62ba87bdec41d0fc86618f3779cb4e3f0 (patch) | |
tree | c5182ea25b777551811a99c89982d3c584ee15dd /lib/sqlalchemy/sql/elements.py | |
parent | 73669c7284548d0e5ab2147f66174c301e732650 (diff) | |
download | sqlalchemy-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.py | 3 |
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 |