For some reason which I do not pretend to understand, assigning to cls.instance in Singleton.__new__ crashes on Python 3.12 when the class also inherits from QObject or something of the sort. This is very likely a bug in PyQt6 but for now we can just replace cls.instance with a list and append to it so no assignment happens in __new__.
For some reason which I do not pretend to understand, assigning to
cls.instance
inSingleton.__new__
crashes on Python 3.12 when the class also inherits from QObject or something of the sort. This is very likely a bug in PyQt6 but for now we can just replacecls.instance
with a list and append to it so no assignment happens in__new__
.