- Restored "active rowcount" fetch before ResultProxy
autocloses the cursor. This was removed in 0.5rc3.
+
+ - Rearranged the `load_dialect_impl()` method in
+ `TypeDecorator` such that it will take effect
+ even if the user-defined `TypeDecorator` uses
+ another `TypeDecorator` as its impl.
- access
- Added support for Currency type.
except KeyError:
pass
- if isinstance(self.impl, TypeDecorator):
- typedesc = self.impl.dialect_impl(dialect)
- else:
- typedesc = self.load_dialect_impl(dialect)
+ typedesc = self.load_dialect_impl(dialect)
tt = self.copy()
if not isinstance(tt, self.__class__):
- raise AssertionError("Type object %s does not properly implement the copy() method, it must return an object of type %s" % (self, self.__class__))
+ raise AssertionError("Type object %s does not properly implement the copy() "
+ "method, it must return an object of type %s" % (self, self.__class__))
tt.impl = typedesc
self._impl_dict[dialect] = tt
return tt
can be overridden to provide different behavior.
"""
- return dialect.type_descriptor(self.impl)
+ if isinstance(self.impl, TypeDecorator):
+ return self.impl.dialect_impl(dialect)
+ else:
+ return dialect.type_descriptor(self.impl)
def __getattr__(self, key):
"""Proxy all other undefined accessors to the underlying implementation."""