I am toying with Jython, and the same app that works fine with CPython somehow throws a
CircularDependencyError when trying to insert an instance of a mapped class that participates in a joined table inheritance.
I trace down the culprit to be
WeakSequence.__iter__(), which doesn't preserve the insertion order.
Changing the line from:
# 0.8 return self._storage.itervalues()
# 0.9 return iter(self._storage.values())
for idx in sorted(self._storage): yield self._storage[idx](idx)
make things work again on Jython.