declarative_base() inheritance breaks super() [0.6.4]

Issue #1947 resolved
Former user created an issue

super no longer works if you inherit from a declarative class and that declarative class is first in the inheritance list.

I've attached an example script that demonstrates the init of a Mixin class being ignored. It also includes a work around by carefully arranging the inheritance order. Finally, it has the same inheritance demonstrated with standard python objects to show expected behavior.

Comments (1)

  1. Mike Bayer repo owner

    that's the documented default behavior of declarative_base() ^1 2 3^. To not apply a default __init__:

    Base = declarative_base(constructor=None)
    
  2. Log in to comment