eryksun added the comment: > def __setattr__(cls, key, value): > super(type(QMediaPlaylist), cls).__setattr__(cls, key, value) > return > > The program segfaults when instantiating the Playlist class.
I'd expect a TypeError because of the extra cls argument. It's already a bound method. FYI, the above finds the next metaclass after type(QMediaPlaylist) in PlaylistMeta.__mro__. It happens that type(QMediaPlaylist) inherits __setattr__ from the next in line (sip.wrappertype), so by a stroke of luck it 'works' (not really since this skips the incompatible sqlalchemy __setattr__). Consider making a playlist class that *has* a SQL table, not one that *is* a SQL table, i.e. use composition instead of inheritance. That sidesteps the incompatible metaclasses. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23276> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com