regression in CAST behavior due to type_coerce enhancement

Issue #2899 resolved
Mike Bayer repo owner created an issue

works in 0.8, fails in 0.9:

from sqlalchemy import *

class MyType(TypeDecorator):
    impl = Unicode

type_ = MyType()

value = cast(literal("hi", type_), Unicode)
assert value.clause.type is type_  # <- becomes unicode, MyType is lost

Comments (2)

  1. Log in to comment