This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients devkid, eryksun
Date 2015-01-20.11:24:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1421753089.45.0.431058741944.issue23276@psf.upfronthosting.co.za>
In-reply-to
Content
>    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.
History
Date User Action Args
2015-01-20 11:24:49eryksunsetrecipients: + eryksun, devkid
2015-01-20 11:24:49eryksunsetmessageid: <1421753089.45.0.431058741944.issue23276@psf.upfronthosting.co.za>
2015-01-20 11:24:49eryksunlinkissue23276 messages
2015-01-20 11:24:49eryksuncreate