While running upstream a lot of from <module> import <object> statements fail to resolve as valid definitions during semantic analysis. It can be easily demonstrated with the following: from hashlib import md5 from sys import platform md5('foo') platform() Both are included system modules, where md5 will resolve to "Problem in semantic analysis variable not found: md5" and platform will resolve to "void platform kind variable decl filename -99998". For md5 it does not recognize the import at all, and in the later case the semantic analysis seems to be declaring backwards rather than on line 2. Switching the ordering has no impact, though - a few modules work with mangled line definitions, but most fail to be recognized. Importing the module and calling through its name works fine: import hashlib hashlib.md5('foo') This bug also occurs in the beta release 4.90.90. Arch does not package kdev-python for the current stable release so I did not test it there. This is all on Python 3, and I discovered it while checking out a Flask project to hack on and discovering almost all the from imports were broken. Kind of a bummer since the major reason to use kdev for python is the semantic analysis!
Something else is going on here that I'm going to look into more. For one, that isn't even valid Python syntax (durr platform isn't a function, but thats unrelated to what I was experiencing honestly). I think the real bug is that the parser is running in the background on all site-packages for a very long time (hence it gets through hashlib and gets stuck before sys) and doesn't actually show it in the progress docket. I let it sit for two hours and now I'm getting proper resolution of from-import statements again.
Yes, the import handling is a bit quirky in quite a lot of cases. :/ If you find any reproducable issues, please report them into one bug each and I'll try to look into them as soon as I find the time. I also noticed the progress bar for the background parser is not working in recent versions of kdevplatform, or at least it has a very long delay until it actually shows up. I can't find a change which introduces this behaviour, not sure why it is like this now.
Also is two hours really the time it takes? Should be a few minutes at most, and that is to be expected and can't really be changed. It will be cached for the next start of kdevelop though.