[PyQt] Pylint and PyQt4 Bus Errors
Derek Harland
derek at chocolate-fish.com
Wed Jul 29 12:05:52 BST 2009
Hi Sylvain (and hopefully some helpful PyQt people!)
* As noted earlier, after applying my patch to get pylint to recognise
PyQt4, pylint will Bus Error depending on import order
eg
from PyQt4 import QtCore, QtGui # will cause pylint to
BusError
from PyQt4 import QtGui , QtCore # pylint is happy ...
* After a long fight of constant crashes I've debugged down to the
statement that actually crashes :-)
* Its because there is something strange about QtCore.QSignalMapper,
and here is the problem replicated ...
>>> from PyQt4 import QtCore
>>> isinstance(QtCore.QSignalMapper, types.MethodType)
Bus error
However this works ...
>>> from PyQt4 import QtCore, QtGui
>>> isinstance(QtCore.QSignalMapper, types.MethodType)
False
pylint sparks a crash (or rather logilab.astng.builder does) as it
will attempt to import and fully analyse QtCore before loading QtGui.
I'm hoping Phil at Riverbank Software might be able to cast some light
on what state QSignalMapper might be in before QtGui exists ...
Kind regards
Derek
[Machine details:
- OSX10.5 running macports python 2.6.2
- PyQt4.5.4, sip 4.8.2
- pylint 0.18, logilab.astng 0.19, logilab.common 0.42
]
More information about the PyQt
mailing list