Message234369
> 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. |
|
Date |
User |
Action |
Args |
2015-01-20 11:24:49 | eryksun | set | recipients:
+ eryksun, devkid |
2015-01-20 11:24:49 | eryksun | set | messageid: <1421753089.45.0.431058741944.issue23276@psf.upfronthosting.co.za> |
2015-01-20 11:24:49 | eryksun | link | issue23276 messages |
2015-01-20 11:24:49 | eryksun | create | |
|