Hm, this might be a problem with standard library detection on with self-built Python installations.
Can you give me the output of: >>> import sys >>> sys.path >>> from astroid import modutils >>> modutils.STD_LIB_DIRS >>> modutils.is_standard_module('time') Thanks! // Torsten 2014-11-26 22:00 GMT+01:00 Torsten Marek <shlo...@gmail.com>: > Hi, > > this might be a bug in astroid, I'll have a look at it later this week. > > // Torsten > > 2014-11-26 15:41 GMT+01:00 Paul Smith <p...@mad-scientist.net>: > >> On Wed, 2014-11-26 at 02:03 -0500, Paul Smith wrote: >> >> Forgot to say, I'm running on GNU/Linux Ubuntu GNOME 14.10 and I've >> built all these tools (including python) myself from source. >> >> > Hi all; I just upgraded to a newer version of pylint and now I'm seeing >> > many spurious E1101 errors. >> > >> > Before I was using: >> > * Python 2.7.6 >> > * Pylint 1.1.0 >> > * Astroid 1.0.1 >> > * logilab-common 0.61.0 >> > >> > Now I've upgraded to: >> > * Python 2.7.8 >> > * Pylint 1.4.0 >> > * Astroid 1.3.2 >> > * logilab-common 0.63.0 >> > >> > Everything about this new install appears to work fine, EXCEPT pylint. >> > >> > I'm seeing tons of strange E1101 error on standard modules, like >> > time.sleep() and others (readline, etc.) For example: >> > >> > $ cat sl.py >> > import time >> > time.sleep(1) >> > >> > $ python sl.py >> > <sleeps for 1s successfully> >> > >> > $ pylint sl.py >> > ************* Module sl >> > C: 1, 0: Missing module docstring (missing-docstring) >> > E: 2, 0: Module 'time' has no 'sleep' member (no-member) >> > >> > If I run this with my old setup (older python/pylint/etc.), it doesn't >> > complain at all. Why am I seeing this invalid error? >> >> By "at all" I mean it doesn't complain about time.sleep(); of course I >> still get the missing docstring message in the old version :-). >> >> Looking at this it seems like all the members which are loaded from a >> shared library (e.g., lib/python2.7/lib-dynload/time.so etc.) have this >> problem: I see it with datetime, readline, some socket stuff, etc. >> >> Did I break something with my installation of python or one of the >> packages? How does pylint normally discover module members when the >> implementation is in C rather than python? >> >> _______________________________________________ >> code-quality mailing list >> code-quality@python.org >> https://mail.python.org/mailman/listinfo/code-quality >> > >
_______________________________________________ code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality