Hello, I'm trying to override __new__ method on the declarative base.
Calling super(Base, cls).__new__ actually calls itself. Something is happening with the mro, but I'm not quite sure what and how to proceed. At the bottom of this email is a small example that demonstrates the problem. Regards, Roland <code> from sqlalchemy.ext.declarative import as_declarativefrom sqlalchemy import Column, Integer @as_declarative()class Base(object): def __new__(cls, *args, **kwargs): return super(Base, cls).__new__(cls, *args, **kwargs) class Test(Base): __tablename__ = 'test' id = Column(Integer, primary_key=True) Test() # RuntimeError: maximum recursion depth exceeded while calling a Python object -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.