[PyQt] pyqtWrapperType not usable as metaclass in 4.12?

Georg Brandl g.brandl at fz-juelich.de
Wed Jun 28 06:05:39 BST 2017


On 27.06.2017 19:38, Phil Thompson wrote:
> On 25 Jun 2017, at 10:09 am, Georg Brandl <g.brandl at fz-juelich.de> wrote:
>>
>> Hi all,
>>
>> after updating PyQt4/sip to 4.12/4.19, this snippet produces a segfault
>> (I've reproduced this with two builds, one built for Ubuntu, one on Mac):
>>
>>
>> import PyQt4.QtCore
>>
>> class D(object):
>>    __metaclass__ = PyQt4.QtCore.pyqtWrapperType
>>
>>
>> Is pyqtWrapperType not supposed to be instantiable anymore?
>>
>> The fault occurs in pyqtWrapperType_init.  A diff between 4.11.4 and 4.12
>> shows this change in the function:
>>
>> -    pyqt4ClassTypeDef *pyqt_td = (pyqt4ClassTypeDef *)((sipWrapperType
>> *)self)->type;
>> +    const pyqt4ClassPluginDef *pyqt_td = reinterpret_cast<const
>> pyqt4ClassPluginDef *>(sipTypePluginData(((sipWrapperType *)self)->wt_td));
>
> I think this is already fixed in the current snapshot (below is the relevant patch).
>
> As this is a regression I'm happy to release the current snapshot as v4.12.1.

Thanks Phil, that would be perfect.

cheers,
Georg



--
Jülich Centre for Neutron Science JCNS
Forschungszentrum Jülich GmbH
Outstation at MLZ
Lichtenbergstraße 1
85747 Garching
GERMANY

Telefon: +49 - 89 289 12131
Telefax: +49 - 89 289 10799


------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,
Prof. Dr. Sebastian M. Schmidt
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------



More information about the PyQt mailing list