Set initialization in init instead of new
Sqlalchemy subclasses set, and overrides __init__ and does some custom initialization there. We were doing the initialization in __new__, which works most of the time, except if a generator was passed since then sqlalchemy's initialization will see what looks like an empty generator since we already consumed it. So move the initialization to init. Except for frozenset which still needs to do it in new.
Showing
Please register or sign in to comment