Bug 275486 - Imports of modules from packages don't register
Summary: Imports of modules from packages don't register
Status: RESOLVED FIXED
Alias: None
Product: kdev-python
Classification: Developer tools
Component: general (show other bugs)
Version: git master
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 1.2.0
Assignee: Sven Brauch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-12 20:37 UTC by Eike Hein
Modified: 2011-06-18 16:30 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 Eike Hein 2011-06-12 20:37:09 UTC
As an example, Konversation ships a "konversation" package containing "i18n" and "dbus" modules, and several scripts making use of that package in the following fashion:

import konversation.i18n
konversation.i18n.init()

kdev-python won't show a tooltip for init() here, though, despite the "konversation" package being on PYTHONPATH.

According to Sven on IRC, this is because of unimplemented functionality in kdev-python. Quote:

[20:26] <scummos> yeah, so the problem is this; it creates a declaration for "konversation.i18n"
[20:26] <scummos> but in line 43, it looks for "konversation"."i18n"
[20:26] <Sho_> ah
[20:26] <scummos> it must create a differently named declaration, i'm aware of that problem
[20:26] <scummos> however it's not entirely trivial, because it needs to create a new "structure" object and only import that one declaration into it
Comment 1 Sven Brauch 2011-06-17 21:55:57 UTC
Wow, this really turned out to be terribly difficult. I still wasn't able to fix it. I'll try it in a different way now... but it'll take some more time :)
Comment 2 Sven Brauch 2011-06-18 01:20:33 UTC
This is fixed in 512f244. You're welcome to try if it works for you (and if you like the solution).

Cheers,
Sven
Comment 3 Eike Hein 2011-06-18 16:30:58 UTC
Yay :). I haven't used it much yet, but on first glance it seems to work well now. Thanks, that was a key missing bit to making KDev-Python quite useful here.