Bug 309469 - SIP-generated modules (in particular PyKDE4 modules) are not found by kdev-python for import detection, code completion
Summary: SIP-generated modules (in particular PyKDE4 modules) are not found by kdev-py...
Status: RESOLVED FIXED
Alias: None
Product: kdev-python
Classification: Developer tools
Component: Language support (show other bugs)
Version: git master
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.4.0
Assignee: Sven Brauch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-03 10:15 UTC by Luca Beltrame
Modified: 2012-11-07 16:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Beltrame 2012-11-03 10:15:55 UTC
Currently, kdev-python does not find the various PyKDE4 modules, which are listed as "missing imports" despite being perfectly importable by the Python interpreter. It should be noted that similarly-built modules (via SIP) like PyQt, are instead detected correctly (but not completely: QtXml for example is not found).

This is easily reproducible by opening a new KDevelop project and by importing the relevant modules.

Reproducible: Always

Steps to Reproduce:
1. Open a new KDevelop Python project
2. Type "import PyKDE4.kdecore as kdecore" (PyKDE4 must be installed)
3. Save the file as Python file
Actual Results:  
Tooltips and code problem reporter report "PyKDE4.kdecore not found".

Expected Results:  
PyKDE4 modules should be found.

Tested with current git master of kdevelop, kdevplatform, and kdev-python, using git master of PyKDE4, and the latest SIP and PyQt.
Comment 1 Sven Brauch 2012-11-03 10:39:28 UTC
Hello!

Yes, the need to be converted to another format before KDevelop can read them, but it's just a matter of adding the module's name to a script. So, if you help me list all the names of the missing modules, I can add them. I know of QtXML, QtSVG, PyKDE4, ...?

Greetings
Comment 2 Sven Brauch 2012-11-03 10:47:39 UTC
Oh well; I guess I can just do "ls" in the sip directory. *g
Comment 3 Luca Beltrame 2012-11-03 11:14:05 UTC
In data sabato 03 novembre 2012 10:39:28, hai scritto:

> them, but it's just a matter of adding the module's name to a script. So,
> if you help me list all the names of the missing modules, I can add them. I

Since I have commit rights, if you document it somewhere (or if it is already 
documented somewhere) I can do it directly next time, without the need to open 
another bug report.
Comment 4 Sven Brauch 2012-11-03 12:27:03 UTC
Hello!

I'm currently working on it, it's not as trivial due to a bug in sip (it generates invalid XML). I'll have to see how I can work around that. :(

Greetings,
Sven
Comment 5 Sven Brauch 2012-11-03 21:59:38 UTC
Oh... sorry, I didn't really answer your question. In theory, you could add the names to documentation_src/pyqt/generate.sh, then re-run that script, but in practice there's two small issues which makes this not work for some of the packages in PyKDE currently. I'll let you know as soon as I've fixed it.
Comment 6 Sven Brauch 2012-11-06 18:12:49 UTC
Git commit 7cee05697e70ffee5b135b80aa2aebb13e836488 by Sven Brauch.
Committed on 06/11/2012 at 19:11.
Pushed by brauch into branch 'master'.

Documentation files for PyKDE and the missing PyQt modules.
This probably needs a bit more work, especially support for
class c(): class d(): pass
a = c.d()

A  +3319 -0    documentation_files/PyKDE4/akonadi.py
A  +205  -0    documentation_files/PyKDE4/dnssd.py
A  +8098 -0    documentation_files/PyKDE4/kdecore.py
A  +13624 -0    documentation_files/PyKDE4/kdeui.py
A  +4960 -0    documentation_files/PyKDE4/khtml.py
A  +7410 -0    documentation_files/PyKDE4/kio.py
A  +473  -0    documentation_files/PyKDE4/knewstuff.py
A  +1286 -0    documentation_files/PyKDE4/kparts.py
A  +53   -0    documentation_files/PyKDE4/kterminal.py
A  +1734 -0    documentation_files/PyKDE4/ktexteditor.py
A  +509  -0    documentation_files/PyKDE4/kutils.py
A  +4467 -0    documentation_files/PyKDE4/nepomuk.py
A  +123  -0    documentation_files/PyKDE4/parse_xml.py
A  +1025 -0    documentation_files/PyKDE4/phonon.py
A  +5596 -0    documentation_files/PyKDE4/plasma.py
A  +241  -0    documentation_files/PyKDE4/polkitqt.py
A  +977  -0    documentation_files/PyKDE4/solid.py
A  +3728 -0    documentation_files/PyKDE4/soprano.py
A  +5    -0    documentation_files/PyQt4/Qt.py
A  +25   -0    documentation_files/PyQt4/QtAssistant.py
M  +197  -197  documentation_files/PyQt4/QtCore.py
A  +834  -0    documentation_files/PyQt4/QtDBus.py
A  +772  -0    documentation_files/PyQt4/QtDeclarative.py
A  +761  -0    documentation_files/PyQt4/QtDesigner.py
M  +319  -319  documentation_files/PyQt4/QtGui.py
A  +285  -0    documentation_files/PyQt4/QtHelp.py
A  +545  -0    documentation_files/PyQt4/QtMultimedia.py
A  +2911 -0    documentation_files/PyQt4/QtNetwork.py
A  +1187 -0    documentation_files/PyQt4/QtOpenGL.py
A  +883  -0    documentation_files/PyQt4/QtScript.py
A  +72   -0    documentation_files/PyQt4/QtScriptTools.py
A  +1084 -0    documentation_files/PyQt4/QtSql.py
A  +184  -0    documentation_files/PyQt4/QtSvg.py
A  +58   -0    documentation_files/PyQt4/QtTest.py
A  +1588 -0    documentation_files/PyQt4/QtWebKit.py
A  +1247 -0    documentation_files/PyQt4/QtXml.py
A  +563  -0    documentation_files/PyQt4/QtXmlPatterns.py
A  +1025 -0    documentation_files/PyQt4/phonon.py

