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