Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.15.4, 6.3.0
-
None
-
Python 3.10
PySide6 6.3.0
shiboken6 6.3.0
Linux
-
d58e262b11 (pyside/pyside-setup/dev) 5ed3e6f5dd (pyside/pyside-setup/6.3) bdfd9e0a50 (pyside/pyside-setup/6.4) 5ed3e6f5dd (pyside/tqtc-pyside-setup/6.3) bdfd9e0a50 (pyside/tqtc-pyside-setup/6.4) bdfd9e0a50 (pyside/tqtc-pyside-setup/tqtc/6.4)
Description
Defining __slots__ in a PySide subclass segfaults on attribute assignment
from PySide6.QtCore import QObject class Obj(QObject): __slots__ = ("a",) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.a = 1 # <<< segfaults here obj = Obj()
Note: the __slots__ is python feature unrelated to Qt's signal/slot mechanism.
https://docs.python.org/3/reference/datamodel.html?highlight=__slots__#object.__slots__
Attachments
Issue Links
- relates to
-
PYSIDE-2208 __slots__ on Qt derived classes do not work or crash the application
- Closed
For Gerrit Dashboard: PYSIDE-1970 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
422855,3 | shiboken: add a handy function to disassemble the current frame | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
439348,8 | Finally implement the __slots__ feature in PySide | dev | pyside/pyside-setup | Status: MERGED | +2 | 0 |
439464,2 | Finally implement the __slots__ feature in PySide | 6.4 | pyside/pyside-setup | Status: MERGED | +2 | 0 |
439465,2 | Finally implement the __slots__ feature in PySide | 6.3 | pyside/pyside-setup | Status: MERGED | +2 | 0 |