logilab-astng #8969 false positive when importing from zip-safe eggs [validation pending]
Jürgen reported: I found when you use zip-safe (unexpanded) eggs is that you get this error on a valid "import from" statement: E0611: 19: No name 'pysupport' in module 'ui_portal_commons_utils' If you include the same library using "setup.py develop -U" (i.e. using it in an expanded form), the error disappears. | |
priority | important |
---|---|
type | bug |
done in | 0.20.4 |
load | 0.500 |
load left | 0.000 |
closed by | <not specified> |
Comments
-
2009/06/09 03:35, written by anon
I'm getting the same error message with !zipsafe (expanded) eggs too
-
2010/10/25 10:33, written by anon
add commentcd /tmp
virtualenv dropped-eggs
. dropped-eggs/bin/activate
easy_install pylint
easy_install -z coverage
cat >test.py <<'.'
from coverage import xmlreport
print dir(xmlreport)
.
pylint -rn test.py
will yield this:
************* Module test
E: 1: No name 'xmlreport' in module 'coverage'
$ python test.py
['Reporter', 'XmlReporter', '__builtins__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__url__', '__version__', 'os', 'rate', 'sorted', 'sys', 'time', 'xml']
which is likely due to direct file system checks instead of using zipimport / pkg_resources.