https://bugs.kde.org/show_bug.cgi?id=358398

            Bug ID: 358398
           Summary: Many from-import statements are not properly parsed
           Product: kdev-python
           Version: git master
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Documentation data
          Assignee: m...@svenbrauch.de
          Reporter: matt.schei...@gmail.com

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!

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to