segfault inheriting from an enumeration in pyqt5 (noticed via mypy stubtest)

Phil Thompson phil at riverbankcomputing.com
Wed Dec 14 10:27:53 GMT 2022


On 28/11/2022 16:11, Kyle Altendorf wrote:
> While checking the PyQt5-stubs package with updated mypy [0] we
> noticed segfaults when running stubtest.  Apparently they added a
> feature that verifies classes not marked as final are in fact
> inheritable.  This triggered the segfault as noted in the mypy issue
> report [1].  Specifically, a file with contents as below will result
> in a segfault, at least in Linux with PyQt5==5.15.7
> 
>     import PyQt5.QtBluetooth
>     class segfault(PyQt5.QtBluetooth.QBluetooth.AttAccessConstraint): 
> ...
> 
> I don't know what it would take to fix this, or how much maintenance
> is still being done on PyQt5, but figured I'd at least bring this up.
> Inheriting from this particular class does result in a sensible Python
> exception with PyQt6, at least.

Fixed in the next SIP snapshot.

Phil


More information about the PyQt mailing list