http://commits.kde.org/kdev-python/7cee05697e70ffee5b135b80aa2aebb13e836488
Comment 7 Sven Brauch 2012-11-07 16:00:57 UTC
Git commit 1bcf44b0061100d918cf25d2493ad4fd5698af37 by Sven Brauch.
Committed on 06/11/2012 at 19:11.
Pushed by brauch into branch '1.4'.

Documentation files for PyKDE and the missing PyQt modules.
This probably needs a bit more work, especially support for
class c(): class d(): pass
a = c.d()

A  +3319 -0    documentation_files/PyKDE4/akonadi.py
A  +205  -0    documentation_files/PyKDE4/dnssd.py
A  +8098 -0    documentation_files/PyKDE4/kdecore.py
A  +13624 -0    documentation_files/PyKDE4/kdeui.py
A  +4960 -0    documentation_files/PyKDE4/khtml.py
A  +7410 -0    documentation_files/PyKDE4/kio.py
A  +473  -0    documentation_files/PyKDE4/knewstuff.py
A  +1286 -0    documentation_files/PyKDE4/kparts.py
A  +53   -0    documentation_files/PyKDE4/kterminal.py
A  +1734 -0    documentation_files/PyKDE4/ktexteditor.py
A  +509  -0    documentation_files/PyKDE4/kutils.py
A  +4467 -0    documentation_files/PyKDE4/nepomuk.py
A  +123  -0    documentation_files/PyKDE4/parse_xml.py
A  +1025 -0    documentation_files/PyKDE4/phonon.py
A  +5596 -0    documentation_files/PyKDE4/plasma.py
A  +241  -0    documentation_files/PyKDE4/polkitqt.py
A  +977  -0    documentation_files/PyKDE4/solid.py
A  +3728 -0    documentation_files/PyKDE4/soprano.py
A  +5    -0    documentation_files/PyQt4/Qt.py
A  +25   -0    documentation_files/PyQt4/QtAssistant.py
M  +197  -197  documentation_files/PyQt4/QtCore.py
A  +834  -0    documentation_files/PyQt4/QtDBus.py
A  +772  -0    documentation_files/PyQt4/QtDeclarative.py
A  +761  -0    documentation_files/PyQt4/QtDesigner.py
M  +319  -319  documentation_files/PyQt4/QtGui.py
A  +285  -0    documentation_files/PyQt4/QtHelp.py
A  +545  -0    documentation_files/PyQt4/QtMultimedia.py
A  +2911 -0    documentation_files/PyQt4/QtNetwork.py
A  +1187 -0    documentation_files/PyQt4/QtOpenGL.py
A  +883  -0    documentation_files/PyQt4/QtScript.py
A  +72   -0    documentation_files/PyQt4/QtScriptTools.py
A  +1084 -0    documentation_files/PyQt4/QtSql.py
A  +184  -0    documentation_files/PyQt4/QtSvg.py
A  +58   -0    documentation_files/PyQt4/QtTest.py
A  +1588 -0    documentation_files/PyQt4/QtWebKit.py
A  +1247 -0    documentation_files/PyQt4/QtXml.py
A  +563  -0    documentation_files/PyQt4/QtXmlPatterns.py
A  +1025 -0    documentation_files/PyQt4/phonon.py

http://commits.kde.org/kdev-python/1bcf44b0061100d918cf25d2493ad4fd5698af37