[PyKDE] Request for Testing

Giovanni Bajo rasky at develer.com
Mon Aug 22 15:34:43 BST 2005


Phil Thompson <phil at riverbankcomputing.co.uk> wrote:

>>>> The error occurs because for some reason the custom event data contains
>>>> None instead of the expected tuple.
>>>>
>>>> We are using Windows XP, Qt 3.3.3.
>>>
>>> Should be fixed in tonights SIP snapshot - no need to rebuild PyQt.
>>
>> This breaks my code again...
>>
>> SIP snapshot-20050821 -> Broken
>> SIP snapshot-20050817 -> OK
>
> Do you have a test case?


Eventually produced... :) Attached to this mail.

Output with SIP snapshot-20050821:
<weakref at 00817750; to 'OO' at 00809EB0>
Traceback (most recent call last):
  File "D:\Work\caligola3d\src\pyqtbug6.py", line 28, in ?
    assert wr() is None
AssertionError

Output with SIP snapshot-20050817:
<weakref at 00817750; dead>

-- 
Giovanni Bajo
-------------- next part --------------
#!/usr/bin/env python
#-*- coding: utf-8 -*-
import gc
import weakref
from qt import *

app = QApplication([])

class OO(object):
    pass
tp = OO()

wr = weakref.ref(tp)

dlg = QScrollView(None)
foo = QWidget(dlg.viewport())
foo.r = tp
foo.kkk = foo

del foo
del dlg
del tp

gc.collect()
assert not gc.garbage

print wr
assert wr() is None


More information about the PyQt mailing list